fix tempReg test in _mesa_combine_programs()
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 19 May 2008 22:03:43 +0000 (16:03 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 19 May 2008 22:03:43 +0000 (16:03 -0600)
src/mesa/shader/program.c

index 044d6449acc519494aa32789c86820dfb14eacc2..7048770cf7447cb652c1c346e6da7a140577dc3c 100644 (file)
@@ -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;