Module: vkd3d Branch: master Commit: 4fe4784e8ade50549ebf496639c47987b09c30b7 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/4fe4784e8ade50549ebf496639c479...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Thu Apr 20 22:29:26 2023 -0400
tests: Add a simple test for "discard".
Signed-off-by: Ethan Lee flibitijibibo@gmail.com Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
---
Makefile.am | 1 + tests/hlsl-discard.shader_test | 16 ++++++++++++++++ 2 files changed, 17 insertions(+)
diff --git a/Makefile.am b/Makefile.am index 549354b4..3f1ec171 100644 --- a/Makefile.am +++ b/Makefile.am @@ -76,6 +76,7 @@ vkd3d_shader_tests = \ tests/hlsl-clamp.shader_test \ tests/hlsl-comma.shader_test \ tests/hlsl-cross.shader_test \ + tests/hlsl-discard.shader_test \ tests/hlsl-dot.shader_test \ tests/hlsl-duplicate-modifiers.shader_test \ tests/hlsl-for.shader_test \ diff --git a/tests/hlsl-discard.shader_test b/tests/hlsl-discard.shader_test new file mode 100644 index 00000000..f543f877 --- /dev/null +++ b/tests/hlsl-discard.shader_test @@ -0,0 +1,16 @@ +[pixel shader] +uniform float4 x; + +float4 main() : sv_target +{ + if (x.x == 9.0f) discard; + return x; +} + +[test] +uniform 0 float4 1 2 3 4 +draw quad +probe all rgba (1, 2, 3, 4) +uniform 0 float4 9 8 7 6 +draw quad +probe all rgba (1, 2, 3, 4)