diff options
author | Brian <[email protected]> | 2007-02-06 22:34:09 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-02-06 22:34:09 -0700 |
commit | 1f99a7514e9c36b7ce2c6c1724a6584790656415 (patch) | |
tree | 7ba27331124737d73d71517bac51e868ac1f4676 /src/mesa | |
parent | f22ed0986a743e033d827c78371612c7115ff913 (diff) |
BRK and CONT work the same
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/swrast/s_fragprog.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 63974b30f20..403a03aa32a 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -703,22 +703,10 @@ execute_program( GLcontext *ctx, } break; case OPCODE_BRK: /* break out of loop */ - { -#if 0 - /* The location of the ENDLOOP instruction is saved in the - * BGNLOOP instruction. Get that instruction and jump to - * its BranchTarget + 1. - */ - const struct prog_instruction *loopBeginInst - = program->Base.Instructions + inst->BranchTarget; - ASSERT(loopBeginInst->Opcode == OPCODE_BGNLOOP); - ASSERT(loopBeginInst->BranchTarget >= 0); - /* we'll add one at bottom of for-loop */ - pc = loopBeginInst->BranchTarget; -#else - pc = inst->BranchTarget - 1; -#endif - } + /* fall-through */ + case OPCODE_CONT: /* continue loop */ + /* Subtract 1 here since we'll do pc++ at end of for-loop */ + pc = inst->BranchTarget - 1; break; case OPCODE_CAL: /* Call subroutine */ { @@ -750,10 +738,6 @@ execute_program( GLcontext *ctx, store_vector4( inst, machine, result ); } break; - case OPCODE_CONT: /* continue loop */ - /* Subtract 1 here since we'll do pc++ at end of for-loop */ - pc = inst->BranchTarget - 1; - break; case OPCODE_COS: { GLfloat a[4], result[4]; |