lima/ppir: do not assume single src for pipeline outputs
authorErico Nunes <nunes.erico@gmail.com>
Mon, 13 Apr 2020 13:24:35 +0000 (15:24 +0200)
committerMarge Bot <eric+marge@anholt.net>
Sat, 9 May 2020 11:30:07 +0000 (11:30 +0000)
commitc6a3987f320fa26fa88e6d86cf236d7e426aab84
tree1d2d6299548032f259fb67abf902ddf5f9ab196f
parent741aa3439d7d38c26d0baf20be506cf79c30978d
lima/ppir: do not assume single src for pipeline outputs

Even if a node has pipeline output and a single successor, it is still
valid for that successor to have multiple references to that pipeline
node. A trivial example is add(u.x,u.y) where u is a uniform.
It is even possible for this to occur with consts as operands of fcsel.
So remove uses of ppir_node_get_src_for_pred as that would assume a
single src in the node that uses the pipeline.

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/4535>
src/gallium/drivers/lima/ir/pp/lower.c
src/gallium/drivers/lima/ir/pp/node_to_instr.c
src/gallium/drivers/lima/ir/pp/ppir.h