ir3: Fix infinite loop in scheduler when splitting
authorConnor Abbott <cwabbott0@gmail.com>
Mon, 28 Jun 2021 16:41:41 +0000 (18:41 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 8 Jul 2021 16:02:41 +0000 (16:02 +0000)
commitbb3212dd4d80fd945654f3ca5380fd472fba92a4
treee931efcffe0fac2f67db94d97ac978db488710ca
parent2ff3ab0aed747cbb59d3b71ef459e70e9d346cdd
ir3: Fix infinite loop in scheduler when splitting

When we go to split e.g. a p0.x producer, the only other instructions
ready to schedule are often only p0.x producers. It could happen that
they all have a lower priority than the split instruction. Then we would
immediately schedule the split instruction again, then again try to
schedule one of the other producers, be blocked, and split it, around
and around again, leading to an infinite loop. The following commit
triggered this with
dEQP-GLES3.functional.shaders.discard.dynamic_loop_always on a3xx.

Fixes: d2f4d33 ("freedreno/ir3: new pre-RA scheduler")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6752>
src/freedreno/ir3/ir3_sched.c