nak: Do not allow load_helper_invocation reordering

load_helper_invocation can not be reordered past a demote.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 7ece220f96 ("nak/nir: Lower systm values before lowering I/O")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
(cherry picked from commit cba5841d61)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
This commit is contained in:
Mary Guillemard 2026-03-20 17:45:57 +01:00 committed by Eric Engestrom
parent d4c73521c5
commit 79c1ff9077
2 changed files with 3 additions and 4 deletions

View file

@ -4844,7 +4844,7 @@
"description": "nak: Do not allow load_helper_invocation reordering",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "7ece220f968e1c8f9a7e09da1c0640dd8ff9f170",
"notes": null

View file

@ -531,7 +531,6 @@ nak_nir_lower_system_value_intrin(nir_builder *b, nir_intrinsic_instr *intrin,
}
case nir_intrinsic_load_subgroup_invocation:
case nir_intrinsic_load_helper_invocation:
case nir_intrinsic_load_invocation_id:
case nir_intrinsic_load_workgroup_id: {
const gl_system_value sysval =
@ -602,8 +601,8 @@ nak_nir_lower_system_value_intrin(nir_builder *b, nir_intrinsic_instr *intrin,
}
break;
case nir_intrinsic_is_helper_invocation: {
/* Unlike load_helper_invocation, this one isn't re-orderable */
case nir_intrinsic_is_helper_invocation:
case nir_intrinsic_load_helper_invocation: {
val = nak_nir_load_sysval(b, NAK_SV_THREAD_KILL, 0);
break;
}