From: Eric Anholt Date: Sat, 19 Dec 2009 00:49:32 +0000 (-0800) Subject: i915: Clean up some unnecessary x/y miptree code. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b51e0fafdf6a39df1b0d1208595c92d5fa9ceba6;p=mesa.git i915: Clean up some unnecessary x/y miptree code. The base of the texture is always the base of the miptree. If it wasn't, we'd have issues with this code due to miptrees not walking the same direction for all LODs. --- diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c index f52ff2bcc4a..bcab043e97f 100644 --- a/src/mesa/drivers/dri/i915/i915_texstate.c +++ b/src/mesa/drivers/dri/i915/i915_texstate.c @@ -175,18 +175,9 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3) pitch = intelObj->pitchOverride; } else { - GLuint dst_x, dst_y; - - intel_miptree_get_image_offset(intelObj->mt, intelObj->firstLevel, 0, 0, - &dst_x, &dst_y); - dri_bo_reference(intelObj->mt->region->buffer); i915->state.tex_buffer[unit] = intelObj->mt->region->buffer; - /* XXX: This calculation is probably broken for tiled images with - * a non-page-aligned offset. - */ - i915->state.tex_offset[unit] = (dst_x + dst_y * intelObj->mt->pitch) * - intelObj->mt->cpp; + i915->state.tex_offset[unit] = 0; /* Always the origin of the miptree */ format = translate_texture_format(firstImage->TexFormat, firstImage->InternalFormat,