summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/prog_execute.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-02-24 15:49:54 -0700
committerBrian <[email protected]>2007-02-24 15:49:54 -0700
commit292a80466d3e0b1cec998f2dc1b0abe25dc10fb8 (patch)
tree49fd3624ec9536c222c91b19736cc49bcfa72034 /src/mesa/shader/prog_execute.c
parent5e80c62f3178a65bebca942aa0b1e5d16c34b2a9 (diff)
Outputs[] array wasn't large enough, define MAX_PROGRAM_OUTPUTS, new assertions.
Diffstat (limited to 'src/mesa/shader/prog_execute.c')
-rw-r--r--src/mesa/shader/prog_execute.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index 6417a88e900..063d572428b 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -153,8 +153,7 @@ get_register_pointer(GLcontext * ctx,
}
case PROGRAM_OUTPUT:
- /* This is only for PRINT */
- ASSERT(source->Index < FRAG_RESULT_MAX);
+ ASSERT(source->Index < MAX_PROGRAM_OUTPUTS);
return machine->Outputs[source->Index];
case PROGRAM_LOCAL_PARAM:
@@ -453,9 +452,11 @@ store_vector4(const struct prog_instruction *inst,
switch (dest->File) {
case PROGRAM_OUTPUT:
+ ASSERT(dest->Index < MAX_PROGRAM_OUTPUTS);
dstReg = machine->Outputs[dest->Index];
break;
case PROGRAM_TEMPORARY:
+ ASSERT(dest->Index < MAX_PROGRAM_TEMPS);
dstReg = machine->Temporaries[dest->Index];
break;
case PROGRAM_WRITE_ONLY: