summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2015-03-23 09:50:27 +0200
committerTapani Pälli <tapani.palli@intel.com>2015-03-24 08:08:00 +0200
commit23c0f58b87c2eb2b45f4016c1063e6c512c89308 (patch)
treeef1732097024a0213199e0546dd4f151ae6570e6
parenta3c6c6fa7313c08694009e99863da2c7755a9e32 (diff)
glsl-1.20: test intrastage linking with const arrays
Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
-rw-r--r--tests/spec/glsl-1.20/linker/intrastage-const-arrays.shader_test22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.20/linker/intrastage-const-arrays.shader_test b/tests/spec/glsl-1.20/linker/intrastage-const-arrays.shader_test
new file mode 100644
index 000000000..d3643584a
--- /dev/null
+++ b/tests/spec/glsl-1.20/linker/intrastage-const-arrays.shader_test
@@ -0,0 +1,22 @@
+# Test linking two shaders which both have array of constants.
+# https://bugs.freedesktop.org/show_bug.cgi?id=89590
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+uniform int index;
+void main() {
+ const float zs[4] = float[4](0, 0, 0, 0);
+ gl_Position = vec4(zs[index]);
+}
+
+[fragment shader]
+uniform int index;
+void main()
+{
+ const vec4 colours[2] = vec4[2](vec4(1, 0, 0, 0), vec4(0, 1, 0, 0));
+ gl_FragColor = vec4(colours[index].x);
+}
+
+[test]
+link success