Skip to content

nir_lower_system_values: Fix load_global_invocation_id lowering when has_cs_global_id and has_base_work_group_id are true

When has_base_work_group_id is true, we should always lower load_global_invocation_id to the zero_base variant of it, since that lowering takes the base_work_group_id into account when computing the global ID.

Missing this caused problems for CLOn12 (which prefers load_global_invocation_id over a computed variant, since DXIL has a built-in for it) when we needed to loop kernel invocations internally due to small explicit local sizes.

Merge request reports