ac/nir/lower_tex_coord: update cursor when moving wqm coordinates

We need to update the build cursor when moving a load otherwise
subsequent loads will be using a stale cursor.

Fixes: 0ff1650662 ("ac/nir/lower_tex_coord: fix moving wqm coordinates")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15494

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41629>
This commit is contained in:
Timothy Arceri 2026-05-18 10:39:43 +10:00 committed by Marge Bot
parent 90c47206c5
commit 45421292f1

View file

@ -330,6 +330,7 @@ build_coordinate(struct move_tex_coords_state *state, nir_scalar scalar, coord_i
/* Move load_*input(barycentric, imm) to the cursor location if nessecary. */
if (instr_needs_move(b->cursor, &info.load->instr)) {
nir_instr_move(b->cursor, &info.load->instr);
b->cursor = nir_after_instr(&info.load->instr);
unsigned num_srcs = nir_intrinsic_infos[info.load->intrinsic].num_srcs;