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>
This commit is contained in:
Icecream95 2021-05-06 09:02:02 +12:00 committed by Marge Bot
parent e241ca6e9c
commit dbdd4bd9e9

View file

@ -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