<div dir="ltr">On 20 September 2013 12:31, 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>
 ...-layout-qualifiers-with-variable-declarations.geom | 19 +++++++++++++++++++<br>
 ...-layout-qualifiers-with-variable-declarations.geom | 19 +++++++++++++++++++<br>
 2 files changed, 38 insertions(+)<br>
 create mode 100644 tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom<br>
 create mode 100644 tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom<br>
<br>
diff --git a/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom b/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom<br>
new file mode 100644<br>
index 0000000..f26b60d<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.50/compiler/incorrect-in-layout-qualifiers-with-variable-declarations.geom<br>
@@ -0,0 +1,19 @@<br>
+// [config]<br>
+// expect_result: fail<br>
+// glsl_version: 1.50<br>
+// check_link: true<br></blockquote><div><br></div><div>This needs to be "check_link: false".  Otherwise the test will erroneously pass due to lacking the necessary input/output layout qualifiers.<br><br>A similar change needs to be made to incorrect-out-layout-qualifiers-with-variable-declarations.geom.<br>
<br></div><div>With that change, this patch is:<br><br></div><div>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

+// [end config]<br>
+//<br>
+// Tests that input layout qualifiers cannot be used on a variable declaration.<br>
+//<br>
+// GLSLangSpec 1.50, section 4.3.8.2 (Output Layout Qualifiers):<br>
+// "Geometry shaders allow input layout qualifiers only on the interface<br>
+//  qualifier in, not on an input block,block member, or variable."<br>
+<br>
+#version 150<br>
+<br>
+layout(points) in float c[];<br>
+<br>
+void main()<br>
+{<br>
+}<br>
diff --git a/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom b/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom<br>
new file mode 100644<br>
index 0000000..161de1c<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.50/compiler/incorrect-out-layout-qualifiers-with-variable-declarations.geom<br>
@@ -0,0 +1,19 @@<br>
+// [config]<br>
+// expect_result: fail<br>
+// glsl_version: 1.50<br>
+// check_link: true<br>
+// [end config]<br>
+//<br>
+// Tests that output layout qualifiers cannot be used on a variable declaration.<br>
+//<br>
+// GLSLangSpec 1.50, section 4.3.8.2 (Output Layout Qualifiers):<br>
+// "Geometry shaders can have output layout qualifiers only on the interface<br>
+//  qualifier out, not on an output block or variable declaration."<br>
+<br>
+#version 150<br>
+<br>
+layout(points) out float c;<br>
+<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>