new file mode 100644
@@ -0,0 +1,63 @@
+# test calling subroutine uniforms in an array
+# with a constant value works.
+[require]
+GLSL >= 1.50
+GL_ARB_shader_subroutine
+GL_ARB_arrays_of_arrays
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 150
+#extension GL_ARB_shader_subroutine: enable
+#extension GL_ARB_arrays_of_arrays: enable
+
+out vec4 color;
+
+subroutine float getchan1();
+
+subroutine uniform getchan1 GetChan1[2][2];
+
+subroutine(getchan1)
+float chan_full()
+{
+ return 1.0;
+}
+
+subroutine(getchan1)
+float chan_half()
+{
+ return 0.5;
+}
+
+subroutine(getchan1)
+float chan_quarter()
+{
+ return 0.25;
+}
+
+subroutine(getchan1)
+float chan_empty()
+{
+ return 0.0;
+}
+
+void main()
+{
+ color = vec4(GetChan1[1][1](), GetChan1[1][0](), GetChan1[0][0](), 1.0);
+}
+
+
+[test]
+clear color 0.0 0.0 1.0 0.0
+clear
+subuniform GL_FRAGMENT_SHADER GetChan1[1][1] chan_full
+subuniform GL_FRAGMENT_SHADER GetChan1[1][0] chan_empty
+subuniform GL_FRAGMENT_SHADER GetChan1[0][0] chan_quarter
+draw rect -1 -1 2 2
+probe all rgba 1.0 0.0 0.25 1.0
+subuniform GL_FRAGMENT_SHADER GetChan1[1][1] chan_empty
+subuniform GL_FRAGMENT_SHADER GetChan1[1][0] chan_full
+subuniform GL_FRAGMENT_SHADER GetChan1[0][0] chan_half
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.5 1.0