diff --git a/.pick_status.json b/.pick_status.json index 1939a5ddab6..d87ec26d60e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -494,7 +494,7 @@ "description": "ir3: fix emitting descriptor prefetches at end of preamble", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "e7ac1094f69830cb76e622525629ace68b757a10", "notes": null diff --git a/src/freedreno/ir3/ir3_nir_opt_preamble.c b/src/freedreno/ir3/ir3_nir_opt_preamble.c index 7c764fc6f40..ba458b1138f 100644 --- a/src/freedreno/ir3/ir3_nir_opt_preamble.c +++ b/src/freedreno/ir3/ir3_nir_opt_preamble.c @@ -752,6 +752,8 @@ ir3_nir_opt_prefetch_descriptors(nir_shader *nir, struct ir3_shader_variant *v) preamble_defs); } + /* ir3_rematerialize_def_for_preamble may have moved the cursor. */ + b.cursor = nir_after_impl(preamble); progress |= emit_descriptor_prefetch(&b, instr, preamble_descs, &state); if (state.sampler.num_prefetches == MAX_PREFETCHES &&