diff --git a/tests/hlsl/ternary.shader_test b/tests/hlsl/ternary.shader_test index 1d75c858c..648e94ffd 100644 --- a/tests/hlsl/ternary.shader_test +++ b/tests/hlsl/ternary.shader_test @@ -70,6 +70,41 @@ uniform 8 float4 5.0 6.0 7.0 8.0 draw quad probe (0, 0) rgba (5.0, 2.0, 7.0, 4.0) +[pixel shader todo(sm<4)] +int4 x, y, z; + +float4 main() : sv_target +{ + return x ? y : z; +} + +[test] +if(sm<4) uniform 0 float4 0.0 1.0 0.0 -3.0 +if(sm<4) uniform 4 float4 1.0 2.0 3.0 4.0 +if(sm<4) uniform 8 float4 5.0 6.0 7.0 8.0 +if(sm>=4) uniform 0 int4 0 1 0 -3 +if(sm>=4) uniform 4 int4 1 2 3 4 +if(sm>=4) uniform 8 int4 5 6 7 8 +todo(sm<4) draw quad +probe (0, 0) f32(5.0, 2.0, 7.0, 4.0) + +[pixel shader todo(sm<4)] +uint4 x, y, z; + +float4 main() : sv_target +{ + return x ? y : z; +} + +[test] +if(sm<4) uniform 0 float4 0.0 1.0 0.0 3.0 +if(sm<4) uniform 4 float4 1.0 2.0 3.0 4.0 +if(sm<4) uniform 8 float4 5.0 6.0 7.0 8.0 +if(sm>=4) uniform 0 uint4 0 1 0 3 +if(sm>=4) uniform 4 uint4 1 2 3 4 +if(sm>=4) uniform 8 uint4 5 6 7 8 +todo(sm<4) draw quad +probe (0, 0) f32(5.0, 2.0, 7.0, 4.0) % The usual type conversion is applied to the first and second expression, as % long as they are numeric.