pan/bi: Determine block successors correctly

Fixes GPU timeouts in Google Maps.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Icecream95 <ixn@disroot.org>
Tested-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10145>
This commit is contained in:
Alyssa Rosenzweig
2021-04-09 18:03:38 -04:00
committed by Marge Bot
parent 492c8f1709
commit ba8737bb86
2 changed files with 16 additions and 12 deletions
+13 -12
View File
@@ -733,20 +733,21 @@ bi_pack(bi_context *ctx, struct util_dynarray *emission)
bi_assign_branch_offset(ctx, block);
/* Passthrough the first clause of where we're branching to for
* the last clause of the block (the clause with the branch) */
bi_clause *succ_clause = block->base.successors[1] ?
bi_next_clause(ctx, block->base.successors[1], NULL) : NULL;
if (!succ_clause && block->base.successors[0])
succ_clause = bi_next_clause(ctx, block->base.successors[0], NULL);
bi_foreach_clause_in_block(block, clause) {
bool is_last = clause->link.next == &block->clauses;
bool is_last = (clause->link.next == &block->clauses);
bi_clause *next = bi_next_clause(ctx, _block, clause);
bi_clause *next_2 = is_last ? succ_clause : NULL;
/* Get the succeeding clauses, either two successors of
* the block for the last clause in the block or just
* the next clause within the block */
bi_clause *next = NULL, *next_2 = NULL;
if (is_last) {
next = bi_next_clause(ctx, block->base.successors[0], NULL);
next_2 = bi_next_clause(ctx, block->base.successors[1], NULL);
} else {
next = bi_next_clause(ctx, _block, clause);
}
previous_size = emission->size;
+3
View File
@@ -116,6 +116,9 @@ bi_writemask(bi_instr *ins, unsigned d)
bi_clause *
bi_next_clause(bi_context *ctx, pan_block *block, bi_clause *clause)
{
if (!block && !clause)
return NULL;
/* Try the first clause in this block if we're starting from scratch */
if (!clause && !list_is_empty(&((bi_block *) block)->clauses))
return list_first_entry(&((bi_block *) block)->clauses, bi_clause, link);