diff --git a/tests/hlsl/switch.shader_test b/tests/hlsl/switch.shader_test index 3898c777..9aa59175 100644 --- a/tests/hlsl/switch.shader_test +++ b/tests/hlsl/switch.shader_test @@ -583,11 +583,14 @@ probe (0, 0) rgba (7.0, 8.0, 9.0, 10.0) % return from a switch nested in a loop [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 c = {1.0, 2.0, 3.0, 4.0}; + uint4 v = vf; uint i, j; for (i = 0; i < v.z; i++) @@ -608,12 +611,10 @@ float4 main() : sv_target } [test] -if(sm<4) uniform 0 float4 0 0 3 1 -if(sm>=4) uniform 0 uint4 0 0 3 1 +uniform 0 float4 0 0 3 1 todo(msl) draw quad probe (0, 0) rgba (304.0, 305.0, 306.0, 307.0) -if(sm<4) uniform 0 float4 1 0 3 1 -if(sm>=4) uniform 0 uint4 1 0 3 1 +uniform 0 float4 1 0 3 1 todo(msl) draw quad probe (0, 0) rgba (3.0, 4.0, 5.0, 6.0)