@@ -1319,6 +1319,13 @@ import_glsl_parser_tests(spec['AMD_conservative_depth'],
os.path.join(testsDir, 'spec', 'amd_conservative_depth'),
[''])
+# Group ARB_arrays_of_arrays
+arb_arrays_of_arrays = {}
+spec['ARB_arrays_of_arrays'] = arb_arrays_of_arrays
+import_glsl_parser_tests(arb_arrays_of_arrays,
+ os.path.join(testsDir, 'spec', 'arb_arrays_of_arrays'),
+ ['compiler'])
+
# Group AMD_shader_trinary_minmax
spec['AMD_shader_trinary_minmax'] = {}
import_glsl_parser_tests(spec['AMD_shader_trinary_minmax'],
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()
+{
+ vec4[3][2] 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,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()
+{
+ vec4[2] a[3] = 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,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][3] a = vec4[3][3](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,16 @@
+/* [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[2](vec4(0.0), vec4(1.0)));
+
+ gl_Position = a[2][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()
+{
+ vec4 a[3][2] = 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,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[4][2] 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,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shading_language_420pack: enable
+
+void main()
+{
+ vec4 a[2][2] = {{ vec4(0.0), vec4(1.0) },
+ { vec4(0.0), vec4(1.0) },
+ { vec4(0.0), vec4(1.0) }};
+
+ gl_Position = a[2][1];
+}
new file mode 100644
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shading_language_420pack: enable
+
+void main()
+{
+ vec4 a[3][3] = {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,19 @@
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shading_language_420pack: enable
+
+void main()
+{
+ vec4 a[2][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,19 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shading_language_420pack: enable
+
+void main()
+{
+ vec4[3][2] a = {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,19 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shading_language_420pack: enable
+
+void main()
+{
+ vec4[3][2] a = {{ vec4(0.0), vec4(1.0) },
+ { vec4(0.0), vec4(1.0) },
+ { vec4(0.0), vec4(1.0) }};
+
+ gl_Position = a[2][1];
+}
new file mode 100644
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shading_language_420pack: enable
+
+void main()
+{
+ vec4[2] a[3] = {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,19 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shading_language_420pack: enable
+
+void main()
+{
+ vec4[2] a[3] = {{ vec4(0.0), vec4(1.0) },
+ { vec4(0.0), vec4(1.0) },
+ { vec4(0.0), vec4(1.0) }};
+
+ gl_Position = a[2][1];
+}
new file mode 100644
@@ -0,0 +1,19 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shading_language_420pack: enable
+
+void main()
+{
+ vec4 a[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,19 @@
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.20
+ * require_extensions: GL_ARB_arrays_of_arrays
+ * require_extensions: GL_ARB_shading_language_420pack
+ * [end config]
+ */
+#version 120
+#extension GL_ARB_arrays_of_arrays: enable
+#extension GL_ARB_shading_language_420pack: enable
+
+void main()
+{
+ vec4 a[3][2] = {{ vec4(0.0), vec4(1.0) },
+ { vec4(0.0), vec4(1.0) },
+ { vec4(0.0), vec4(1.0) }};
+
+ gl_Position = a[2][1];
+}
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-array-array-var.vert AMD: pass Nvida: pass Intel: pass constructor-array-var-array.vert AMD: pass Nvida: pass Intel: pass constructor-invalid.vert AMD: pass Nvida: pass Intel: pass constructor-invalid2.vert AMD: pass Nvida: pass Intel: pass constructor-var-array-array.vert AMD: pass Nvida: pass Intel: pass initialization-invalid.vert AMD: crash Nvida: pass Intel: pass initialization-invalid2.vert AMD: pass Nvida: pass Intel: pass initialization-invalid3.vert AMD: pass Nvida: pass Intel: pass initialization-invalid4.vert AMD: pass Nvida: pass Intel: pass initializer-array-array-var.vert AMD: pass Nvida: pass Intel: pass initializer-array-array-var2.vert AMD: pass Nvida: pass Intel: pass initializer-array-var-array.vert AMD: pass Nvida: pass Intel: pass initializer-array-var-array2.vert AMD: pass Nvida: pass Intel: pass initializer-var-array-array.vert AMD: pass Nvida: pass Intel: pass initializer-var-array-array2.vert AMD: pass Nvida: pass Intel: pass Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> --- tests/all.py | 7 +++++++ .../compiler/constructor-array-array-var.vert | 17 +++++++++++++++++ .../compiler/constructor-array-var-array.vert | 17 +++++++++++++++++ .../compiler/constructor-invalid.vert | 17 +++++++++++++++++ .../compiler/constructor-invalid2.vert | 16 ++++++++++++++++ .../compiler/constructor-var-array-array.vert | 17 +++++++++++++++++ .../compiler/initialization-invalid.vert | 17 +++++++++++++++++ .../compiler/initialization-invalid2.vert | 19 +++++++++++++++++++ .../compiler/initialization-invalid3.vert | 19 +++++++++++++++++++ .../compiler/initialization-invalid4.vert | 19 +++++++++++++++++++ .../compiler/initializer-array-array-var.vert | 19 +++++++++++++++++++ .../compiler/initializer-array-array-var2.vert | 19 +++++++++++++++++++ .../compiler/initializer-array-var-array.vert | 19 +++++++++++++++++++ .../compiler/initializer-array-var-array2.vert | 19 +++++++++++++++++++ .../compiler/initializer-var-array-array.vert | 19 +++++++++++++++++++ .../compiler/initializer-var-array-array2.vert | 19 +++++++++++++++++++ 16 files changed, 279 insertions(+) create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/constructor-array-array-var.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/constructor-array-var-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/constructor-invalid.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/constructor-invalid2.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/constructor-var-array-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid2.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid3.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initialization-invalid4.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-array-array-var.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-array-array-var2.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-array-var-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-array-var-array2.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-var-array-array.vert create mode 100644 tests/spec/arb_arrays_of_arrays/compiler/initializer-var-array-array2.vert