ir3: fix emitting descriptor prefetches at end of preamble
The fix ine7ac1094f6to emit preamble defs in the correct block would move the cursor of the builder that is later used to insert descriptor prefetches, emitting them at the wrong place. Fix this by resetting the cursor before emitting the prefetches. Signed-off-by: Job Noorman <jnoorman@igalia.com> Fixes:e7ac1094f6("ir3: rematerialize preamble defs in block dominated by sources") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33399>
This commit is contained in:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user