isl: add Gfx12/12.5 restriction on 3D surfaces & compression
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 28 Jun 2023 11:29:30 +0000 (14:29 +0300)
committerMarge Bot <emma+marge@anholt.net>
Fri, 1 Sep 2023 23:22:18 +0000 (23:22 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

src/intel/isl/isl.c

index 8e7b3ed..06bd98d 100644 (file)
@@ -2875,6 +2875,23 @@ isl_surf_supports_ccs(const struct isl_device *dev,
       if (surf->dim == ISL_SURF_DIM_3D)
          return false;
 
+      /* BSpec 44930: (Gfx12, Gfx12.5)
+       *
+       *    "Compression of 3D Ys surfaces with 64 or 128 bpp is not supported
+       *     in Gen12. Moreover, "Render Target Fast-clear Enable" command is
+       *     not supported for any 3D Ys surfaces. except when Surface is a
+       *     Procdural Texture."
+       *
+       * Since the note applies to MTL, we apply this to TILE64 too.
+       */
+      uint32_t format_bpb = isl_format_get_layout(surf->format)->bpb;
+      if (ISL_GFX_VER(dev) == 12 &&
+          surf->dim == ISL_SURF_DIM_3D &&
+          (surf->tiling == ISL_TILING_ICL_Ys ||
+           surf->tiling == ISL_TILING_64) &&
+          (format_bpb == 64 || format_bpb == 128))
+         return false;
+
       /* TODO: Handle the other tiling formats */
       if (surf->tiling != ISL_TILING_Y0 && surf->tiling != ISL_TILING_4 &&
           surf->tiling != ISL_TILING_64)