tests: Work around a Metal bug in switch.shader_test.

The Metal bug was reported to Apple as FB15617433. Since we don't
care specifically about that bug, I'm just tweaking the test so that
it doesn't hit that bad path any more.
This commit is contained in:
Giovanni Mascellani 2024-11-05 22:10:38 +01:00 committed by Henri Verbeet
parent 7450c4a368
commit 026624a266
Notes: Henri Verbeet 2024-11-06 23:02:04 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1250

View File

@ -583,11 +583,14 @@ probe (0, 0) rgba (7.0, 8.0, 9.0, 10.0)
% return from a switch nested in a loop % return from a switch nested in a loop
[pixel shader fail(sm<4) todo(sm<4)] [pixel shader fail(sm<4) todo(sm<4)]
uint4 v; /* In theory this could be directly defined as uint4, but that hits some kind
* of optimization bug on Metal, which we work around this way. */
float4 vf;
float4 main() : sv_target float4 main() : sv_target
{ {
float4 c = {1.0, 2.0, 3.0, 4.0}; float4 c = {1.0, 2.0, 3.0, 4.0};
uint4 v = vf;
uint i, j; uint i, j;
for (i = 0; i < v.z; i++) for (i = 0; i < v.z; i++)
@ -608,12 +611,10 @@ float4 main() : sv_target
} }
[test] [test]
if(sm<4) uniform 0 float4 0 0 3 1 uniform 0 float4 0 0 3 1
if(sm>=4) uniform 0 uint4 0 0 3 1
todo(msl) draw quad todo(msl) draw quad
probe (0, 0) rgba (304.0, 305.0, 306.0, 307.0) probe (0, 0) rgba (304.0, 305.0, 306.0, 307.0)
if(sm<4) uniform 0 float4 1 0 3 1 uniform 0 float4 1 0 3 1
if(sm>=4) uniform 0 uint4 1 0 3 1
todo(msl) draw quad todo(msl) draw quad
probe (0, 0) rgba (3.0, 4.0, 5.0, 6.0) probe (0, 0) rgba (3.0, 4.0, 5.0, 6.0)