[intel] fix compressed image height
authorZou Nan hai <nanhai.zou@intel.com>
Thu, 28 Feb 2008 08:49:38 +0000 (16:49 +0800)
committerZou Nan hai <nanhai.zou@intel.com>
Thu, 28 Feb 2008 08:49:38 +0000 (16:49 +0800)
src/mesa/drivers/dri/intel/intel_mipmap_tree.c

index 3209545adcb37f5e1340dd229fbebd124712fb1c..48dcf071317f5956e4cadf3d0b7ea203eccbf07f 100644 (file)
@@ -420,7 +420,7 @@ intel_miptree_image_data(struct intel_context *intel,
    for (i = 0; i < depth; i++) {
       height = dst->level[level].height;
       if(dst->compressed)
-        height /= 4;
+        height = (height + 3) / 4;
       intel_region_data(intel,
                        dst->region,
                        dst_offset + dst_depth_offset[i] * dst->cpp, /* dst_offset */