i965: fix OPCODE_TEX when additional ops are needed
authorRoland Scheidegger <sroland@tungstengraphics.com>
Sun, 8 Jun 2008 12:04:39 +0000 (14:04 +0200)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Sun, 8 Jun 2008 12:05:07 +0000 (14:05 +0200)
src/mesa/drivers/dri/i965/brw_wm_fp.c

index 7e80724130c4a0865c760a5c3783db6f755861a8..ef90260e2a0637233a5a42a0867a0f3f87145ab7 100644 (file)
@@ -737,7 +737,8 @@ static void precalc_tex( struct brw_wm_compile *c,
       release_temp(c, tmp);
    }
 
-   if (inst->TexSrcTarget == GL_TEXTURE_RECTANGLE_NV) 
+   if ((inst->TexSrcTarget == TEXTURE_RECT_INDEX) ||
+       (inst->TexSrcTarget == TEXTURE_CUBE_INDEX))
       release_temp(c, tmpcoord);
 }
 
@@ -1019,7 +1020,11 @@ void brw_wm_pass_fp( struct brw_wm_compile *c )
       case OPCODE_LIT:
         precalc_lit(c, inst);
         break;
-     
+
+      case OPCODE_TEX:
+        precalc_tex(c, inst);
+        break;
+
       case OPCODE_TXP:
         precalc_txp(c, inst);
         break;