diff options
author | Connor Abbott <cwabbott0@gmail.com> | 2023-03-09 22:55:28 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-04-26 12:55:13 +0000 |
commit | ca91b58457ba671b3a7338c7f7a5a00d8ebaed27 (patch) | |
tree | 0894c43e21655b4f5046893007934903d9d02e1d | |
parent | 90dabe5a1831af92a7fce2b9f5a0253b68b3ab3f (diff) |
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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22075>
-rw-r--r-- | src/freedreno/ir3/ir3_lower_parallelcopy.c | 5 |
1 files changed, 4 insertions, 1 deletions
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) |