[Piglit] [PATCH] glsl-1.20: More array-of-array tests
Ian Romanick
idr at freedesktop.org
Wed Oct 26 14:45:43 PDT 2011
From: Ian Romanick <ian.d.romanick at intel.com>
Function definitions, function declarations (prototypes), structure
definitions, and variable declarations go through slightly different
paths in the compiler. It seems worthwhile to try all four. There is
already a test for array-of-array variable declarations.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
...ay-of-array-function-parameter-declaration.vert | 19 +++++++++++++++++
...ray-of-array-function-parameter-definition.vert | 22 ++++++++++++++++++++
.../array-of-array-structure-field.vert | 21 +++++++++++++++++++
3 files changed, 62 insertions(+), 0 deletions(-)
create mode 100644 tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-of-array-function-parameter-declaration.vert
create mode 100644 tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-of-array-function-parameter-definition.vert
create mode 100644 tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-of-array-structure-field.vert
diff --git a/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-of-array-function-parameter-declaration.vert b/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-of-array-function-parameter-declaration.vert
new file mode 100644
index 0000000..27f009f
--- /dev/null
+++ b/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-of-array-function-parameter-declaration.vert
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * [end config]
+ *
+ * From page 19 (page 25 of the PDF) of the GLSL 1.20 spec:
+ *
+ * "Only one-dimensional arrays may be declared."
+ */
+#version 120
+
+attribute vec4 vert;
+
+void foo(vec4 [2] x[2]);
+
+void main()
+{
+ gl_Position = vert;
+}
diff --git a/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-of-array-function-parameter-definition.vert b/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-of-array-function-parameter-definition.vert
new file mode 100644
index 0000000..05e7cbc
--- /dev/null
+++ b/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-of-array-function-parameter-definition.vert
@@ -0,0 +1,22 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * [end config]
+ *
+ * From page 19 (page 25 of the PDF) of the GLSL 1.20 spec:
+ *
+ * "Only one-dimensional arrays may be declared."
+ */
+#version 120
+
+attribute vec4 vert;
+
+void foo(vec4 [2] x[2])
+{
+ gl_Position = vert;
+}
+
+void main()
+{
+ gl_Position = vert;
+}
diff --git a/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-of-array-structure-field.vert b/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-of-array-structure-field.vert
new file mode 100644
index 0000000..75be4ad
--- /dev/null
+++ b/tests/spec/glsl-1.20/compiler/structure-and-array-operations/array-of-array-structure-field.vert
@@ -0,0 +1,21 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * [end config]
+ *
+ * From page 19 (page 25 of the PDF) of the GLSL 1.20 spec:
+ *
+ * "Only one-dimensional arrays may be declared."
+ */
+#version 120
+
+attribute vec4 vert;
+
+struct S {
+ vec4 [2] x[2];
+};
+
+void main()
+{
+ gl_Position = vert;
+}
--
1.7.6.4
More information about the Piglit
mailing list