[Piglit] [PATCH] new test: glsl-fs-uniform-array-loop-unroll.shader_test

Frank Henigman fjhenigman at google.com
Mon Jan 28 17:04:23 PST 2013


In a loop, access past the end of a uniform array, to check
if stages after loop unrolling can handle the bad access.

Reproduces https://bugs.freedesktop.org/show_bug.cgi?id=59429

Signed-off-by: Frank Henigman <fjhenigman at google.com>
---
 .../glsl-fs-uniform-array-loop-unroll.shader_test    | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 tests/shaders/glsl-fs-uniform-array-loop-unroll.shader_test

diff --git a/tests/shaders/glsl-fs-uniform-array-loop-unroll.shader_test b/tests/shaders/glsl-fs-uniform-array-loop-unroll.shader_test
new file mode 100644
index 0000000..f306eec
--- /dev/null
+++ b/tests/shaders/glsl-fs-uniform-array-loop-unroll.shader_test
@@ -0,0 +1,20 @@
+# https://bugs.freedesktop.org/show_bug.cgi?id=59429
+
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+void main()
+{
+	gl_Position = vec4(0,0,0,0);
+}
+
+[fragment shader]
+uniform vec4 u[1];
+void main()
+{
+	vec4 c = vec4(0,0,0,0);
+	for (int i = 0; i < 2; ++i)
+		c += u[i];
+	gl_FragColor = c;
+}
-- 
1.8.1



More information about the Piglit mailing list