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
{{ message }}
Repository navigation
Validation error "DXIL intrinsic overload must be valid" #2202
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) :)
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.
Activity
tristanlabelle commentedon May 22, 2019
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
dotfor. The poor error message would be because the semantic analysis thinks there is adotoverload fordoublebut the codegen disagrees. A workaround is to suffix the two values withf.llvm-beanz commentedon Jun 11, 2024
Godbolt link: https://godbolt.org/z/e54rbcoPn
Clang does not exhibit this bug, but it is still present in DXC.
Add batch 005 triage; fix invalid-probe on diagnostic-symptom issues
triage: batch 006 (microsoft#2128, microsoft#2331, microsoft#2528, mi…