Mesa (master): nvc0: do not generate a backwards jump if a loop ends with BRK
Christoph Bumiller
chrisbmr at kemper.freedesktop.org
Wed Feb 9 15:05:53 UTC 2011
Module: Mesa
Branch: master
Commit: c485368efea8527da68a476af4ed48541b5ed93e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c485368efea8527da68a476af4ed48541b5ed93e
Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date: Sun Feb 6 13:09:24 2011 +0100
nvc0: do not generate a backwards jump if a loop ends with BRK
---
src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c b/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
index 8c0967d..8b6cb0e 100644
--- a/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
+++ b/src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c
@@ -1693,9 +1693,11 @@ bld_instruction(struct bld_context *bld,
{
struct nv_basic_block *bb = bld->loop_bb[bld->loop_lvl - 1];
- bld_flow(bld, NV_OP_BRA, NULL, bb, FALSE);
+ if (bld->out_kind != CFG_EDGE_FAKE) { /* else we already had BRK/CONT */
+ bld_flow(bld, NV_OP_BRA, NULL, bb, FALSE);
- nvc0_bblock_attach(bld->pc->current_block, bb, CFG_EDGE_BACK);
+ nvc0_bblock_attach(bld->pc->current_block, bb, CFG_EDGE_BACK);
+ }
bld_loop_end(bld, bb); /* replace loop-side operand of the phis */
More information about the mesa-commit
mailing list