[Piglit] [PATCH] gs: Additional tests that geometry shader inputs must be arrays.
Paul Berry
stereotype441 at gmail.com
Mon Aug 12 07:17:31 PDT 2013
This should be squashed with "gs: Test that geometry shader inputs
must be arrays."
---
...nput-nonarray-named-block-containing-array.geom | 23 ++++++++++++++++++++++
...ut-nonarray-unnamed-block-containing-array.geom | 23 ++++++++++++++++++++++
2 files changed, 46 insertions(+)
create mode 100644 tests/spec/glsl-1.50/compiler/gs-input-nonarray-named-block-containing-array.geom
create mode 100644 tests/spec/glsl-1.50/compiler/gs-input-nonarray-unnamed-block-containing-array.geom
diff --git a/tests/spec/glsl-1.50/compiler/gs-input-nonarray-named-block-containing-array.geom b/tests/spec/glsl-1.50/compiler/gs-input-nonarray-named-block-containing-array.geom
new file mode 100644
index 0000000..a2ec26a
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-input-nonarray-named-block-containing-array.geom
@@ -0,0 +1,23 @@
+// 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, even if everything in the block
+// is itself an array.
+//
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: false
+// [end config]
+
+#version 150
+
+in blk {
+ vec4 foo[3];
+} ifc_name;
diff --git a/tests/spec/glsl-1.50/compiler/gs-input-nonarray-unnamed-block-containing-array.geom b/tests/spec/glsl-1.50/compiler/gs-input-nonarray-unnamed-block-containing-array.geom
new file mode 100644
index 0000000..5289541
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/gs-input-nonarray-unnamed-block-containing-array.geom
@@ -0,0 +1,23 @@
+// 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, even if everything in the block
+// is itself an array.
+//
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// check_link: false
+// [end config]
+
+#version 150
+
+in blk {
+ vec4 foo[3];
+};
--
1.8.3.4
More information about the Piglit
mailing list