projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f787baf
)
mesa: added some assertions
author
Brian Paul
<brianp@vmware.com>
Fri, 6 Mar 2009 00:14:29 +0000
(17:14 -0700)
committer
Brian Paul
<brianp@vmware.com>
Fri, 6 Mar 2009 00:25:25 +0000
(17:25 -0700)
src/mesa/shader/prog_instruction.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/prog_instruction.c
b/src/mesa/shader/prog_instruction.c
index 4a6d0d670aca655d873985df9e50138365642369..6a21152c60be458c7680c9615c038c2ca199eb19 100644
(file)
--- a/
src/mesa/shader/prog_instruction.c
+++ b/
src/mesa/shader/prog_instruction.c
@@
-254,6
+254,7
@@
static const struct instruction_info InstInfo[MAX_OPCODE] = {
GLuint
_mesa_num_inst_src_regs(gl_inst_opcode opcode)
{
+ ASSERT(opcode < MAX_OPCODE);
ASSERT(opcode == InstInfo[opcode].Opcode);
ASSERT(OPCODE_XPD == InstInfo[OPCODE_XPD].Opcode);
return InstInfo[opcode].NumSrcRegs;
@@
-266,6
+267,7
@@
_mesa_num_inst_src_regs(gl_inst_opcode opcode)
GLuint
_mesa_num_inst_dst_regs(gl_inst_opcode opcode)
{
+ ASSERT(opcode < MAX_OPCODE);
ASSERT(opcode == InstInfo[opcode].Opcode);
ASSERT(OPCODE_XPD == InstInfo[OPCODE_XPD].Opcode);
return InstInfo[opcode].NumDstRegs;