summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915tex/i915_tex_layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i915tex/i915_tex_layout.c')
-rw-r--r--src/mesa/drivers/dri/i915tex/i915_tex_layout.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i915tex/i915_tex_layout.c b/src/mesa/drivers/dri/i915tex/i915_tex_layout.c
index 2e1600cfdf..7b761a7b22 100644
--- a/src/mesa/drivers/dri/i915tex/i915_tex_layout.c
+++ b/src/mesa/drivers/dri/i915tex/i915_tex_layout.c
@@ -113,7 +113,7 @@ i915_miptree_layout(struct intel_mipmap_tree * mt)
*/
for (level = mt->first_level; level <= MAX2(8, mt->last_level);
level++) {
- intel_miptree_set_level_info(mt, level, 1, 0, mt->total_height,
+ intel_miptree_set_level_info(mt, level, depth, 0, mt->total_height,
width, height, depth);
@@ -161,11 +161,9 @@ i915_miptree_layout(struct intel_mipmap_tree * mt)
if (mt->compressed)
img_height = MAX2(1, height / 4);
else
- img_height = MAX2(2, height);
+ img_height = (MAX2(2, height) + 1) & ~1;
mt->total_height += img_height;
- mt->total_height += 1;
- mt->total_height &= ~1;
width = minify(width);
height = minify(height);