On Thu, Feb 17, 2022 at 5:17 PM Francisco Casas fcasas@codeweavers.com wrote:
Hello,
February 16, 2022 2:47 AM, "Zebediah Figura" zfigura@codeweavers.com wrote:
+% You can't cast an inout parameter, though.
+[pixel shader fail]
+void func(inout float4 a) +{
- a += 0.1;
+}
+float4 main(uniform int4 i) : sv_target +{
- int4 x = i;
- func((float4)x);
- return x;
+}
2.34.1
For some reason the shader actually compiles using ps_3_0 and lower. Maybe a [require] should be added? Or maybe, we should just allow it always.
Nice catch! On SM1, aside from some very specific cases, only floats really exist. In particular, mathematical expressions only apply to floats and, indeed, the native compiler generates a float uniform for 'i'. I guess the cast is implicitly dropped when compiling for e.g. ps_2_0 so there is no error there.
I resent the patch without this test for the time being.