From b51e0fafdf6a39df1b0d1208595c92d5fa9ceba6 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 18 Dec 2009 16:49:32 -0800 Subject: 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. --- src/mesa/drivers/dri/i915/i915_texstate.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c index f52ff2bcc4..bcab043e97 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, -- cgit v1.2.3