lima: fix vector const src referenced multiple times
authorErico Nunes <nunes.erico@gmail.com>
Sun, 3 Apr 2022 16:28:19 +0000 (18:28 +0200)
committerErico Nunes <nunes.erico@gmail.com>
Tue, 12 Apr 2022 20:07:32 +0000 (20:07 +0000)
commitcf1390e1b87a8029ad7efc710cceab661411413d
tree8ea96b5424ff4659eeda47a0167f37e48c45ca21
parent19a22ae1109c7bba3952653977dd5a964a3c07ff
lima: fix vector const src referenced multiple times

It can happen that a single vector constant is referenced multiple times
by the same node, with different swizzles.
This needs to be taken into account by checking and updating the
swizzles for all the srcs of a target node when inserting the const
node to the same instruction.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15726>
src/gallium/drivers/lima/ci/lima-fails.txt
src/gallium/drivers/lima/ir/pp/instr.c