summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_tex_layout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c
index eaea49bf55f..4c7e88ce770 100644
--- a/src/mesa/drivers/dri/i965/brw_tex_layout.c
+++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c
@@ -124,7 +124,8 @@ brw_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree *mt)
mt->total_height += y;
width = minify(width);
height = minify(height);
- depth = minify(depth);
+ if (mt->target == GL_TEXTURE_3D)
+ depth = minify(depth);
if (mt->compressed) {
pack_y_pitch = (height + 3) / 4;