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:
committed by
Marge Bot
parent
492c8f1709
commit
ba8737bb86
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user