r600/sb: Fall back to un-optimized shader if scheduling fails
authorGert Wollny <gert.wollny@collabora.com>
Thu, 12 May 2022 11:28:15 +0000 (13:28 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 17 May 2022 18:43:30 +0000 (18:43 +0000)
Sometimes the optimizer created codes that can't be scheduled,
instead of failing completely, simply bail out and use the
un-optimized code.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16499>

src/gallium/drivers/r600/sb/sb_sched.cpp

index 2d5fbfd..3238dfa 100644 (file)
@@ -1205,15 +1205,13 @@ bool post_scheduler::schedule_alu(container_node *c) {
        if (!ready.empty()) {
                sblog << "##post_scheduler: unscheduled ready instructions :";
                dump::dump_op_list(&ready);
-               assert(!"unscheduled ready instructions");
        }
 
        if (!pending.empty()) {
                sblog << "##post_scheduler: unscheduled pending instructions :";
                dump::dump_op_list(&pending);
-               assert(!"unscheduled pending instructions");
        }
-       return improving;
+       return pending.empty() && ready.empty() && improving != 0;
 }
 
 void post_scheduler::add_interferences(value *v, sb_bitset &rb, val_set &vs) {