Zebediah Figura (@zfigura) commented about tests/hlsl/function-cast.shader_test:
% As above, but cast "x" to float4 first.
-[pixel shader todo] +[pixel shader todo fail(sm>=6)]
Ah. I suspect that what's happening here is that a cast implicitly promotes the type to const. The actual error message is:
``` C:\local\Temp\2387cbc9-503b-47ce-a11f-204822c74f45.hlsl:12:5: error: no matching function for call to 'func' func((float4)x); ^~~~ C:\local\Temp\2387cbc9-503b-47ce-a11f-204822c74f45.hlsl:4:6: note: candidate function void func(out float4 o) ^ ```
You get the same error if you remove the cast and declare "x" as const. I think it's rejecting the function because "o" is an output parameter in that case.
Not that this particularly matters in terms of review, but I was curious what was causing that error. Maybe it could be marked in a comment.