From dbdd4bd9e94d9393832809986f1dcbb5d3a471fb Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Thu, 6 May 2021 09:02:02 +1200 Subject: [PATCH] pan/bi: Add two tuples to a clause when needed with NOSCHED Fixes SuperTuxKart with BIFROST_MESA_DEBUG=nosched. Part-of: --- 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 10c33bb..ccd3e90 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 -- 2.7.4