[Piglit] [PATCH] glsl-copy-propagation-self-2: New test for a bug found in fixing #34006.

Eric Anholt eric at anholt.net
Mon Jan 9 13:35:38 PST 2012


---
 .../glsl-copy-propagation-self-2.shader_test       |   26 ++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100644 tests/shaders/glsl-copy-propagation-self-2.shader_test

diff --git a/tests/shaders/glsl-copy-propagation-self-2.shader_test b/tests/shaders/glsl-copy-propagation-self-2.shader_test
new file mode 100644
index 0000000..344bf96
--- /dev/null
+++ b/tests/shaders/glsl-copy-propagation-self-2.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.10
+
+[vertex shader]
+void main()
+{
+	gl_Position = gl_Vertex;
+}
+
+[fragment shader]
+uniform vec4 arg0;
+uniform float arg1;
+
+void main() {
+	vec4 R0;
+
+	R0.xyzw = arg0 + arg1;
+	R0.xyzw = R0.wwwx;
+	gl_FragColor.xyzw = clamp(R0.xyzw, 0.0, 1.0);
+}
+
+[test]
+uniform vec4 arg0 0.0 0.0 0.0 0.5
+uniform float arg1 0.0
+draw rect -1 -1 2 2
+probe all rgba 0.5 0.5 0.5 0.0
-- 
1.7.7.3



More information about the Piglit mailing list