From 65075da8c39f686ec4ab6593d7b0574982d21a23 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 19 May 2008 16:04:02 -0600 Subject: fix tempReg test in _mesa_combine_programs() --- src/mesa/shader/program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index e06ab5aa23..a0817a91ec 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -602,7 +602,7 @@ _mesa_combine_programs(GLcontext *ctx, if ((progA->OutputsWritten & (1 << FRAG_RESULT_COLR)) && (progB->InputsRead & (1 << FRAG_ATTRIB_COL0))) { GLint tempReg = _mesa_find_free_register(newProg, PROGRAM_TEMPORARY); - if (!tempReg) { + if (tempReg < 0) { _mesa_problem(ctx, "No free temp regs found in " "_mesa_combine_programs(), using 31"); tempReg = 31; -- cgit v1.2.3