From ab56a9eecd87bb8ea2ae779648459b7eda8509ec Mon Sep 17 00:00:00 2001 From: Jianxun Zhang Date: Wed, 2 Oct 2024 12:41:48 -0700 Subject: [PATCH] isl: Allow CCS in more cases (xe2) By restricting these limitations up to GFX 12, CCS support can be present on these cases that we think Xe2+ platform should support compression. Noticeably, CCS is allowed on depth resources without HiZ, multi-sampled resources without CCS, and multi-sampled stencil resources. Signed-off-by: Jianxun Zhang Reviewed-by: Nanley Chery Part-of: --- src/intel/isl/isl.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index c3a31056181..182a22dcacb 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -3153,7 +3153,7 @@ isl_surf_supports_ccs(const struct isl_device *dev, } } - if (ISL_GFX_VER(dev) >= 12) { + if (ISL_GFX_VER(dev) == 12) { if (isl_surf_usage_is_stencil(surf->usage)) { /* HiZ and MCS aren't allowed with stencil */ assert(hiz_or_mcs_surf == NULL || hiz_or_mcs_surf->size_B == 0); @@ -3216,14 +3216,12 @@ isl_surf_supports_ccs(const struct isl_device *dev, * 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 && + if (surf->dim == ISL_SURF_DIM_3D && (surf->tiling == ISL_TILING_ICL_Ys || isl_tiling_is_64(surf->tiling)) && (format_bpb == 64 || format_bpb == 128)) return false; - } else { - /* ISL_GFX_VER(dev) < 12 */ + } else if (ISL_GFX_VER(dev) < 12) { if (surf->samples > 1) return false;