[Piglit] [PATCH 03/14] Test that redeclaration of gl_PerVertex must be for a subset.

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


---
 ...edeclares-pervertex-in-with-illegal-member.geom | 41 ++++++++++++++++++++++
 ...declares-pervertex-out-with-illegal-member.geom | 41 ++++++++++++++++++++++
 ...s-redeclares-pervertex-with-illegal-member.vert | 38 ++++++++++++++++++++
 3 files changed, 120 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-in-with-illegal-member.geom
 create mode 100644 tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-with-illegal-member.geom
 create mode 100644 tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-with-illegal-member.vert

diff --git a/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-in-with-illegal-member.geom b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-in-with-illegal-member.geom
new file mode 100644
index 0000000..bd85a06
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-in-with-illegal-member.geom
@@ -0,0 +1,41 @@
+// [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:
+//
+//   The gl_PerVertex block can be redeclared in a shader to explicitly
+//   indicate what subset of the fixed pipeline interface will be
+//   used. This is necessary to establish the interface between multiple
+//   programs.  For example:
+//
+//   out gl_PerVertex {
+//       vec4 gl_Position;    // will use gl_Position
+//       float gl_PointSize;  // will use gl_PointSize
+//       vec4 t;              // error, only gl_PerVertex members allowed
+//   };  // no other members of gl_PerVertex will be used
+//
+//   This establishes the output interface the shader will use with the
+//   subsequent pipeline stage. It must be a subset of the built-in members
+//   of gl_PerVertex.
+//
+// This test verifies that a non-member of the geometry shader
+// gl_PerVertex input may not be included in the redeclaration.
+
+#version 150
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+in gl_PerVertex {
+    vec4 gl_Position;
+    float gl_PointSize;
+    vec4 t;
+} gl_in[];
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-with-illegal-member.geom b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-with-illegal-member.geom
new file mode 100644
index 0000000..3983672
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-redeclares-pervertex-out-with-illegal-member.geom
@@ -0,0 +1,41 @@
+// [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:
+//
+//   The gl_PerVertex block can be redeclared in a shader to explicitly
+//   indicate what subset of the fixed pipeline interface will be
+//   used. This is necessary to establish the interface between multiple
+//   programs.  For example:
+//
+//   out gl_PerVertex {
+//       vec4 gl_Position;    // will use gl_Position
+//       float gl_PointSize;  // will use gl_PointSize
+//       vec4 t;              // error, only gl_PerVertex members allowed
+//   };  // no other members of gl_PerVertex will be used
+//
+//   This establishes the output interface the shader will use with the
+//   subsequent pipeline stage. It must be a subset of the built-in members
+//   of gl_PerVertex.
+//
+// This test verifies that a non-member of the geometry shader
+// gl_PerVertex output may not be included in the redeclaration.
+
+#version 150
+
+layout(triangles) in;
+layout(triangle_strip, max_vertices = 3) out;
+
+out gl_PerVertex {
+    vec4 gl_Position;
+    float gl_PointSize;
+    vec4 t;
+};
+
+void main()
+{
+}
diff --git a/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-with-illegal-member.vert b/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-with-illegal-member.vert
new file mode 100644
index 0000000..369574f
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/vs-redeclares-pervertex-with-illegal-member.vert
@@ -0,0 +1,38 @@
+// [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:
+//
+//   The gl_PerVertex block can be redeclared in a shader to explicitly
+//   indicate what subset of the fixed pipeline interface will be
+//   used. This is necessary to establish the interface between multiple
+//   programs.  For example:
+//
+//   out gl_PerVertex {
+//       vec4 gl_Position;    // will use gl_Position
+//       float gl_PointSize;  // will use gl_PointSize
+//       vec4 t;              // error, only gl_PerVertex members allowed
+//   };  // no other members of gl_PerVertex will be used
+//
+//   This establishes the output interface the shader will use with the
+//   subsequent pipeline stage. It must be a subset of the built-in members
+//   of gl_PerVertex.
+//
+// This test verifies that a non-member of gl_PerVertex may not be
+// included in the redeclaration.
+
+#version 150
+
+out gl_PerVertex {
+    vec4 gl_Position;
+    float gl_PointSize;
+    vec4 t;
+};
+
+void main()
+{
+}
-- 
1.8.4



More information about the Piglit mailing list