r600/sb: bail out if prepare_alu_group() doesn't find a proper scheduling
authorGert Wollny <gw.fossdev@gmail.com>
Mon, 16 Oct 2017 19:06:26 +0000 (21:06 +0200)
committerDave Airlie <airlied@redhat.com>
Tue, 31 Oct 2017 23:33:40 +0000 (09:33 +1000)
commit69eee511c631a8372803f175bd6f5a9551230424
tree6b012018a208b38933fe42454e675af2c68e9ba1
parente80bbd6f52341cbf9363f3c0c8b7ad3be851b1e6
r600/sb: bail out if prepare_alu_group() doesn't find a proper scheduling

It is possible that the optimizer ends up in an infinite loop in
post_scheduler::schedule_alu(), because post_scheduler::prepare_alu_group()
does not find a proper scheduling. This can be deducted from
pending.count() being larger than zero and not getting smaller.

This patch works around this problem by signalling this failure so that the
optimizers bails out and the un-optimized shader is used.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103142
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Gert Wollny <gw.fossdev@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/sb/sb_sched.cpp
src/gallium/drivers/r600/sb/sb_sched.h