summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2023-02-21 16:53:04 +0100
committerMarge Bot <emma+marge@anholt.net>2024-04-26 12:55:13 +0000
commitef75ea18cd352e4bee17c46069babe5ca3390641 (patch)
treecb9633bac54f710631bf28ab4adc396fa0231ea4
parent4ffef73bf5c7801ab6c4e1448931fdb26f947f43 (diff)
ir3: Don't emit single-source collects
This will help us propagate shared-ness through to stc when it has a single component. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22075>
-rw-r--r--src/freedreno/ir3/ir3_context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_context.c b/src/freedreno/ir3/ir3_context.c
index 13059d8d6af..35a1453780c 100644
--- a/src/freedreno/ir3/ir3_context.c
+++ b/src/freedreno/ir3/ir3_context.c
@@ -284,6 +284,9 @@ ir3_create_collect(struct ir3_block *block, struct ir3_instruction *const *arr,
if (arrsz == 0)
return NULL;
+ if (arrsz == 1)
+ return arr[0];
+
unsigned flags = dest_flags(arr[0]);
collect = ir3_instr_create(block, OPC_META_COLLECT, 1, arrsz);