r600/sfn: Only switch to other CF if no AR uses are pending
authorGert Wollny <gert.wollny@collabora.com>
Tue, 1 Aug 2023 08:29:34 +0000 (10:29 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 2 Aug 2023 18:55:36 +0000 (18:55 +0000)
Otherwise we end up with an incorrect array load (or an assertion failure).

Fixes: d617052db6b2f359d7242875013603ec63b069fc
    r600/sfn: take address loads into account when scheduling

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

src/gallium/drivers/r600/sfn/sfn_scheduler.cpp

index 9502016..b34bd5c 100644 (file)
@@ -357,7 +357,8 @@ BlockScheduler::schedule_block(Block& in_block,
          sfn_log << SfnLog::schedule << "  MEM_OPS:" << mem_ring_writes_ready.size()
                  << "\n";
 
-      if (!m_current_block->lds_group_active()) {
+      if (!m_current_block->lds_group_active() &&
+          m_current_block->expected_ar_uses() == 0) {
          if (last_shed != sched_free && memops_ready.size() > 8)
             current_shed = sched_free;
          else if (mem_ring_writes_ready.size() > 15)