[Piglit] [PATCH 08/14] Test that gl_PerVertex can't be redeclared multiple times in one shader.

Paul Berry stereotype441 at gmail.com
Wed Oct 2 16:45:36 PDT 2013


---
 .../gs-redeclares-pervertex-in-multiple-times.geom | 32 ++++++++++++++++++++++
 ...gs-redeclares-pervertex-out-multiple-times.geom | 32 ++++++++++++++++++++++
 ...vs-redeclares-pervertex-out-multiple-times.vert | 32 ++++++++++++++++++++++
 3 files changed, 96 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-in-multiple-times.geom
 create mode 100644 tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-multiple-times.geom
 create mode 100644 tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-multiple-times.vert

diff --git a/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-in-multiple-times.geom b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-in-multiple-times.geom
new file mode 100644
index 0000000..b86b490
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-in-multiple-times.geom
@@ -0,0 +1,32 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// From section 7.1 (Built-In Language Variables) of the GLSL 4.10
+// spec:
+//
+//     It is also a compilation error to redeclare the [gl_PerVertex]
+//     block more than once...
+//
+// This appears to be a clarification to the behaviour established for
+// gl_PerVertex by GLSL 1.50, therefore we test it using GLSL version
+// 1.50.
+
+#version 150
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+in gl_PerVertex {
+    vec4 gl_Position;
+} gl_in[];
+
+in gl_PerVertex {
+    vec4 gl_Position;
+} gl_in[];
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-multiple-times.geom b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-multiple-times.geom
new file mode 100644
index 0000000..d5f39ce
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-multiple-times.geom
@@ -0,0 +1,32 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// From section 7.1 (Built-In Language Variables) of the GLSL 4.10
+// spec:
+//
+//     It is also a compilation error to redeclare the [gl_PerVertex]
+//     block more than once...
+//
+// This appears to be a clarification to the behaviour established for
+// gl_PerVertex by GLSL 1.50, therefore we test it using GLSL version
+// 1.50.
+
+#version 150
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+out gl_PerVertex {
+    vec4 gl_Position;
+};
+
+out gl_PerVertex {
+    vec4 gl_Position;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-multiple-times.vert b/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-multiple-times.vert
new file mode 100644
index 0000000..d5f39ce
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-multiple-times.vert
@@ -0,0 +1,32 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: true
+// [end config]
+//
+// From section 7.1 (Built-In Language Variables) of the GLSL 4.10
+// spec:
+//
+//     It is also a compilation error to redeclare the [gl_PerVertex]
+//     block more than once...
+//
+// This appears to be a clarification to the behaviour established for
+// gl_PerVertex by GLSL 1.50, therefore we test it using GLSL version
+// 1.50.
+
+#version 150
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+out gl_PerVertex {
+    vec4 gl_Position;
+};
+
+out gl_PerVertex {
+    vec4 gl_Position;
+};
+
+void main()
+{
+}
-- 
1.8.4



More information about the Piglit mailing list