new file mode 100644
@@ -0,0 +1,33 @@
+// Instance names for uniforms can differ check
+// that the shaders link successfully.
+
+[require]
+GLSL >= 1.50
+GL_ARB_arrays_of_arrays
+
+[vertex shader]
+#extension GL_ARB_arrays_of_arrays: enable
+
+uniform Foo {
+ vec4 x;
+} foo[3][4];
+
+void main()
+{
+ gl_Position = vec4(foo[0][1].x);
+}
+
+[fragment shader]
+#extension GL_ARB_arrays_of_arrays: enable
+
+uniform Foo {
+ vec4 x;
+} bar[3][4];
+
+void main()
+{
+ gl_FragColor = bar[0][2].x;
+}
+
+[test]
+link success
new file mode 100644
@@ -0,0 +1,41 @@
+// From the GLSL 1.50 spec, section 4.3.7 (Interface Blocks):
+//
+// Furthermore, if a matching block is declared as an array, then
+// the array sizes must also match (or follow array matching rules
+// for the interface between a vertex and a geometry shader).
+//
+// In this test, we create a uniform block array in both
+// the vertex and fragment shaders, using different array sizes. The
+// instance name of the interface differs across shaders. Then we
+// check that the implementation correctly reported an error.
+
+[require]
+GLSL >= 1.50
+GL_ARB_arrays_of_arrays
+
+[vertex shader]
+#extension GL_ARB_arrays_of_arrays: enable
+
+uniform Foo {
+ vec4 x;
+} foo[2][5];
+
+void main()
+{
+ gl_Position = vec4(foo[0][1].x);
+}
+
+[fragment shader]
+#extension GL_ARB_arrays_of_arrays: enable
+
+uniform Foo {
+ vec4 x;
+} bar[2][4];
+
+void main()
+{
+ gl_FragColor = bar[0][2].x;
+}
+
+[test]
+link error