fix _mesa_select_tex_image() calls
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 1 Nov 2006 19:25:19 +0000 (19:25 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 1 Nov 2006 19:25:19 +0000 (19:25 +0000)
src/mesa/drivers/dri/tdfx/tdfx_tex.c

index 3e6011a2ac152013e5543c47f491cf7e118d9de9..c3fe7bebd3e8841fddfc24bfd4b08e61fa5fb39b 100644 (file)
@@ -1404,7 +1404,6 @@ tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level,
          GLint mipWidth, mipHeight;
          tdfxMipMapLevel *mip;
          struct gl_texture_image *mipImage;
-         const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
          const GLint maxLevels = _mesa_max_texture_levels(ctx, texObj->Target);
    
          assert(!texImage->IsCompressed);
@@ -1425,7 +1424,7 @@ tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level,
                              mipWidth, mipHeight, border,
                              format, type,
                              NULL);
-            mipImage = _mesa_select_tex_image(ctx, texUnit, target, level);
+            mipImage = _mesa_select_tex_image(ctx, texObj, target, level);
             mip = TDFX_TEXIMAGE_DATA(mipImage);
             _mesa_halve2x2_teximage2d(ctx,
                                       texImage,
@@ -1514,7 +1513,6 @@ tdfxTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
       GLint mipWidth, mipHeight;
       tdfxMipMapLevel *mip;
       struct gl_texture_image *mipImage;
-      const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
       const GLint maxLevels = _mesa_max_texture_levels(ctx, texObj->Target);
 
       assert(!texImage->IsCompressed);
@@ -1534,7 +1532,7 @@ tdfxTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
             break;
          }
          ++level;
-         mipImage = _mesa_select_tex_image(ctx, texUnit, target, level);
+         mipImage = _mesa_select_tex_image(ctx, texObj, target, level);
          mip = TDFX_TEXIMAGE_DATA(mipImage);
          _mesa_halve2x2_teximage2d(ctx,
                                    texImage,