[Piglit] [PATCH] glsl-1.10: test for rotating a variable components in a loop
Dave Airlie
airlied at gmail.com
Tue Sep 1 18:02:59 PDT 2015
From: Dave Airlie <airlied at redhat.com>
This test fails on r600 with sb enabled, it does something
similiar to what a lot of the CTS test cases do.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
.../fs-while-loop-rotate-value.shader_test | 32 ++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 tests/spec/glsl-1.10/execution/fs-while-loop-rotate-value.shader_test
diff --git a/tests/spec/glsl-1.10/execution/fs-while-loop-rotate-value.shader_test b/tests/spec/glsl-1.10/execution/fs-while-loop-rotate-value.shader_test
new file mode 100644
index 0000000..cb08b0f
--- /dev/null
+++ b/tests/spec/glsl-1.10/execution/fs-while-loop-rotate-value.shader_test
@@ -0,0 +1,32 @@
+# test to check a bug in r600 sb backend
+# it miscompiles this due to the 1.0
+# at the end wierdly.
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+void main()
+{
+ gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+uniform int count;
+uniform vec4 init_val;
+
+void main()
+{
+ vec4 out_val = init_val;
+ int i = 0;
+ while (i++ < count) {
+ out_val = out_val.yzwx;
+ }
+ gl_FragColor = vec4(out_val.xyz, 1.0);
+}
+
+[test]
+uniform int count 3
+uniform vec4 init_val 0.25 0.5 0.75 1.0
+
+draw rect -1 -1 2 2
+probe all rgba 1.0 0.25 0.5 1.0
--
2.4.3
More information about the Piglit
mailing list