From ca91b58457ba671b3a7338c7f7a5a00d8ebaed27 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Thu, 9 Mar 2023 22:55:28 +0100 Subject: [PATCH] ir3/lower_pcopy: Fix immed/const flags for copy from shared We were accidentally setting IR3_REG_SHARED on the source for immediate/const sources. Part-of: --- src/freedreno/ir3/ir3_lower_parallelcopy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/freedreno/ir3/ir3_lower_parallelcopy.c b/src/freedreno/ir3/ir3_lower_parallelcopy.c index 08d257cd7e0..728fccb9fb8 100644 --- a/src/freedreno/ir3/ir3_lower_parallelcopy.c +++ b/src/freedreno/ir3/ir3_lower_parallelcopy.c @@ -257,7 +257,10 @@ do_copy(struct ir3_compiler *compiler, struct ir3_instruction *instr, (entry->flags & IR3_REG_SHARED) ? OPC_READ_FIRST_MACRO : OPC_MOV; struct ir3_instruction *mov = ir3_instr_create(instr->block, opc, 1, 1); ir3_dst_create(mov, dst_num, entry->flags); - ir3_src_create(mov, src_num, entry->flags | entry->src.flags); + if (entry->src.flags & (IR3_REG_IMMED | IR3_REG_CONST)) + ir3_src_create(mov, INVALID_REG, (entry->flags & IR3_REG_HALF) | entry->src.flags); + else + ir3_src_create(mov, src_num, entry->flags); mov->cat1.dst_type = (entry->flags & IR3_REG_HALF) ? TYPE_U16 : TYPE_U32; mov->cat1.src_type = (entry->flags & IR3_REG_HALF) ? TYPE_U16 : TYPE_U32; if (entry->src.flags & IR3_REG_IMMED)