summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-12 17:40:33 -0600
committerBrian Paul <[email protected]>2009-10-12 18:12:00 -0600
commitc932e21fa848562325f666dce5db3b09bc61bffa (patch)
treebe144cde9b3cb7617ccde5ccf4278ab03cf91fa3 /src
parente6594a22f298833eeb6881795b24d03d2fd8e898 (diff)
intel: code clean-ups
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index d9d2edfe190..cc23a8905a3 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -476,16 +476,17 @@ intel_miptree_image_data(struct intel_context *intel,
GLuint src_row_pitch,
GLuint src_image_pitch)
{
- GLuint depth = dst->level[level].depth;
+ const GLuint depth = dst->level[level].depth;
GLuint i;
- GLuint height = 0;
DBG("%s: %d/%d\n", __FUNCTION__, face, level);
for (i = 0; i < depth; i++) {
GLuint dst_offset = intel_miptree_image_offset(dst, face, level, i);
- height = dst->level[level].height;
- if(dst->compressed)
+ GLuint height = dst->level[level].height;
+
+ if (dst->compressed)
height = (height + 3) / 4;
+
intel_region_data(intel,
dst->region,
dst_offset,