OSDN Git Service

fix another pc off-by one
authorBrian <brian@yutani.localnet.net>
Tue, 27 Mar 2007 21:21:35 +0000 (15:21 -0600)
committerBrian <brian@yutani.localnet.net>
Tue, 27 Mar 2007 22:06:47 +0000 (16:06 -0600)
src/mesa/shader/prog_execute.c

index 3724082..0438d6a 100644 (file)
@@ -753,7 +753,8 @@ _mesa_execute_program(GLcontext * ctx,
                return GL_TRUE;  /* Per GL_NV_vertex_program2 spec */
             }
             machine->CallStack[machine->StackDepth++] = pc + 1; /* next inst */
-            pc = inst->BranchTarget;
+            /* Subtract 1 here since we'll do pc++ at end of for-loop */
+            pc = inst->BranchTarget - 1;
          }
          break;
       case OPCODE_CMP: