+[pixel shader] +uniform float4 x; + +float4 main() : sv_target +{ + if (x.x == 0.0f) discard; + return float4(1, 2, 3, 4); +} + +[test] +uniform 0 float4 1 0 0 0 +draw quad +probe all rgba (1, 2, 3, 4) +uniform 0 float4 0 0 0 0 +draw quad +probe all rgba (1, 2, 3, 4)
It's a bit unfortunate that simply ignoring "discard" would result in the test passing. It would seem helpful to either add support for clears to the shader runner (e.g., "clear (0, 1, 0, 0)") and use those here, or to pass the output colour as a uniform to the shader above and then use different colours for the two draws.