- doit = vec && (ShouldIDoIt(vec) || !ShouldINotDoIt(vec));
+ doit = and(vec, or(ShouldIDoIt(vec), !ShouldINotDoIt(vec)));
While possible (changing countLeadingZeros() and select() writing is enough to pass CI), fxc does not support HLSL 2021 (and the and(), or() and select() intrinsics are only available in HLSL 2021).
Ideally we should be forward compatible. [..] I think we are running into this issue only for the select implementation; we can either take the language version as a parameter or inject a polyfill for vector conditions regardless of version.
Naga currently generates hlsl that is not valid HLSL 2021, as there binary logic operators can only be used with scalars, so we need to change generation:
While possible (changing
countLeadingZeros()
andselect()
writing is enough to pass CI), fxc does not support HLSL 2021 (and theand()
,or()
andselect()
intrinsics are only available in HLSL 2021).In gfx-rs/naga#2447 we worked around the DX Compiler release for August 2023 making HLSL 2021 the default by specifying
-HV 2018
in CI, but:This issue is tracking that.