projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d186079
)
mesa: added some assertions in BNGLOOP/ENDLOOP cases
author
Brian Paul
<brianp@vmware.com>
Tue, 22 Dec 2009 19:57:31 +0000
(12:57 -0700)
committer
Brian Paul
<brianp@vmware.com>
Tue, 22 Dec 2009 21:26:06 +0000
(14:26 -0700)
src/mesa/shader/prog_execute.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/prog_execute.c
b/src/mesa/shader/prog_execute.c
index 038ce0b4f0029fd0cf2780527b8b684d9cf9241b..025665a06e59871bb710df4b53e4f136eba82ecd 100644
(file)
--- 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 */