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)
committerVivek Pandya <vivekvpandya@gmail.com>
Mon, 7 Sep 2020 15:55:16 +0000 (21:25 +0530)
commit13e00512f230534cdb8295d5473f594891640f33
tree70fb52c358f9c746f51c3e400e0ea8098d2c32b2
parent389ff8ef47ba3fc8c586af14454b91c2afd4506d
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