lima/ppir: Skip instruction merge when having more than one successor
authorAndreas Baierl <ichgeh@imkreisrum.de>
Wed, 2 Sep 2020 09:27:10 +0000 (11:27 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 7 Sep 2020 09:55:06 +0000 (09:55 +0000)
commit4c5f5d238b953baab5a3017f76c0b0cb322fea9a
tree55dcedba9bbc9b493a6829c4d33efb95d46c4cd0
parent927a395f040143175535f613ee50d53a73455a52
lima/ppir: Skip instruction merge when having more than one successor

ppir_do_one_node_to_instr merges instructions and uses a pipeline reg
to save a reg. It tests if ppir_node_has_single_src_succ, but it should
check if ppir_node_has_single_succ.

The following deqp tests run into this issue because they have a node
with 2 successors in different blocks, where one was merged into the same
instruction and the second one is pointing to a missing predecessor then.

Fixes the following deqp tests:
dEQP-GLES2.functional.shaders.loops.do_while_dynamic_iterations.vector_counter_fragment
dEQP-GLES2.functional.shaders.loops.for_dynamic_iterations.vector_counter_fragment
dEQP-GLES2.functional.shaders.loops.while_dynamic_iterations.vector_counter_fragment

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6555>
src/gallium/drivers/lima/ir/pp/node_to_instr.c