isl: Don't align phys_slice0_sa.width twice
authorChad Versace <chad.versace@intel.com>
Tue, 5 Jan 2016 22:28:28 +0000 (14:28 -0800)
committerChad Versace <chad.versace@intel.com>
Wed, 6 Jan 2016 17:38:57 +0000 (09:38 -0800)
It's already aligned to the format's block width. Don't align it again
in isl_calc_row_pitch().

src/isl/isl.c

index 4a1c9f4a94a9feef2e2034af397c164f075548d1..72fc4b8d9e1c23debb5a5fb30d10d2d260c3685c 100644 (file)
@@ -821,8 +821,8 @@ isl_calc_row_pitch(const struct isl_device *dev,
     *    texels, and must be converted to bytes based on the surface format
     *    being used to determine whether additional pages need to be defined.
     */
-   row_pitch = MAX(row_pitch,
-                   fmtl->bs * isl_align_div_npot(phys_slice0_sa->w, fmtl->bw));
+   assert(phys_slice0_sa->w % fmtl->bw == 0);
+   row_pitch = MAX(row_pitch, fmtl->bs * phys_slice0_sa->w);
 
    switch (tile_info->tiling) {
    case ISL_TILING_LINEAR: