aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Henigman <fjhenigman@google.com>2013-01-28 20:04:23 -0500
committerEric Anholt <eric@anholt.net>2013-04-10 10:22:29 -0700
commit3adb7bf1e81d7a98455b18af584fd2144310eb76 (patch)
treea4228557c3013be93e2799067df94ffc2c76c525
parentf0b6f7a34fd82d040d3d1d64eefd27e23573ae32 (diff)
downloadpiglit-3adb7bf1e81d7a98455b18af584fd2144310eb76.tar.gz
new test: glsl-fs-uniform-array-loop-unroll.shader_test
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@google.com> Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r--tests/shaders/glsl-fs-uniform-array-loop-unroll.shader_test20
1 files changed, 20 insertions, 0 deletions
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 00000000..f306eec9
--- /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;
+}