From: Brian Paul Date: Mon, 19 May 2008 22:03:43 +0000 (-0600) Subject: fix tempReg test in _mesa_combine_programs() X-Git-Tag: android-x86-1.6~1181 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e469d78d33feff45f16235871ca1a3d483cdc950;p=android-x86%2Fexternal-mesa.git fix tempReg test in _mesa_combine_programs() --- diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 044d6449acc..7048770cf74 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -641,7 +641,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;