From eefede55494b99cbef34ae8be642ccde6f157ee6 Mon Sep 17 00:00:00 2001 From: Aitor Camacho Date: Thu, 29 Jan 2026 01:24:02 +0900 Subject: [PATCH] kk: Fix disabling workaround 4 Fixes: 67d05f71e9e ("kk: Track fragment helper status since Metal does not correctly demote them") Signed-off-by: Aitor Camacho (cherry picked from commit 29900e82296b0ccb0b306326ee9a9ccae491fb79) Part-of: --- .pick_status.json | 2 +- src/kosmickrisp/compiler/nir_to_msl.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 05ea2d89b4c..984a40f43a5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2824,7 +2824,7 @@ "description": "kk: Fix disabling workaround 4", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "67d05f71e9e8a740a4e37752eba4e1939f228d76", "notes": null diff --git a/src/kosmickrisp/compiler/nir_to_msl.c b/src/kosmickrisp/compiler/nir_to_msl.c index 08006c6a578..f7d078adcf3 100644 --- a/src/kosmickrisp/compiler/nir_to_msl.c +++ b/src/kosmickrisp/compiler/nir_to_msl.c @@ -952,7 +952,10 @@ intrinsic_to_msl(struct nir_to_msl_ctx *ctx, nir_intrinsic_instr *instr) case nir_intrinsic_load_base_instance: P(ctx, "gl_BaseInstance;\n"); break; + /* load_helper_invocation is undefined after a demote, so we can just assume + * it'll be called before that and map it to simd_is_helper_thread. */ case nir_intrinsic_load_helper_invocation: + case nir_intrinsic_is_helper_invocation: P(ctx, "simd_is_helper_thread();\n"); break; case nir_intrinsic_ddx: