[Piglit] [PATCH V3 10/11] tests/spec: ARB_arrays_of_arrays assignment tests
Timothy Arceri
t_arceri at yahoo.com.au
Wed Jan 29 23:23:56 PST 2014
Test results are from the following hardware/driver combinations:
AMD Radeon HD 6670 - Catalyst 13.251 OpenGL 4.3
Nvidia GeForce 210 - NVIDIA 331.20 OpenGL 3.3
Intel Ivy Bridge - Mesa 10.1(815e064) with ARB_arrays_of_arrays enabled
assigment-invalid-implicit-sized.vert
AMD: fail
Nvida: fail
Intel: pass
assignment-1d-to-3d.vert
AMD: pass
Nvida: pass
Intel: pass
assignment-2d-to-3d-from-3d.vert
AMD: pass
Nvida: pass
Intel: pass
assignment-2d-to-3d.vert
AMD: pass
Nvida: pass
Intel: pass
assignment-array-array-var-array.vert
AMD: pass
Nvida: pass
Intel: pass
assignment-invalid-1d-to-3d.vert
AMD: pass
Intel: pass
Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
---
.../compiler/assigment-invalid-implicit-sized.vert | 28 ++++++++++++++++++++++
.../compiler/assignment-1d-to-3d.vert | 18 ++++++++++++++
.../compiler/assignment-2d-to-3d-from-3d.vert | 18 ++++++++++++++
.../compiler/assignment-2d-to-3d.vert | 18 ++++++++++++++
.../compiler/assignment-array-array-var-array.vert | 16 +++++++++++++
.../compiler/assignment-invalid-1d-to-3d.vert | 18 ++++++++++++++
6 files changed, 116 insertions(+)
create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/assigment-invalid-implicit-sized.vert
create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/assignment-1d-to-3d.vert
create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d-from-3d.vert
create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d.vert
create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/assignment-array-array-var-array.vert
create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/assignment-invalid-1d-to-3d.vert
diff --git a/tests/spec/arb_arrays_of_arrays/compiler/assigment-invalid-implicit-sized.vert b/tests/spec/arb_arrays_of_arrays/compiler/assigment-invalid-implicit-sized.vert
new file mode 100644
index 0000000..652109f
--- /dev/null
+++ b/tests/spec/arb_arrays_of_arrays/compiler/assigment-invalid-implicit-sized.vert
@@ -0,0 +1,28 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ *
+ * From page 20 (page 26 of the PDF) of the GLSL 1.20 spec:
+ *
+ * "However, implicitly sized arrays cannot be assigned to. Note, this is
+ * a rare case that initializers and assignments appear to have different
+ * semantics."
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+
+void main()
+{
+ float [][3] an_array;
+ float [3][3] an_array2;
+
+ an_array[0][2] = 0.0;
+ an_array[1][2] = 1.0;
+ an_array[2][2] = 2.0;
+
+ an_array = an_array2;
+
+ gl_Position = vec4(an_array[2][2]);
+}
diff --git a/tests/spec/arb_arrays_of_arrays/compiler/assignment-1d-to-3d.vert b/tests/spec/arb_arrays_of_arrays/compiler/assignment-1d-to-3d.vert
new file mode 100644
index 0000000..8addbbf
--- /dev/null
+++ b/tests/spec/arb_arrays_of_arrays/compiler/assignment-1d-to-3d.vert
@@ -0,0 +1,18 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+
+void main()
+{
+ vec4 a[4];
+ vec4[2][4] b[3];
+
+ b[2][1] = a;
+
+ gl_Position = b[0][1][1];
+}
diff --git a/tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d-from-3d.vert b/tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d-from-3d.vert
new file mode 100644
index 0000000..8cc3640
--- /dev/null
+++ b/tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d-from-3d.vert
@@ -0,0 +1,18 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+
+void main()
+{
+ vec4 a[4][2][4];
+ vec4[2][4] b[3];
+
+ b[0] = a[2];
+
+ gl_Position = b[0][1][1];
+}
diff --git a/tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d.vert b/tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d.vert
new file mode 100644
index 0000000..34037ec
--- /dev/null
+++ b/tests/spec/arb_arrays_of_arrays/compiler/assignment-2d-to-3d.vert
@@ -0,0 +1,18 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+
+void main()
+{
+ vec4 a[2][4];
+ vec4[2][4] b[3];
+
+ b[0] = a;
+
+ gl_Position = b[0][1][1];
+}
diff --git a/tests/spec/arb_arrays_of_arrays/compiler/assignment-array-array-var-array.vert b/tests/spec/arb_arrays_of_arrays/compiler/assignment-array-array-var-array.vert
new file mode 100644
index 0000000..a8e3b4b
--- /dev/null
+++ b/tests/spec/arb_arrays_of_arrays/compiler/assignment-array-array-var-array.vert
@@ -0,0 +1,16 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+
+void main()
+{
+ vec4 a[3][2][4];
+ vec4[2][4] b[3] = a;
+
+ gl_Position = a[2][1][1];
+}
diff --git a/tests/spec/arb_arrays_of_arrays/compiler/assignment-invalid-1d-to-3d.vert b/tests/spec/arb_arrays_of_arrays/compiler/assignment-invalid-1d-to-3d.vert
new file mode 100644
index 0000000..62fcbdb
--- /dev/null
+++ b/tests/spec/arb_arrays_of_arrays/compiler/assignment-invalid-1d-to-3d.vert
@@ -0,0 +1,18 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+
+void main()
+{
+ vec4 a[4];
+ vec4[2][4] b[3];
+
+ b = a;
+
+ gl_Position = b[0][1][1];
+}
--
1.8.4.2
More information about the Piglit
mailing list