r600/sfn: Take source uses into account when switching channels

When we switch the channels by re-creating vec4 values we have to
take into account that the source values may be used in an ALU op,
and with that we have to take read-port limitations into account.

Fixes: 18a8d148d8
    r600/sfn: Cleanup copy-prop into vec4 source values

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24519>
This commit is contained in:
Gert Wollny 2023-08-06 20:42:07 +02:00 committed by Marge Bot
parent bcfa71a6d0
commit 807c0d6bb7

View file

@ -592,6 +592,12 @@ CopyPropFwdVisitor::propagate_to(RegisterVec4& value, Instr *instr)
allowed_mask &= alu->allowed_dest_chan_mask();
}
for (auto u : src->uses()) {
auto alu = u->as_alu();
if (alu)
allowed_mask &= alu->allowed_src_chan_mask();
}
if (!allowed_mask)
return;