mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 08:10:14 +01:00
freedreno/ir3: simplify split from collect
In some cases we need to split components out from what was already a collect. That was making it hard to DCE unused components of the collect. (Ie. unused components of fragcoord, etc) So just detect this case and skip the chained collect+split. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3569>
This commit is contained in:
parent
8d0e7d9a4c
commit
752aeb7b3f
1 changed files with 10 additions and 0 deletions
|
|
@ -323,6 +323,16 @@ ir3_split_dest(struct ir3_block *block, struct ir3_instruction **dst,
|
|||
return;
|
||||
}
|
||||
|
||||
if (src->opc == OPC_META_COLLECT) {
|
||||
debug_assert((base + n) < src->regs_count);
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
dst[i] = ssa(src->regs[i + base + 1]);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned flags = dest_flags(src);
|
||||
|
||||
for (int i = 0, j = 0; i < n; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue