Francisco Casas (@fcasas) commented about tests/hlsl/sm1-const-folding.shader_test:
+% The uint value is never casted to int on SM1-3, just casted to float and treated as such +[pixel shader] +float4 main() : SV_TARGET +{
- int x = 3000000000u;
- return float4(x, 0.0, 0.0, 0.0);
+}
+[test] +draw quad +if(sm<4) todo probe all rgba (3.0e+009, 0.0, 0.0, 0.0) +if(sm>=4) probe all rgba (-1.29496730e+009, 0.0, 0.0, 0.0)
+% On SM1-5 (FXC) the literal is considered signed independently of its value and casted to uint; +% on SM1-3 compilation fails because the uint it would be negative
"the uint would be negative"?