ir3/legalize: Construct branch properly

Don't just yeet stuff into regs without updating regs_count, etc. This
will break horribly during the transition otherwise.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11469>
This commit is contained in:
Connor Abbott 2021-06-18 13:56:11 +02:00 committed by Marge Bot
parent e93f15d4bc
commit 59b9935877
1 changed files with 2 additions and 1 deletions

View File

@ -691,7 +691,8 @@ kill_sched(struct ir3 *ir, struct ir3_shader_variant *so)
continue;
struct ir3_instruction *br = ir3_instr_create(block, OPC_B, 1, 1);
br->regs[1] = instr->regs[1];
ir3_dst_create(br, INVALID_REG, 0);
ir3_src_create(br, instr->regs[1]->num, instr->regs[1]->flags)->wrmask = 1;
br->cat0.target =
list_last_entry(&ir->block_list, struct ir3_block, node);