[Piglit] [PATCH 1/2] gs: Test that geometry shader inputs must be arrays.
Paul Berry
stereotype441 at gmail.com
Mon Aug 12 06:38:37 PDT 2013
---
.../compiler/gs-input-nonarray-named-block.geom | 22 ++++++++++++++++++++++
.../compiler/gs-input-nonarray-unnamed-block.geom | 22 ++++++++++++++++++++++
.../spec/glsl-1.50/compiler/gs-input-nonarray.geom | 20 ++++++++++++++++++++
3 files changed, 64 insertions(+)
create mode 100644 tests/spec/glsl-1.50/compiler/gs-input-nonarray-named-block.geom
create mode 100644 tests/spec/glsl-1.50/compiler/gs-input-nonarray-unnamed-block.geom
create mode 100644 tests/spec/glsl-1.50/compiler/gs-input-nonarray.geom
diff --git a/tests/spec/glsl-1.50/compiler/gs-input-nonarray-named-block.geom b/tests/spec/glsl-1.50/compiler/gs-input-nonarray-named-block.geom
new file mode 100644
index 0000000..a3dd72d
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-input-nonarray-named-block.geom
@@ -0,0 +1,22 @@
+// Section 4.3.4 (Inputs) of the GLSL 1.50 spec says:
+//
+// Geometry shader input variables get the per-vertex values
+// written out by vertex shader output variables of the same
+// names. Since a geometry shader operates on a set of vertices,
+// each input varying variable (or input block, see interface
+// blocks below) needs to be declared as an array.
+//
+// This test verifies that trying to create a named non-array input
+// interface block produces an error.
+//
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: false
+// [end config]
+
+#version 150
+
+in blk {
+ vec4 foo;
+} ifc_name;
diff --git a/tests/spec/glsl-1.50/compiler/gs-input-nonarray-unnamed-block.geom b/tests/spec/glsl-1.50/compiler/gs-input-nonarray-unnamed-block.geom
new file mode 100644
index 0000000..6707209
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-input-nonarray-unnamed-block.geom
@@ -0,0 +1,22 @@
+// Section 4.3.4 (Inputs) of the GLSL 1.50 spec says:
+//
+// Geometry shader input variables get the per-vertex values
+// written out by vertex shader output variables of the same
+// names. Since a geometry shader operates on a set of vertices,
+// each input varying variable (or input block, see interface
+// blocks below) needs to be declared as an array.
+//
+// This test verifies that trying to create an unnamed non-array input
+// interface block produces an error.
+//
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: false
+// [end config]
+
+#version 150
+
+in blk {
+ vec4 foo;
+};
diff --git a/tests/spec/glsl-1.50/compiler/gs-input-nonarray.geom b/tests/spec/glsl-1.50/compiler/gs-input-nonarray.geom
new file mode 100644
index 0000000..8894d75
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-input-nonarray.geom
@@ -0,0 +1,20 @@
+// Section 4.3.4 (Inputs) of the GLSL 1.50 spec says:
+//
+// Geometry shader input variables get the per-vertex values
+// written out by vertex shader output variables of the same
+// names. Since a geometry shader operates on a set of vertices,
+// each input varying variable (or input block, see interface
+// blocks below) needs to be declared as an array.
+//
+// This test verifies that trying to create a non-array input outside
+// an interface block produces an error.
+//
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: false
+// [end config]
+
+#version 150
+
+in vec4 foo;
--
1.8.3.4
More information about the Piglit
mailing list