diff options
author | Brian Paul <[email protected]> | 2009-12-22 12:57:31 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-12-22 14:26:06 -0700 |
commit | e8ea2d26cd9e90d45cdfb94c3a6b06e27d6c0083 (patch) | |
tree | 5475dc35ca6a38f96703ded2dac0c2766d67d9b7 /src | |
parent | d186079520234a776c3fa88c81da935d65981fec (diff) |
mesa: added some assertions in BNGLOOP/ENDLOOP cases
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/shader/prog_execute.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 038ce0b4f00..025665a06e5 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -684,9 +684,13 @@ _mesa_execute_program(GLcontext * ctx, break; case OPCODE_BGNLOOP: /* no-op */ + ASSERT(program->Instructions[inst->BranchTarget].Opcode + == OPCODE_ENDLOOP); break; case OPCODE_ENDLOOP: /* subtract 1 here since pc is incremented by for(pc) loop */ + ASSERT(program->Instructions[inst->BranchTarget].Opcode + == OPCODE_BGNLOOP); pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ break; case OPCODE_BGNSUB: /* begin subroutine */ |