diff options
author | Zack Rusin <zackr@vmware.com> | 2010-04-22 13:43:37 -0400 |
---|---|---|
committer | Zack Rusin <zackr@vmware.com> | 2010-04-22 13:57:18 -0400 |
commit | 3a423dcf9dfa725a4e5dca60f0f2b02599d2ed9b (patch) | |
tree | f0eb6d2fab05afeddd6f8e3ccd5159259b737427 /src | |
parent | 63aa9b505a2439399af3e6ed47c5a0b1b791fba8 (diff) |
gallivm: fix nested break statemants
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index 44f8aec1bf..b87817dd0d 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c @@ -232,6 +232,8 @@ static void lp_exec_bgnloop(struct lp_exec_mask *mask) mask->break_mask = LLVMConstAllOnes(mask->int_vec_type); if (mask->cond_stack_size == 0) mask->cond_mask = LLVMConstAllOnes(mask->int_vec_type); + + mask->break_stack[mask->break_stack_size++] = mask->break_mask; mask->loop_stack[mask->loop_stack_size++] = mask->loop_block; mask->loop_block = lp_build_insert_new_block(mask->bld->builder, "bgnloop"); LLVMBuildBr(mask->bld->builder, mask->loop_block); @@ -246,7 +248,6 @@ static void lp_exec_break(struct lp_exec_mask *mask) mask->exec_mask, "break"); - mask->break_stack[mask->break_stack_size++] = mask->break_mask; if (mask->break_stack_size > 1) { mask->break_mask = LLVMBuildAnd(mask->bld->builder, mask->break_mask, @@ -304,7 +305,7 @@ static void lp_exec_endloop(struct lp_exec_mask *mask) mask->cont_mask = mask->cont_stack[--mask->cont_stack_size]; } if (mask->break_stack_size) { - mask->break_mask = mask->cont_stack[--mask->break_stack_size]; + mask->break_mask = mask->break_stack[--mask->break_stack_size]; } lp_exec_mask_update(mask); |