[Piglit] [PATCH 4/4] link-uniform-array-size: New test for a bug in the GLSL compiler.

Eric Anholt eric at anholt.net
Wed Sep 7 12:24:52 PDT 2011


We were not marking any of a[] as used, so the array got truncated to
nothing.
---
 tests/shaders/link-uniform-array-size.shader_test |   25 +++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 tests/shaders/link-uniform-array-size.shader_test

diff --git a/tests/shaders/link-uniform-array-size.shader_test b/tests/shaders/link-uniform-array-size.shader_test
new file mode 100644
index 0000000..caebb92
--- /dev/null
+++ b/tests/shaders/link-uniform-array-size.shader_test
@@ -0,0 +1,25 @@
+[require]
+GLSL >= 1.20
+
+[vertex shader]
+
+void main()
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+#version 120
+uniform vec4 a[3];
+
+void main()
+{
+	vec4 b[3] = a;
+
+	gl_FragColor = b[2];
+}
+
+[test]
+uniform vec4 a[2] 0.0 1.0 0.0 0.0
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 0.0
-- 
1.7.5.4



More information about the Piglit mailing list