Test try_opt_frontfacing_ternary optimization when type is vec4,
this test fails with current Mesa HEAD (ce83a6e).

Signed-off-by: Tapani Pälli <[email protected]>
---
 ...rontfacing-ternary-vec4-neg-1.0-1.0.shader_test | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 
tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-vec4-neg-1.0-1.0.shader_test

diff --git 
a/tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-vec4-neg-1.0-1.0.shader_test
 
b/tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-vec4-neg-1.0-1.0.shader_test
new file mode 100644
index 0000000..74223e9
--- /dev/null
+++ 
b/tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-vec4-neg-1.0-1.0.shader_test
@@ -0,0 +1,24 @@
+#
+# Shader for testing try_opt_frontfacing_ternary optimization
+# in the i965 driver with a vec4 type.
+#
+[require]
+GLSL >= 1.10
+
+[vertex shader passthrough]
+
+[fragment shader]
+void main()
+{
+       vec4 foo;
+       if (gl_FrontFacing)
+               foo = vec4(-1.0);
+       else
+               foo = vec4(1.0);
+
+       gl_FragColor = vec4(1.5 + foo);
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgb 0.5 0.5 0.5
-- 
2.1.0

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to