intel: code clean-ups
authorBrian Paul <brianp@vmware.com>
Mon, 12 Oct 2009 23:40:33 +0000 (17:40 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 13 Oct 2009 00:12:00 +0000 (18:12 -0600)
src/mesa/drivers/dri/intel/intel_mipmap_tree.c

index d9d2edfe190ee218eb7c0971017f3987a0d08f5b..cc23a8905a342917788bd8d29cc00ea4898d5617 100644 (file)
@@ -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,