tests: Add a simple test for "discard".

Signed-off-by: Ethan Lee <flibitijibibo@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2023-04-20 22:29:26 -04:00 committed by Alexandre Julliard
parent e541e71532
commit 4fe4784e8a
Notes: Alexandre Julliard 2023-04-26 22:59:12 +02:00
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/136
2 changed files with 17 additions and 0 deletions

View File

@ -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 \

View File

@ -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)