nir: fix progress reporting in nir_io_add_const_offset_to_base

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35069>
This commit is contained in:
Rhys Perry 2025-05-16 16:46:48 +01:00 committed by Marge Bot
parent 92a2ab8b64
commit 12ee2b0fd4

View file

@ -107,10 +107,12 @@ add_const_offset_to_base_block(nir_block *block, nir_builder *b,
sem.location += off;
b->cursor = nir_before_instr(&intrin->instr);
nir_src_rewrite(offset, nir_imm_int(b, 0));
progress = true;
}
/* non-indirect indexing should reduce num_slots */
sem.num_slots = is_dual_slot(intrin) ? 2 : 1;
nir_io_semantics original = nir_intrinsic_io_semantics(intrin);
progress |= memcmp(&original, &sem, sizeof(sem));
nir_intrinsic_set_io_semantics(intrin, sem);
}
}