intel/isl: Add scores for GEN12_RC_CCS and MTL_RC_CCS
authorNanley Chery <nanley.g.chery@intel.com>
Fri, 25 Aug 2023 22:09:39 +0000 (18:09 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 23 Oct 2023 21:37:24 +0000 (21:37 +0000)
Now that these CCS-enabled modifiers have non-zero scores, anv is
enabled to use them.

We found this to improve the performance of Borderlands 3 by 18.73%.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6701
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Tested-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>

src/intel/isl/isl_drm.c

index b4bcf9cb1d412cd386220c32f82da92a33fd09b7..499acf7921b42a77d6a4e3f5ddc7b1e6447beee9 100644 (file)
@@ -214,6 +214,14 @@ isl_drm_modifier_get_score(const struct intel_device_info *devinfo,
       if (INTEL_DEBUG(DEBUG_NO_CCS))
          return 0;
 
+      return 4;
+   case I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS:
+      if (devinfo->verx10 != 120)
+         return 0;
+
+      if (INTEL_DEBUG(DEBUG_NO_CCS))
+         return 0;
+
       return 4;
    case I915_FORMAT_MOD_4_TILED:
       /* Gfx12.5 introduces Tile4. */
@@ -228,6 +236,14 @@ isl_drm_modifier_get_score(const struct intel_device_info *devinfo,
       if (INTEL_DEBUG(DEBUG_NO_CCS))
          return 0;
 
+      return 4;
+   case I915_FORMAT_MOD_4_TILED_MTL_RC_CCS:
+      if (!intel_device_info_is_mtl(devinfo))
+         return 0;
+
+      if (INTEL_DEBUG(DEBUG_NO_CCS))
+         return 0;
+
       return 4;
    }
 }