diff options
author | Tapani Pälli <tapani.palli@intel.com> | 2015-03-30 11:11:49 +0300 |
---|---|---|
committer | Tapani Pälli <tapani.palli@intel.com> | 2015-03-31 07:49:51 +0300 |
commit | 5344756ab174dd996fbd26c96c20c2bc28f4900c (patch) | |
tree | 7e0c1eb004b1849ad04afebe3f4294d618d2b9fd | |
parent | c1e97c5e87bd1f654e5722ab8c214d80d62ff675 (diff) |
glsl-1.10: Add vec4 test for gl_FrontFacing ternary usage.
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@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
-rw-r--r-- | tests/spec/glsl-1.10/execution/fs-frontfacing-ternary-vec4-neg-1.0-1.0.shader_test | 24 |
1 files changed, 24 insertions, 0 deletions
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 000000000..74223e9cf --- /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 |