summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2021-06-18 13:56:11 +0200
committerMarge Bot <eric+marge@anholt.net>2021-06-23 17:20:29 +0000
commit59b9935877ee29a4ad7f83ac6f0753781530f08b (patch)
treee272d0776718ce469bf492134c1cc9a6854c201d /src
parente93f15d4bc346dd56bdf93d81513768872d8d1fb (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/ir3/ir3_legalize.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/freedreno/ir3/ir3_legalize.c b/src/freedreno/ir3/ir3_legalize.c
index 4ffe8129c29..b8ef9bc150a 100644
--- a/src/freedreno/ir3/ir3_legalize.c
+++ b/src/freedreno/ir3/ir3_legalize.c
@@ -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);