Module: Mesa
Branch: main
Commit: dbdd4bd9e94d9393832809986f1dcbb5d3a471fb
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dbdd4bd9e94d9393832809986f1dcbb5d3a471fb

Author: Icecream95 <[email protected]>
Date:   Thu May  6 09:02:02 2021 +1200

pan/bi: Add two tuples to a clause when needed with NOSCHED

Fixes SuperTuxKart with BIFROST_MESA_DEBUG=nosched.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10661>

---

 src/panfrost/bifrost/bi_schedule.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/panfrost/bifrost/bi_schedule.c 
b/src/panfrost/bifrost/bi_schedule.c
index 10c33bbea56..ccd3e904732 100644
--- a/src/panfrost/bifrost/bi_schedule.c
+++ b/src/panfrost/bifrost/bi_schedule.c
@@ -1378,7 +1378,9 @@ bi_schedule_clause(bi_context *ctx, bi_block *block, 
struct bi_worklist st)
                 bool not_last = (some_instruction > 0) &&
                         bi_must_not_last(st.instructions[some_instruction - 
1]);
 
-                if (!(tuple->fma || tuple->add || (tuple_state.last && 
not_last)))
+                bool insert_empty = tuple_state.last && not_last;
+
+                if (!(tuple->fma || tuple->add || insert_empty))
                         break;
 
                 clause->tuple_count++;
@@ -1389,7 +1391,7 @@ bi_schedule_clause(bi_context *ctx, bi_block *block, 
struct bi_worklist st)
 
 #ifndef NDEBUG
                 /* Don't schedule more than 1 tuple if debugging */
-                if (bifrost_debug & BIFROST_DBG_NOSCHED)
+                if ((bifrost_debug & BIFROST_DBG_NOSCHED) && !insert_empty)
                         break;
 #endif
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to