From 99ffa4043ef6611e86b87e2b4a441f3ac42fc8cd Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Thu, 4 May 2023 13:36:55 -0700 Subject: [PATCH] intel/isl: Add a score for DG2_RC_CCS This enables the DG2 render compression modifier in anv. When I tested this against vkcube, I observed that the full resolve which happened at the end of every frame was converted to a partial resolve, allowing the framebuffer to retain compression. According to Caleb Callaway's testing, enabling this modifier positively impacts the FPS of the following game benchmarks: - Strange Brigade.vk-g6 +12.78% - Strange Brigade.dx12vk-g6 + 9.33% - Shadow of the Tomb Raider.vk-g6-lx + 2.37% - Dota 2 (replay Jul 2020).vk-g6 + 2.28% Thanks to Felix Degrood for pointing out that Strange Brigade would benefit from this optimization. Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/isl/isl_drm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/intel/isl/isl_drm.c b/src/intel/isl/isl_drm.c index 0520c0dd07b..ea52deef500 100644 --- a/src/intel/isl/isl_drm.c +++ b/src/intel/isl/isl_drm.c @@ -219,6 +219,14 @@ isl_drm_modifier_get_score(const struct intel_device_info *devinfo, return 0; return 3; + case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS: + if (!intel_device_info_is_dg2(devinfo)) + return 0; + + if (INTEL_DEBUG(DEBUG_NO_CCS)) + return 0; + + return 4; } }