summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
diff options
context:
space:
mode:
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-02-24 17:22:15 +0100
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2011-02-24 17:35:35 +0100
commitcd47f10c901d7ac48843586432c2e592ed35eed3 (patch)
tree66f60762b683a4a1a19d0c4ca21492d32a2aa08c /src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
parent4377657f8e204fe2c7b6af194293dd3bea63fca8 (diff)
nvc0: preemptively insert branch at ENDIF
Might be necessary if a block sneaks in somewhere, like a common block for moves of phi sources after a loop break. This is harmless and normally will be removed before emission.
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c b/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
index 5e208e8623..fc19ef1eb1 100644
--- a/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
+++ b/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
@@ -1634,6 +1634,10 @@ bld_instruction(struct bld_context *bld,
{
struct nv_basic_block *b = new_basic_block(bld->pc);
+ if (bld->pc->current_block->exit &&
+ !bld->pc->current_block->exit->terminator)
+ bld_flow(bld, NV_OP_BRA, NULL, NV_CC_P, b, FALSE);
+
--bld->cond_lvl;
nvc0_bblock_attach(bld->pc->current_block, b, bld->out_kind);
nvc0_bblock_attach(bld->cond_bb[bld->cond_lvl], b, CFG_EDGE_FORWARD);