mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
pan/bi: Fix emit_if successor assignment
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Fixes:9a00cf3d1e("pan/bi: Add support for if-else blocks") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5260> (cherry picked from commite42a5dfd4f)
This commit is contained in:
parent
265bfa08d5
commit
70681d4f9a
2 changed files with 3 additions and 4 deletions
|
|
@ -3568,7 +3568,7 @@
|
|||
"description": "pan/bi: Fix emit_if successor assignment",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "9a00cf3d1efe336e09906d87a8f5a50cbbe10fd6"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -891,18 +891,17 @@ emit_if(bi_context *ctx, nir_if *nif)
|
|||
/* The else block is empty, so don't emit an exit jump */
|
||||
bi_remove_instruction(then_exit);
|
||||
then_branch->branch.target = ctx->after_block;
|
||||
pan_block_add_successor(&end_then_block->base, &ctx->after_block->base); /* fallthrough */
|
||||
} else {
|
||||
then_branch->branch.target = else_block;
|
||||
then_exit->branch.target = ctx->after_block;
|
||||
pan_block_add_successor(&end_then_block->base, &then_exit->branch.target->base);
|
||||
pan_block_add_successor(&end_else_block->base, &ctx->after_block->base); /* fallthrough */
|
||||
}
|
||||
|
||||
/* Wire up the successors */
|
||||
|
||||
pan_block_add_successor(&before_block->base, &then_branch->branch.target->base); /* then_branch */
|
||||
|
||||
pan_block_add_successor(&before_block->base, &then_block->base); /* fallthrough */
|
||||
pan_block_add_successor(&end_else_block->base, &ctx->after_block->base); /* fallthrough */
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue