new file mode 100644
@@ -0,0 +1,13 @@
+/* [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
+
+uniform vec4[3][2] an_array;
+
+int foo[an_array.length() == 3 ? 1 : -1];
+int foo2[an_array[1].length() == 2 ? 1 : -1];
new file mode 100644
@@ -0,0 +1,13 @@
+/* [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
+
+uniform vec4[2] an_array[3];
+
+int foo[an_array.length() == 3 ? 1 : -1];
+int foo2[an_array[1].length() == 2 ? 1 : -1];
new file mode 100644
@@ -0,0 +1,13 @@
+/* [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
+
+uniform vec4 an_array[3][2];
+
+int foo[an_array.length() == 3 ? 1 : -1];
+int foo2[an_array[1].length() == 2 ? 1 : -1];
new file mode 100644
@@ -0,0 +1,15 @@
+/* [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
+
+uniform vec4[2][4] an_array;
+
+void main()
+{
+ gl_Position = an_array[1][3];
+}
new file mode 100644
@@ -0,0 +1,15 @@
+/* [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
+
+uniform vec4[4] an_array[2];
+
+void main()
+{
+ gl_Position = an_array[1][3];
+}
new file mode 100644
@@ -0,0 +1,15 @@
+/* [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
+
+uniform vec4 an_array[2][4];
+
+void main()
+{
+ gl_Position = an_array[1][3];
+}
new file mode 100644
@@ -0,0 +1,15 @@
+/* [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
+
+uniform vec4[2][4] an_array;
+
+void main()
+{
+ gl_Position = an_array[1][4];
+}
new file mode 100644
@@ -0,0 +1,15 @@
+/* [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
+
+uniform vec4[4] an_array[2];
+
+void main()
+{
+ gl_Position = an_array[1][4];
+}
new file mode 100644
@@ -0,0 +1,15 @@
+/* [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
+
+uniform vec4 an_array[2][4];
+
+void main()
+{
+ gl_Position = an_array[1][4];
+}
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 length-array-array-var.vert AMD: pass Nvida: pass Intel: pass length-array-var-array.vert AMD: pass Nvida: pass Intel: pass length-var-array-array.vert AMD: pass Nvida: pass Intel: pass maxbounds-access-array-array-var.vert AMD: pass Nvida: pass Intel: pass maxbounds-access-array-var-array.vert AMD: pass Nvida: pass Intel: pass maxbounds-access-var-array-array.vert AMD: pass Nvida: pass Intel: pass outofbounds-access-array-array-var.vert AMD: pass Nvida: fail (Nvidia only warns for outofbounds) Intel: pass outofbounds-access-array-var-array.vert AMD: pass Nvida: fail (Nvidia only warns for outofbounds) Intel: pass outofbounds-access-var-array-array.vert AMD: pass Nvida: fail (Nvidia only warns for outofbounds) Intel: pass Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> --- .../compiler/length-array-array-var.vert | 13 +++++++++++++ .../compiler/length-array-var-array.vert | 13 +++++++++++++ .../compiler/length-var-array-array.vert | 13 +++++++++++++ .../compiler/maxbounds-access-array-array-var.vert | 15 +++++++++++++++ .../compiler/maxbounds-access-array-var-array.vert | 15 +++++++++++++++ .../compiler/maxbounds-access-var-array-array.vert | 15 +++++++++++++++ .../compiler/outofbounds-access-array-array-var.vert | 15 +++++++++++++++ .../compiler/outofbounds-access-array-var-array.vert | 15 +++++++++++++++ .../compiler/outofbounds-access-var-array-array.vert | 15 +++++++++++++++ 9 files changed, 129 insertions(+) create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/length-array-array-var.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/length-array-var-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/length-var-array-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/maxbounds-access-array-array-var.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/maxbounds-access-array-var-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/maxbounds-access-var-array-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/outofbounds-access-array-array-var.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/outofbounds-access-array-var-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/outofbounds-access-var-array-array.vert