<div dir="ltr">On 6 August 2013 10:29, 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">
<div class="HOEnZb"><div class="h5">Two tests: vertex shader, fragment shader<br></div></div></blockquote><div><br></div><div>I'd prefer to see this test exercise the layout qualifiers that are new to GLSL 1.50 (namely the geometry shader input and output layout qualifiers) because that's where we're likely to have bugs.<br>
<br>So for example, we might have a test to verify that trying to do "layout(triangles) in;" inside a function results in a compile error, and a similar test for "layout(triangles) out;".  Both of these  tests should be ".geom" files, since those constructs are only permitted in geometry shaders.<br>
</div><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
---<br>
 tests/spec/glsl-1.50/compiler/layout-global-only.frag | 15 +++++++++++++++<br>
 tests/spec/glsl-1.50/compiler/layout-global-only.vert | 16 ++++++++++++++++<br>
 2 files changed, 31 insertions(+)<br>
 create mode 100644 tests/spec/glsl-1.50/compiler/layout-global-only.frag<br>
 create mode 100644 tests/spec/glsl-1.50/compiler/layout-global-only.vert<br>
<br>
diff --git a/tests/spec/glsl-1.50/compiler/layout-global-only.frag b/tests/spec/glsl-1.50/compiler/layout-global-only.frag<br>
new file mode 100644<br>
index 0000000..84e9409<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.50/compiler/layout-global-only.frag<br>
@@ -0,0 +1,15 @@<br>
+// [config]<br>
+// expect_result: fail<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>
+// "Declarations of layouts can only be made at global scope"<br>
+<br>
+#version 150<br>
+<br>
+void main()<br>
+{<br>
+       layout(pixel_center_integer) in vec4 gl_FragCoord;<br>
+}<br>
diff --git a/tests/spec/glsl-1.50/compiler/layout-global-only.vert b/tests/spec/glsl-1.50/compiler/layout-global-only.vert<br>
new file mode 100644<br>
index 0000000..e34a089<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.50/compiler/layout-global-only.vert<br>
@@ -0,0 +1,16 @@<br>
+// [config]<br>
+// expect_result: fail<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>
+// "Declarations of layouts can only be made at global scope"<br>
+<br>
+#version 150<br>
+<br>
+void main()<br>
+{<br>
+       layout(pixel_center_origin) in vec4 b;<br>
+       gl_Position = b;<br>
+}<br>
--<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>
</div></div></blockquote></div><br></div></div>