new file mode 100644
@@ -0,0 +1,17 @@
+/* [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[3] a = vec4[3][2](vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)));
+
+ gl_Position = a[2][1];
+}
new file mode 100644
@@ -0,0 +1,20 @@
+/* [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[3][2] a = vec4[3][2](vec4[2][2](vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0))),
+ vec4[2][2](vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0))),
+ vec4[2][2](vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0))));
+
+ gl_Position = a[2][1];
+}
new file mode 100644
@@ -0,0 +1,17 @@
+/* [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[3][2] a = vec4[3][2](vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[3](vec4(0.0), vec4(1.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)));
+
+ gl_Position = a[2][1];
+}
new file mode 100644
@@ -0,0 +1,17 @@
+/* [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[3][2] a = vec4[3][2](vec3[2](vec3(0.0), vec3(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0)));
+
+ gl_Position = a[2][1];
+}
new file mode 100644
@@ -0,0 +1,20 @@
+/* [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][2] = vec4[3][2][2](vec4[2][2](vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0))),
+ vec4[2][2](vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0))),
+ vec4[2][2](vec4[2](vec4(0.0), vec4(1.0)),
+ vec4[2](vec4(0.0), vec4(1.0))));
+
+ gl_Position = a[2][1][1];
+}
new file mode 100644
@@ -0,0 +1,17 @@
+/* [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()
+{
+ float x[][2] = float[][2](float[2](1., 2.),
+ float[2](1., 2.),
+ float[2](1., 2.));
+
+ gl_Position = vec4(x[0][0]);
+}
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 constructor-arrays-of-arrays-same-size.vert AMD: pass Nvida: pass Intel: pass constructor-invalid-assignment.vert AMD: crash Nvida: pass Intel: pass constructor-invalid-dimensions-mismatch.vert AMD: pass Nvida: pass Intel: pass constructor-invalid-element-to-big.vert AMD: pass Nvida: pass Intel: pass constructor-invalid-type.vert AMD: pass Nvida: pass Intel: pass constructor-three-dimensions.vert AMD: pass Nvida: pass Intel: pass constructor-unsized.vert AMD: pass Nvida: pass Intel: pass Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> --- .../compiler/constructor-invalid-assignment.vert | 17 +++++++++++++++++ .../constructor-invalid-dimensions-mismatch.vert | 20 ++++++++++++++++++++ .../compiler/constructor-invalid-element-to-big.vert | 17 +++++++++++++++++ .../compiler/constructor-invalid-type.vert | 17 +++++++++++++++++ .../compiler/constructor-three-dimensions.vert | 20 ++++++++++++++++++++ .../compiler/constructor-unsized.vert | 17 +++++++++++++++++ 6 files changed, 108 insertions(+) create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/constructor-invalid-assignment.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/constructor-invalid-dimensions-mismatch.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/constructor-invalid-element-to-big.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/constructor-invalid-type.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/constructor-three-dimensions.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/constructor-unsized.vert