tests: Add some tests for clip().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2023-06-08 12:35:02 +02:00 committed by Alexandre Julliard
parent b40179da3a
commit 6ef0213135
Notes: Alexandre Julliard 2023-06-27 23:33:42 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/211
2 changed files with 23 additions and 0 deletions

View File

@ -80,6 +80,7 @@ vkd3d_shader_tests = \
tests/hlsl-attributes.shader_test \
tests/hlsl-bool-cast.shader_test \
tests/hlsl-clamp.shader_test \
tests/hlsl-clip.shader_test \
tests/hlsl-comma.shader_test \
tests/hlsl-cross.shader_test \
tests/hlsl-d3dcolor-to-ubyte4.shader_test \

View File

@ -0,0 +1,22 @@
[pixel shader todo]
uniform float4 x;
float4 main() : sv_target
{
clip(x);
return x;
}
[test]
uniform 0 float4 1 2 3 4
todo draw quad
todo probe all rgba (1, 2, 3, 4)
uniform 0 float4 9 8 7 6
todo draw quad
todo probe all rgba (9, 8, 7, 6)
uniform 0 float4 -1 8 7 6
todo draw quad
todo probe all rgba (9, 8, 7, 6)
uniform 0 float4 9 0 7 6
todo draw quad
todo probe all rgba (9, 0, 7, 6)