i965/skl: Fix aligning mt->total_width to the block size
[mesa.git] / src / mesa / drivers / dri / i965 / brw_tex_layout.c
index 998d8c427704ca418a543d2c87c631a46b8b5130..455984309facb89f74b533f82bb9f5cfedff0aaf 100644 (file)
@@ -366,9 +366,8 @@ brw_miptree_layout_2d(struct intel_mipmap_tree *mt)
 
    mt->total_width = mt->physical_width0;
 
-   if (mt->compressed) {
-       mt->total_width = ALIGN(mt->physical_width0, mt->align_w);
-   }
+   if (mt->compressed)
+       mt->total_width = ALIGN(mt->total_width, bw);
 
    /* May need to adjust width to accommodate the placement of
     * the 2nd mipmap.  This occurs when the alignment