tests: Test a couple of degenerate switch instances.

This commit is contained in:
Giovanni Mascellani 2024-01-12 10:47:21 +01:00 committed by Alexandre Julliard
parent 6cb7487fb0
commit 93100edb4b
Notes: Alexandre Julliard 2024-01-18 23:20:24 +01:00
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/568

View File

@ -28,6 +28,41 @@ uniform 0 uint4 0 0 0 0
draw quad
probe all rgba (3.0, 3.0, 3.0, 3.0)
% just a default case
[pixel shader]
uint4 v;
float4 main() : sv_target
{
switch (v.x)
{
default:
return 5.0;
}
}
[test]
uniform 0 uint4 3 0 0 0
draw quad
probe all rgba (5.0, 5.0, 5.0, 5.0)
uniform 0 uint4 1 0 0 0
draw quad
probe all rgba (5.0, 5.0, 5.0, 5.0)
uniform 0 uint4 0 0 0 0
draw quad
probe all rgba (5.0, 5.0, 5.0, 5.0)
% completely empty
[pixel shader fail]
uint4 v;
float4 main() : sv_target
{
switch (v.x)
{
}
}
% falling through is only supported for empty case statements
[pixel shader]
uint4 v;