From: Giovanni Mascellani gmascellani@codeweavers.com
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- v2: Resolved conflict with Zebediah's patches in Makefile.am.
Makefile.am | 2 ++ tests/hlsl-bool-cast.shader_test | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/hlsl-bool-cast.shader_test
diff --git a/Makefile.am b/Makefile.am index 3c18c318..05d9f00c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -56,6 +56,7 @@ vkd3d_shader_runners = \ vkd3d_shader_tests = \ tests/conditional.shader_test \ tests/hlsl-array-dimension.shader_test \ + tests/hlsl-bool-cast.shader_test \ tests/hlsl-clamp.shader_test \ tests/hlsl-comma.shader_test \ tests/hlsl-duplicate-modifiers.shader_test \ @@ -267,6 +268,7 @@ SHADER_TEST_LOG_COMPILER = tests/shader_runner_d3d12 XFAIL_TESTS = \ tests/conditional.shader_test \ tests/hlsl-array-dimension.shader_test \ + tests/hlsl-bool-cast.shader_test \ tests/hlsl-clamp.shader_test \ tests/hlsl-comma.shader_test \ tests/hlsl-duplicate-modifiers.shader_test \ diff --git a/tests/hlsl-bool-cast.shader_test b/tests/hlsl-bool-cast.shader_test new file mode 100644 index 00000000..8880b2f5 --- /dev/null +++ b/tests/hlsl-bool-cast.shader_test @@ -0,0 +1,14 @@ +[pixel shader] +float4 main() : SV_TARGET +{ + return float4( + (float)(bool)0.0, + (float)(bool)0, + (float)(bool)2.0, + (float)(bool)2 + ); +} + +[test] +draw quad +probe all rgba (0.0, 0.0, 1.0, 1.0)