consolidate BRA with BRK, CONT
authorBrian <brian@nostromo.localnet.net>
Thu, 8 Feb 2007 21:10:19 +0000 (14:10 -0700)
committerBrian <brian@nostromo.localnet.net>
Thu, 8 Feb 2007 21:10:19 +0000 (14:10 -0700)
src/mesa/swrast/s_fragprog.c

index ce028f72bf29beefcc43fdd3550f1a2b0ae5d895..fe41c0b5f4562bebfbb50d50fd40b3bf01909962 100644 (file)
@@ -709,18 +709,14 @@ execute_program( GLcontext *ctx,
             break;
          case OPCODE_ENDSUB: /* end subroutine */
             break;
-         case OPCODE_BRA: /* conditional branch */
-            if (eval_condition(machine, inst)) {
-               /* take branch */
-               pc = inst->BranchTarget - 1;
-            }
-            break;
+         case OPCODE_BRA: /* branch (conditional) */
+            /* fall-through */
          case OPCODE_BRK: /* break out of loop (conditional) */
             /* fall-through */
          case OPCODE_CONT: /* continue loop (conditional) */
-            /* Subtract 1 here since we'll do pc++ at end of for-loop */
             if (eval_condition(machine, inst)) {
                /* take branch */
+               /* Subtract 1 here since we'll do pc++ at end of for-loop */
                pc = inst->BranchTarget - 1;
             }
             break;