You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I encountered a problem while compiling some shaders through dxcompile (normally we're using d3dcompile), with a cryptic validation error message.
Managed to narrow it down, and can reproduce with the attached shader: test.txt
Gives for output:
dxc -E ps_main -T ps_6_0 test.hlsl
error: validation errors
at 0x280ab609bc0 inside block #0 of function ps_main DXIL intrinsic overload must be valid
Validation failed.
My guess is that it can't decide whether to implicitly convert the ?: result from float3 down to float, or bump the 1.0 second dot argument up to float3. I think some improved error message for this would be useful (didn't get any line number or anything) :)
The text was updated successfully, but these errors were encountered:
Thanks for reporting! It looks like the ternary operator with two literal float values resolves to the double type, which there is no overload of dot for. The poor error message would be because the semantic analysis thinks there is a dot overload for double but the codegen disagrees. A workaround is to suffix the two values with f.
Hey, I encountered a problem while compiling some shaders through dxcompile (normally we're using d3dcompile), with a cryptic validation error message.
Managed to narrow it down, and can reproduce with the attached shader: test.txt
Gives for output:
My guess is that it can't decide whether to implicitly convert the ?: result from float3 down to float, or bump the 1.0 second dot argument up to float3. I think some improved error message for this would be useful (didn't get any line number or anything) :)
The text was updated successfully, but these errors were encountered: