isl: Fix row pitch for compressed formats
authorChad Versace <chad.versace@intel.com>
Mon, 25 Jan 2016 20:23:57 +0000 (12:23 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 27 Jan 2016 23:12:42 +0000 (15:12 -0800)
When calculating row pitch, the row's width in samples must be divided
by the format's block width. The commit below accidentally removed the
division.

    commit eea2d4d05987b4f8ad90a1588267f9495f1e9e99
    Author: Chad Versace <chad.versace@intel.com>
    Date:   Tue Jan 5 14:28:28 2016 -0800
    Subject: isl: Don't align phys_slice0_sa.width twice

src/isl/isl.c

index 357d0ea69c1aec8e1a6e2d42998ed72ff1c6fd5c..ec66f97b779f9af0355d69d8c5d30373b4f34d75 100644 (file)
@@ -895,7 +895,7 @@ isl_calc_row_pitch(const struct isl_device *dev,
     *    being used to determine whether additional pages need to be defined.
     */
    assert(phys_slice0_sa->w % fmtl->bw == 0);
-   row_pitch = MAX(row_pitch, fmtl->bs * phys_slice0_sa->w);
+   row_pitch = MAX(row_pitch, fmtl->bs * (phys_slice0_sa->w / fmtl->bw));
 
    switch (tile_info->tiling) {
    case ISL_TILING_LINEAR: