Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- Makefile.am | 4 ++++ tests/hlsl-return-implicit-conversion.shader_test | 9 +++++++++ tests/hlsl-return-void.shader_test | 11 +++++++++++ 3 files changed, 24 insertions(+) create mode 100644 tests/hlsl-return-implicit-conversion.shader_test create mode 100644 tests/hlsl-return-void.shader_test
diff --git a/Makefile.am b/Makefile.am index c6d9b063..efe0c7cc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -52,6 +52,8 @@ vkd3d_shader_runners = \ vkd3d_shader_tests = \ tests/conditional.shader_test \ tests/hlsl-comma.shader_test \ + tests/hlsl-return-implicit-conversion.shader_test \ + tests/hlsl-return-void.shader_test \ tests/hlsl-vector-indexing.shader_test \ tests/hlsl-vector-indexing-uniform.shader_test \ tests/math.shader_test \ @@ -185,6 +187,8 @@ SHADER_TEST_LOG_COMPILER = tests/shader_runner_d3d12 XFAIL_TESTS = \ tests/conditional.shader_test \ tests/hlsl-comma.shader_test \ + tests/hlsl-return-implicit-conversion.shader_test \ + tests/hlsl-return-void.shader_test \ tests/hlsl-vector-indexing.shader_test \ tests/hlsl-vector-indexing-uniform.shader_test \ tests/math.shader_test \ diff --git a/tests/hlsl-return-implicit-conversion.shader_test b/tests/hlsl-return-implicit-conversion.shader_test new file mode 100644 index 00000000..527387b3 --- /dev/null +++ b/tests/hlsl-return-implicit-conversion.shader_test @@ -0,0 +1,9 @@ +[pixel shader] +float4 main() : sv_target +{ + return float2x2(0.4, 0.3, 0.2, 0.1); +} + +[test] +draw quad +probe all rgba (0.4, 0.3, 0.2, 0.1) diff --git a/tests/hlsl-return-void.shader_test b/tests/hlsl-return-void.shader_test new file mode 100644 index 00000000..1948ec51 --- /dev/null +++ b/tests/hlsl-return-void.shader_test @@ -0,0 +1,11 @@ +[pixel shader] +void main(out float4 ret : sv_target) +{ + ret = float4(0.1, 0.2, 0.3, 0.4); + return; + ret = float4(0.5, 0.6, 0.7, 0.8); +} + +[test] +draw quad +probe all rgba (0.1, 0.2, 0.3, 0.4)