[Piglit] [PATCH] glsl-1.10: Add vec4 test for gl_FrontFacing ternary usage.
Tapani Pälli
tapani.palli at intel.com
Mon Mar 30 01:11:49 PDT 2015
Test try_opt_frontfacing_ternary optimization when type is vec4,
this test fails with current Mesa HEAD (ce83a6e).
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
...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
More information about the Piglit
mailing list