lima/ppir: fix src read mask swizzling
authorErico Nunes <nunes.erico@gmail.com>
Mon, 20 Jan 2020 00:29:40 +0000 (01:29 +0100)
committerErico Nunes <nunes.erico@gmail.com>
Sat, 25 Jan 2020 13:48:55 +0000 (14:48 +0100)
commitae0b8ba5d568f0029f868e02e388c7a71474f6eb
tree7e8769e080145e4bf75eb29f5ce4311e4f7a3786
parentab36523ae7c4abe3fa55c43e9c5e63b157aa7981
lima/ppir: fix src read mask swizzling

The src mask can't be calculated from the dest write_mask.
Instead, it must be calculated from the swizzled operators of the src.
Otherwise, liveness calculation may report incorrect live components for
non-ssa registers.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3502>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3502>
src/gallium/drivers/lima/ir/pp/liveness.c
src/gallium/drivers/lima/ir/pp/ppir.h