update _mesa_select_tex_image() and _mesa_get_tex_image()
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 1 Nov 2006 22:28:54 +0000 (22:28 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 1 Nov 2006 22:28:54 +0000 (22:28 +0000)
src/mesa/main/mipmap.c

index 604dea34e0a9c07904b48bc4512dc6f6d688d441..f154bd4651322b9f8531e3bee1bba92864b03fdb 100644 (file)
@@ -883,7 +883,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
       GLint border, bytesPerTexel;
 
       /* get src image parameters */
-      srcImage = _mesa_select_tex_image(ctx, texUnit, target, level);
+      srcImage = _mesa_select_tex_image(ctx, texObj, target, level);
       ASSERT(srcImage);
       srcWidth = srcImage->Width;
       srcHeight = srcImage->Height;
@@ -922,7 +922,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
       }
 
       /* get dest gl_texture_image */
-      dstImage = _mesa_get_tex_image(ctx, texUnit, target, level + 1);
+      dstImage = _mesa_get_tex_image(ctx, texObj, target, level + 1);
       if (!dstImage) {
          _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
          return;