diff --git a/.pick_status.json b/.pick_status.json index 1cde0e0e861..0b3de5b5fc9 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4404,7 +4404,7 @@ "description": "nir/opt_load_skip_helpers: don't skip helpers for store_scratch data", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "a65009e8087ff0d36bfc6714eaf42874e7b0ade2", "notes": null diff --git a/src/compiler/nir/nir_opt_load_skip_helpers.c b/src/compiler/nir/nir_opt_load_skip_helpers.c index 752ce89ea59..c00a850cdf1 100644 --- a/src/compiler/nir/nir_opt_load_skip_helpers.c +++ b/src/compiler/nir/nir_opt_load_skip_helpers.c @@ -161,7 +161,11 @@ nir_opt_load_skip_helpers(nir_shader *shader, nir_opt_load_skip_helpers_options case nir_instr_type_intrinsic: { nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr); - if (nir_intrinsic_has_semantic(intr, NIR_INTRINSIC_SUBGROUP)) { + if (nir_intrinsic_has_semantic(intr, NIR_INTRINSIC_SUBGROUP) || + intr->intrinsic == nir_intrinsic_store_scratch) { + /* Subgroup ops might access data from helper lanes and we don't + * know how scratch data is used without more complex tracking. + */ nir_foreach_src(instr, set_src_needs_helpers, &hs); } else if (intr->intrinsic == nir_intrinsic_terminate_if) { /* Unlike demote, terminate disables invocations completely.