diff options
author | Brian <[email protected]> | 2007-02-07 15:12:13 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-02-07 15:12:13 -0700 |
commit | 4aa487e7968d015af4fe729f697105448fcb843f (patch) | |
tree | 55be6e4c573704879db0836f5a596fcfbd341f3a /src/mesa/swrast/s_fragprog.c | |
parent | 1f99a7514e9c36b7ce2c6c1724a6584790656415 (diff) |
Use IR_LOOP to represent do-while and for-loops.
Also, start moving high vs. low-level instruction selection into slang_emit.c
Diffstat (limited to 'src/mesa/swrast/s_fragprog.c')
-rw-r--r-- | src/mesa/swrast/s_fragprog.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 403a03aa32a..ace10a9222c 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -675,9 +675,10 @@ execute_program( GLcontext *ctx, } } break; - case OPCODE_BGNLOOP: /* begin loop */ + case OPCODE_BGNLOOP: + /* no-op */ break; - case OPCODE_ENDLOOP: /* end loop */ + case OPCODE_ENDLOOP: /* subtract 1 here since pc is incremented by for(pc) loop */ pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ break; @@ -695,10 +696,7 @@ execute_program( GLcontext *ctx, test_cc(machine->CondCodes[GET_SWZ(swizzle, 2)], condMask) || test_cc(machine->CondCodes[GET_SWZ(swizzle, 3)], condMask)) { /* take branch */ - pc = inst->BranchTarget; - /* - printf("Take branch to %u\n", pc); - */ + pc = inst->BranchTarget - 1; } } break; @@ -721,7 +719,7 @@ execute_program( GLcontext *ctx, return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ } machine->CallStack[machine->StackDepth++] = pc + 1; - pc = inst->BranchTarget; + pc = inst->BranchTarget; /* XXX - 1 ??? */ } } break; |