diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/prog_execute.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 37240820e7..0438d6a7b9 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -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: |