From 292a80466d3e0b1cec998f2dc1b0abe25dc10fb8 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 24 Feb 2007 15:49:54 -0700 Subject: Outputs[] array wasn't large enough, define MAX_PROGRAM_OUTPUTS, new assertions. --- src/mesa/shader/prog_execute.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa/shader/prog_execute.c') 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: -- cgit v1.2.3