isl: Handle npot ASTC block dimensions on Gen9+
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 18 May 2016 23:19:23 +0000 (16:19 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Fri, 20 May 2016 16:27:11 +0000 (09:27 -0700)
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/isl/isl.c

index ca2db845a2945a0d5b44622a79f549b68edb9e2b..e4bca1689cffb390a12f5a6e8e5dae461c5f7ad4 100644 (file)
@@ -481,8 +481,8 @@ isl_calc_phys_level0_extent_sa(const struct isl_device *dev,
          assert(info->samples == 1);
 
          *phys_level0_sa = (struct isl_extent4d) {
-            .w = isl_align(info->width, fmtl->bw),
-            .h = isl_align(info->height, fmtl->bh),
+            .w = isl_align_npot(info->width, fmtl->bw),
+            .h = isl_align_npot(info->height, fmtl->bh),
             .d = 1,
             .a = info->array_len,
          };
@@ -537,8 +537,8 @@ isl_calc_phys_level0_extent_sa(const struct isl_device *dev,
          assert(ISL_DEV_GEN(dev) >= 9);
 
          *phys_level0_sa = (struct isl_extent4d) {
-            .w = isl_align(info->width, fmtl->bw),
-            .h = isl_align(info->height, fmtl->bh),
+            .w = isl_align_npot(info->width, fmtl->bw),
+            .h = isl_align_npot(info->height, fmtl->bh),
             .d = 1,
             .a = info->depth,
          };