i915tex: Fix some mismatches between texels or bytes for pitch/stride.
authorMichel Dänzer <michel@tungstengraphics.com>
Mon, 9 Apr 2007 12:57:08 +0000 (14:57 +0200)
committerMichel Dänzer <michel@tungstengraphics.com>
Mon, 9 Apr 2007 12:57:08 +0000 (14:57 +0200)
src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c
src/mesa/drivers/dri/i915tex/intel_tex_image.c

index 93372f4dcc8de43c76f312968a603d149e5c5a27..8e83028b26cc0f65f4fed4a8bb87670c3e9d4f9f 100644 (file)
@@ -317,7 +317,7 @@ intel_miptree_image_data(struct intel_context *intel,
                         0, 0,                             /* source x, y */
                         dst->level[level].width, height); /* width, height */
 
-      src += src_image_pitch;
+      src += src_image_pitch * dst->cpp;
    }
 }
 
index 1ce663e994f7a31c505540735aada53d34327364..42679ef9db76a889aadf2404875d869769a4b848 100644 (file)
@@ -614,6 +614,7 @@ intel_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
                                  intelImage->level,
                                  &intelImage->base.RowStride,
                                  intelImage->base.ImageOffsets);
+      intelImage->base.RowStride /= intelImage->mt->cpp;
    }
    else {
       /* Otherwise, the image should actually be stored in