Mesa (main): intel/isl: Require aux map for some 64K alignment

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Dec 11 04:39:15 UTC 2021


Module: Mesa
Branch: main
Commit: 91128b1a0fddbf50db0bd9c489cb6c3dab2ecc36
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=91128b1a0fddbf50db0bd9c489cb6c3dab2ecc36

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Tue Oct 26 10:03:15 2021 -0700

intel/isl: Require aux map for some 64K alignment

The comment states that 64K alignment of surfaces is required when an
aux map is present on the platform. However, the code checks for GFX12
instead of dev->info->has_aux_map. Update the code to match the comment.

Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13555>

---

 src/intel/isl/isl.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index 3e06463f55f..cc775ea5c3f 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -1867,15 +1867,15 @@ isl_surf_init_s(const struct isl_device *dev,
       if (tiling == ISL_TILING_GFX12_CCS)
          base_alignment_B = MAX(base_alignment_B, 4096);
 
-      /* Gfx12+ requires that images be 64K-aligned if they're going to used
-       * with CCS.  This is because the Aux translation table maps main
-       * surface addresses to aux addresses at a 64K (in the main surface)
-       * granularity.  Because we don't know for sure in ISL if a surface will
-       * use CCS, we have to guess based on the DISABLE_AUX usage bit.  The
-       * one thing we do know is that we haven't enable CCS on linear images
-       * yet so we can avoid the extra alignment there.
+      /* Platforms using an aux map require that images be 64K-aligned if
+       * they're going to used with CCS. This is because the Aux translation
+       * table maps main surface addresses to aux addresses at a 64K (in the
+       * main surface) granularity. Because we don't know for sure in ISL if
+       * a surface will use CCS, we have to guess based on the DISABLE_AUX
+       * usage bit. The one thing we do know is that we haven't enable CCS on
+       * linear images yet so we can avoid the extra alignment there.
        */
-      if (ISL_GFX_VER(dev) >= 12 &&
+      if (dev->info->has_aux_map &&
           !(info->usage & ISL_SURF_USAGE_DISABLE_AUX_BIT)) {
          base_alignment_B = MAX(base_alignment_B, 64 * 1024);
       }



More information about the mesa-commit mailing list