Slang emits select(bool3, float3, float3) as a ternary operation (?:) for HLSL target.
This has been removed in HLSL 2021 (with DXC 1.7, I believe), cause even simple code with select statements to fail to compile with DXC 1.7. The slang testing framework explicitly disables HLSL-2021 (in DXC 1.6, atleast) to side-step this issue, but this seems to be causing problems with users who are using the generated HLSL in their own frameworks with a more modern HLSL compiler.
Not quite sure what the fix should be, since emitting select as select in HLSL will mean that it does not compile with older DXC.
Should this be a switch, since it feels like HLSL pre-2021 & 2021 are just altogether different targets?
Slang emits
select(bool3, float3, float3)
as a ternary operation (?:
) for HLSL target.This has been removed in HLSL 2021 (with DXC 1.7, I believe), cause even simple code with select statements to fail to compile with DXC 1.7. The slang testing framework explicitly disables HLSL-2021 (in DXC 1.6, atleast) to side-step this issue, but this seems to be causing problems with users who are using the generated HLSL in their own frameworks with a more modern HLSL compiler.
Not quite sure what the fix should be, since emitting
select
asselect
in HLSL will mean that it does not compile with older DXC. Should this be a switch, since it feels like HLSL pre-2021 & 2021 are just altogether different targets?