From: Michel Dänzer Date: Mon, 9 Apr 2007 12:57:08 +0000 (+0200) Subject: i915tex: Fix some mismatches between texels or bytes for pitch/stride. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e8292d28e4aeb96f70140ed627c24b6f30b50a80;p=mesa.git i915tex: Fix some mismatches between texels or bytes for pitch/stride. --- diff --git a/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c b/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c index 93372f4dcc8..8e83028b26c 100644 --- a/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c @@ -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; } } diff --git a/src/mesa/drivers/dri/i915tex/intel_tex_image.c b/src/mesa/drivers/dri/i915tex/intel_tex_image.c index 1ce663e994f..42679ef9db7 100644 --- a/src/mesa/drivers/dri/i915tex/intel_tex_image.c +++ b/src/mesa/drivers/dri/i915tex/intel_tex_image.c @@ -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