[Piglit] [PATCH 10/14] Test that builtins can't be redeclared both inside and outside gl_PerVertex.

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


---
 ...s-pervertex-out-after-global-redeclaration.geom | 36 ++++++++++++++++++++++
 ...ertex-out-after-other-global-redeclaration.geom | 35 +++++++++++++++++++++
 ...-pervertex-out-before-global-redeclaration.geom | 36 ++++++++++++++++++++++
 ...rtex-out-before-other-global-redeclaration.geom | 35 +++++++++++++++++++++
 ...s-pervertex-out-after-global-redeclaration.vert | 33 ++++++++++++++++++++
 ...ertex-out-after-other-global-redeclaration.vert | 32 +++++++++++++++++++
 ...-pervertex-out-before-global-redeclaration.vert | 33 ++++++++++++++++++++
 ...rtex-out-before-other-global-redeclaration.vert | 32 +++++++++++++++++++
 8 files changed, 272 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-after-global-redeclaration.geom
 create mode 100644 tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-after-other-global-redeclaration.geom
 create mode 100644 tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-before-global-redeclaration.geom
 create mode 100644 tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-before-other-global-redeclaration.geom
 create mode 100644 tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-after-global-redeclaration.vert
 create mode 100644 tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-after-other-global-redeclaration.vert
 create mode 100644 tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-before-global-redeclaration.vert
 create mode 100644 tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-before-other-global-redeclaration.vert

diff --git a/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-after-global-redeclaration.geom b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-after-global-redeclaration.geom
new file mode 100644
index 0000000..3219345
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-after-global-redeclaration.geom
@@ -0,0 +1,36 @@
+// [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:
+//
+//     Also, if a built-in interface block is redeclared, no member of
+//     the built-in declaration can be redeclared outside the block
+//     redeclaration.
+//
+// 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.
+//
+// In this test we attempt to redeclare gl_PerVertex after having
+// redeclared gl_ClipDistance globally, and gl_ClipDistance is present
+// in the redeclaration of gl_PerVertex.
+
+#version 150
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+out float gl_ClipDistance[];
+
+out gl_PerVertex {
+    vec4 gl_Position;
+    float gl_ClipDistance[4];
+};
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-after-other-global-redeclaration.geom b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-after-other-global-redeclaration.geom
new file mode 100644
index 0000000..34406df
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-after-other-global-redeclaration.geom
@@ -0,0 +1,35 @@
+// [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:
+//
+//     Also, if a built-in interface block is redeclared, no member of
+//     the built-in declaration can be redeclared outside the block
+//     redeclaration.
+//
+// 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.
+//
+// In this test we attempt to redeclare gl_PerVertex after having
+// redeclared gl_ClipDistance globally, and gl_ClipDistance is not
+// present in the redeclaration of gl_PerVertex.
+
+#version 150
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+out float gl_ClipDistance[4];
+
+out gl_PerVertex {
+    vec4 gl_Position;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-before-global-redeclaration.geom b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-before-global-redeclaration.geom
new file mode 100644
index 0000000..4a96b78
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-before-global-redeclaration.geom
@@ -0,0 +1,36 @@
+// [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:
+//
+//     Also, if a built-in interface block is redeclared, no member of
+//     the built-in declaration can be redeclared outside the block
+//     redeclaration.
+//
+// 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.
+//
+// In this test we attempt to redeclare gl_PerVertex before
+// redeclaring gl_ClipDistance globally, and gl_ClipDistance is
+// present in the redeclaration of gl_PerVertex.
+
+#version 150
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+out gl_PerVertex {
+    vec4 gl_Position;
+    float gl_ClipDistance[];
+};
+
+out float gl_ClipDistance[4];
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-before-other-global-redeclaration.geom b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-before-other-global-redeclaration.geom
new file mode 100644
index 0000000..6224e5e
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-before-other-global-redeclaration.geom
@@ -0,0 +1,35 @@
+// [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:
+//
+//     Also, if a built-in interface block is redeclared, no member of
+//     the built-in declaration can be redeclared outside the block
+//     redeclaration.
+//
+// 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.
+//
+// In this test we attempt to redeclare gl_PerVertex before
+// redeclaring gl_ClipDistance globally, and gl_ClipDistance is not
+// present in the redeclaration of gl_PerVertex.
+
+#version 150
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+out gl_PerVertex {
+    vec4 gl_Position;
+};
+
+out float gl_ClipDistance[4];
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-after-global-redeclaration.vert b/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-after-global-redeclaration.vert
new file mode 100644
index 0000000..9fe042f
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-after-global-redeclaration.vert
@@ -0,0 +1,33 @@
+// [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:
+//
+//     Also, if a built-in interface block is redeclared, no member of
+//     the built-in declaration can be redeclared outside the block
+//     redeclaration.
+//
+// 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.
+//
+// In this test we attempt to redeclare gl_PerVertex after having
+// redeclared gl_ClipDistance globally, and gl_ClipDistance is present
+// in the redeclaration of gl_PerVertex.
+
+#version 150
+
+out float gl_ClipDistance[];
+
+out gl_PerVertex {
+    vec4 gl_Position;
+    float gl_ClipDistance[4];
+};
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-after-other-global-redeclaration.vert b/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-after-other-global-redeclaration.vert
new file mode 100644
index 0000000..06017c2
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-after-other-global-redeclaration.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:
+//
+//     Also, if a built-in interface block is redeclared, no member of
+//     the built-in declaration can be redeclared outside the block
+//     redeclaration.
+//
+// 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.
+//
+// In this test we attempt to redeclare gl_PerVertex after having
+// redeclared gl_ClipDistance globally, and gl_ClipDistance is not
+// present in the redeclaration of gl_PerVertex.
+
+#version 150
+
+out float gl_ClipDistance[4];
+
+out gl_PerVertex {
+    vec4 gl_Position;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-before-global-redeclaration.vert b/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-before-global-redeclaration.vert
new file mode 100644
index 0000000..29aa65d
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-before-global-redeclaration.vert
@@ -0,0 +1,33 @@
+// [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:
+//
+//     Also, if a built-in interface block is redeclared, no member of
+//     the built-in declaration can be redeclared outside the block
+//     redeclaration.
+//
+// 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.
+//
+// In this test we attempt to redeclare gl_PerVertex before
+// redeclaring gl_ClipDistance globally, and gl_ClipDistance is
+// present in the redeclaration of gl_PerVertex.
+
+#version 150
+
+out gl_PerVertex {
+    vec4 gl_Position;
+    float gl_ClipDistance[];
+};
+
+out float gl_ClipDistance[4];
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-before-other-global-redeclaration.vert b/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-before-other-global-redeclaration.vert
new file mode 100644
index 0000000..bb905ce
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-out-before-other-global-redeclaration.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:
+//
+//     Also, if a built-in interface block is redeclared, no member of
+//     the built-in declaration can be redeclared outside the block
+//     redeclaration.
+//
+// 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.
+//
+// In this test we attempt to redeclare gl_PerVertex before
+// redeclaring gl_ClipDistance globally, and gl_ClipDistance is not
+// present in the redeclaration of gl_PerVertex.
+
+#version 150
+
+out gl_PerVertex {
+    vec4 gl_Position;
+};
+
+out float gl_ClipDistance[4];
+
+void main()
+{
+}
-- 
1.8.4



More information about the Piglit mailing list