summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_layout.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_layout.c b/src/mesa/drivers/dri/intel/intel_tex_layout.c
index 91ee55e2237..9d8152375d8 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_layout.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_layout.c
@@ -97,11 +97,9 @@ void i945_miptree_layout_2d(struct intel_context *intel,
intel_miptree_set_level_info(mt, level, nr_images, x, y, width,
height, 1);
+ img_height = ALIGN(height, align_h);
if (mt->compressed)
- img_height = MAX2(1, height/4);
- else
- img_height = ALIGN(height, align_h);
-
+ img_height /= align_h;
/* Because the images are packed better, the final offset
* might not be the maximal one: