brw: Fix checking sources of wrong instruction in opt_address_reg_load

Fixes: 8ac7802ac8 ("brw: move final send lowering up into the IR")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37019>
This commit is contained in:
Caio Oliveira 2025-08-26 22:38:33 -07:00 committed by Marge Bot
parent 93996c07e2
commit 1c933b6511

View file

@ -40,7 +40,8 @@ opt_address_reg_load_local(brw_shader &s, bblock_t *block, const brw_def_analysi
brw_builder ubld = brw_builder(&s).before(inst).uniform();
brw_reg sources[3];
for (unsigned i = 0; i < src_inst->sources; i++) {
sources[i] = inst->src[i].file == VGRF ? component(src_inst->src[i], 0) : src_inst->src[i];
const brw_reg src = src_inst->src[i];
sources[i] = src.file == VGRF ? component(src, 0) : src;
}
ubld.emit(src_inst->opcode, inst->dst, sources, src_inst->sources);