Closed farzonl closed 2 months ago
This is unfortunate, but no. The demote to helper function are missing before SPIR-V version 1.6, so we cannot use them in universal1.5. I would recommend adding -fspv-extension=SPV_EXT_demote_to_helper_invocation.
See https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpDemoteToHelperInvocation.
There was an issue that fixed this for vulkan 1.3 here: https://github.com/microsoft/DirectXShaderCompiler/issues/5937.
Should the same fix be applied to universal 1.5?
Example code:
generates
OpKill
However using 1.3 produces
OpDemoteToHelperInvocation
SPIRV invocation: