[intel] fix for previous fix
authorZou Nan hai <nanhai.zou@intel.com>
Fri, 1 Feb 2008 12:28:26 +0000 (20:28 +0800)
committerZou Nan hai <nanhai.zou@intel.com>
Fri, 1 Feb 2008 12:28:26 +0000 (20:28 +0800)
src/mesa/drivers/dri/intel/intel_tex_image.c

index 8f9f9897e870cb558c41f272fa959cc6b40ccf78..0500829f4b6c3cabc556eba31fdd6db66e6a681e 100644 (file)
@@ -308,7 +308,7 @@ intelTexImage(GLcontext * ctx,
    GLint postConvWidth = width;
    GLint postConvHeight = height;
    GLint texelBytes, sizeInBytes;
-   GLuint dstRowStride;
+   GLuint dstRowStride, srcRowStride = texImage->RowStride;
 
 
    DBG("%s target %s level %d %dx%dx%d border %d\n", __FUNCTION__,
@@ -497,10 +497,10 @@ intelTexImage(GLcontext * ctx,
           struct intel_region *dst = intelImage->mt->region;
           _mesa_copy_rect(texImage->Data, dst->cpp, dst->pitch,
                   0, 0,
-                  intelImage->mt->level[intelImage->level].width,
-                  intelImage->mt->level[intelImage->level].height/4,
+                  intelImage->mt->level[level].width,
+                  intelImage->mt->level[level].height/4,
                   pixels,
-                  intelImage->base.RowStride,
+                  srcRowStride,
                   0, 0);
        } else
            memcpy(texImage->Data, pixels, imageSize);