Skip to content

microsoft/spirv_to_dxil: Properly handle load- and is_helper_invocation

On Vulkan 1.3+, where invocation demoting is introduced, gl_HelperInvocation is volatile. Therefore, the SPIR-V to NIR step can emit nir_is_helper_invocation.

In order for the NIR to DXIL step to handle such an opcode gracefully, since demoting to helper is not a thing in DXIL, it is safe to handle it like nir_load_helper_invocation.

Just for the records, at first I considered adding a nir_lower_is_helper_invocation pass, so tracking demotion was "emulated." However, that would be only valid if DXIL fell in the middle ground of providing demotion while at the same time failing to upgrade IsHelperLane() to being demote-aware.

CC @jenatali

Edited by Pedro J. Estébanez

Merge request reports