[Piglit] [PATCH 3/4] GLSL 1.50: Test that layout qualifiers can only be declared in global scope

Nicholas Mack nichmack at gmail.com
Tue Aug 6 10:01:31 PDT 2013


Two tests: vertex shader, fragment shader
---
 tests/spec/glsl-1.50/compiler/layout-global-only.frag | 15 +++++++++++++++
 tests/spec/glsl-1.50/compiler/layout-global-only.vert | 16 ++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/compiler/layout-global-only.frag
 create mode 100644 tests/spec/glsl-1.50/compiler/layout-global-only.vert

diff --git a/tests/spec/glsl-1.50/compiler/layout-global-only.frag b/tests/spec/glsl-1.50/compiler/layout-global-only.frag
new file mode 100644
index 0000000..84e9409
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/layout-global-only.frag
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Section 4.3.8(Layout Qualifiers) of the GLSL 1.50 spec says:
+// "Declarations of layouts can only be made at global scope"
+
+#version 150
+
+void main()
+{
+	layout(pixel_center_integer) in vec4 gl_FragCoord;
+}
diff --git a/tests/spec/glsl-1.50/compiler/layout-global-only.vert b/tests/spec/glsl-1.50/compiler/layout-global-only.vert
new file mode 100644
index 0000000..e34a089
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/layout-global-only.vert
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// Section 4.3.8(Layout Qualifiers) of the GLSL 1.50 spec says:
+// "Declarations of layouts can only be made at global scope"
+
+#version 150
+
+void main()
+{
+	layout(pixel_center_origin) in vec4 b;
+	gl_Position = b;
+}
-- 
1.8.3.1



More information about the Piglit mailing list