<div dir="ltr">On 16 September 2013 09:35, Nicholas Mack <span dir="ltr"><<a href="mailto:nichmack@gmail.com" target="_blank">nichmack@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
...ayout-only-one-out-declaration-per-program.geom | 22 ++++++++++++++++++++++<br>
.../compiler/layout-out-only-output-qualifier.geom | 22 ++++++++++++++++++++++<br>
.../compiler/layout-out-order-irrelevant.geom | 21 +++++++++++++++++++++<br>
3 files changed, 65 insertions(+)<br>
create mode 100644 tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program.geom<br>
create mode 100644 tests/spec/glsl-1.50/compiler/layout-out-only-output-qualifier.geom<br>
create mode 100644 tests/spec/glsl-1.50/compiler/layout-out-order-irrelevant.geom<br>
<br>
diff --git a/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program.geom b/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program.geom<br>
new file mode 100644<br>
index 0000000..d7439e1<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.50/compiler/layout-only-one-out-declaration-per-program.geom<br>
@@ -0,0 +1,22 @@<br>
+// [config]<br>
+// expect_result: fail<br>
+// glsl_version: 1.50<br>
+// check_link: true<br>
+// [end config]<br>
+//<br>
+// Section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says:<br>
+// "All geometry shader output layout declarations in a program must declare the<br>
+// same layout and same value for max_vertices."<br>
+<br>
+#version 150<br>
+<br>
+layout(lines) in;<br>
+layout(line_strip, max_vertices=2) out;<br>
+<br>
+in vec4 pos[];<br>
+<br>
+layout(triangle_strip, max_vertices=3) out;<br></blockquote><div><br></div><div>As written, this test will only fail if the implementation fails to check for mismatches in both output primitive type *and* max_vertices. We need to make two separate tests, one to check that conflicting output primitive type causes a compiler error, and the other to check that conflicting max_vertices causes a compile error.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+void main()<br>
+{<br>
+}<br>
diff --git a/tests/spec/glsl-1.50/compiler/layout-out-only-output-qualifier.geom b/tests/spec/glsl-1.50/compiler/layout-out-only-output-qualifier.geom<br>
new file mode 100644<br>
index 0000000..37533d4<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.50/compiler/layout-out-only-output-qualifier.geom<br>
@@ -0,0 +1,22 @@<br>
+// [config]<br>
+// expect_result: fail<br>
+// glsl_version: 1.50<br>
+// check_link: true<br>
+// [end config]<br>
+//<br>
+// Section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says:<br>
+// "Geometry shaders can have output layout qualifiers only on the interface<br>
+// qualifier out, not on an output block or variable declaration. The layout<br>
+// qualifier identifiers for geometry shader outputs are<br>
+// points<br>
+// line_strip<br>
+// triangle_strip<br>
+// max_vertices = integer-constant"<br>
+<br>
+#version 150<br>
+<br>
+layout(lines_adjacency) out;<br>
+<br>
+void main()<br>
+{<br>
+}<br>
diff --git a/tests/spec/glsl-1.50/compiler/layout-out-order-irrelevant.geom b/tests/spec/glsl-1.50/compiler/layout-out-order-irrelevant.geom<br>
new file mode 100644<br>
index 0000000..603e175<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.50/compiler/layout-out-order-irrelevant.geom<br>
@@ -0,0 +1,21 @@<br>
+// [config]<br>
+// expect_result: pass<br>
+// glsl_version: 1.50<br>
+// check_link: true<br>
+// [end config]<br>
+//<br>
+// Section 4.3.8 (Layout Qualifiers) of the GLSL 1.50 spec says:<br>
+// "The tokens in any layout-qualifier-id-list are identifiers, not keywords.<br>
+// Generally, they can be listed in any order."<br>
+//<br>
+// Section 4.3.8.2(Output Layout Qualifiers) of the GLSL 1.50 spec says:<br>
+// "One declaration can declare either a primitive type (points, line_strip, or<br>
+// triangle_strip), or max_vertices, or both."<br>
+<br>
+#version 150<br>
+<br>
+layout(max_vertices = 3, triangle_strip) out;<br></blockquote><div><br></div><div>This test needs an input layout declaration (e.g. "layout(points) in;") otherwise it won't link successfully.<br></div><div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
+void main()<br>
+{<br>
+}<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</font></span></blockquote></div><br></div></div>