From: Eric Anholt Date: Tue, 16 Mar 2010 23:11:05 +0000 (-0700) Subject: intel: Remove level_offset now that it's unused. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c51390e4b5e04b992e50fcbed751024e6c329de;p=mesa.git intel: Remove level_offset now that it's unused. This is the last pitch-dependent part of miptree setup. --- diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index da17809f16c..ac9e135a01a 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -351,13 +351,12 @@ intel_miptree_set_level_info(struct intel_mipmap_tree *mt, mt->level[level].width = w; mt->level[level].height = h; mt->level[level].depth = d; - mt->level[level].level_offset = (x + y * mt->pitch) * mt->cpp; mt->level[level].level_x = x; mt->level[level].level_y = y; mt->level[level].nr_images = nr_images; - DBG("%s level %d size: %d,%d,%d offset %d,%d (0x%x)\n", __FUNCTION__, - level, w, h, d, x, y, mt->level[level].level_offset); + DBG("%s level %d size: %d,%d,%d offset %d,%d\n", __FUNCTION__, + level, w, h, d, x, y); assert(nr_images); assert(!mt->level[level].x_offset); diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h index b19c548def3..7f3468f1153 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h @@ -62,14 +62,6 @@ */ struct intel_mipmap_level { - /** - * Byte offset to the base of this level. - * - * This is used for mipmap levels of 1D/2D/3D textures. However, CUBE - * layouts spread images around the whole tree, so the level offset is - * always zero in that case. - */ - GLuint level_offset; /** Offset to this miptree level, used in computing x_offset. */ GLuint level_x; /** Offset to this miptree level, used in computing y_offset. */ @@ -81,8 +73,8 @@ struct intel_mipmap_level /** Number of images at this level: 1 for 1D/2D, 6 for CUBE, depth for 3D */ GLuint nr_images; - /** - * Byte offset from level_offset to the image for each cube face or depth + /** @{ + * offsets from level_[xy] to the image for each cube face or depth * level. * * Pretty much have to accept that hardware formats @@ -91,6 +83,7 @@ struct intel_mipmap_level * so have to store them as a lookup table. */ GLuint *x_offset, *y_offset; + /** @} */ }; struct intel_mipmap_tree