[Piglit] [PATCH 1/3] ssa: Add a test for the classic "swap problem" in out-of-SSA translation

Jason Ekstrand jason at jlekstrand.net
Sat Dec 13 13:26:01 PST 2014


---
 tests/shaders/ssa/fs-swap-problem.shader_test | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 tests/shaders/ssa/fs-swap-problem.shader_test

diff --git a/tests/shaders/ssa/fs-swap-problem.shader_test b/tests/shaders/ssa/fs-swap-problem.shader_test
new file mode 100644
index 0000000..2cf03ff
--- /dev/null
+++ b/tests/shaders/ssa/fs-swap-problem.shader_test
@@ -0,0 +1,19 @@
+[require]
+GLSL >= 1.10
+
+[fragment shader]
+uniform bool f;
+
+void main()
+{
+    gl_FragColor = vec4(1, 0, 0, 1);
+    do {
+        gl_FragColor.xy = gl_FragColor.yx;
+    } while (f);
+}
+
+[test]
+uniform int f = 0
+
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 1.0
-- 
2.2.0



More information about the Piglit mailing list