From 26b2bdcfe01291359edebb1b35239cfd1f5127c0 Mon Sep 17 00:00:00 2001 From: Sagar Ghuge Date: Wed, 16 Aug 2023 11:49:03 -0700 Subject: [PATCH] iris,crocus: drop unnecessary DEBUG_NO_CCS/NO_HIZ checks Now isl_surf_supports_ccs helper handles DEBUG_NO_CCS check and isl_surf_get_hiz_surf handles DEBUG_NO_HIZ, so we don't need to check it everywhere. Signed-off-by: Sagar Ghuge Reviewed-by: Nanley Chery Part-of: --- src/gallium/drivers/crocus/crocus_resource.c | 3 +-- src/gallium/drivers/iris/iris_resource.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/crocus/crocus_resource.c b/src/gallium/drivers/crocus/crocus_resource.c index cecf771ab47..16627914a1e 100644 --- a/src/gallium/drivers/crocus/crocus_resource.c +++ b/src/gallium/drivers/crocus/crocus_resource.c @@ -432,11 +432,10 @@ crocus_resource_configure_aux(struct crocus_screen *screen, isl_surf_get_mcs_surf(&screen->isl_dev, &res->surf, &res->aux.surf); const bool has_hiz = devinfo->ver >= 6 && !res->mod_info && - !INTEL_DEBUG(DEBUG_NO_HIZ) && isl_surf_get_hiz_surf(&screen->isl_dev, &res->surf, &res->aux.surf); const bool has_ccs = - devinfo->ver >= 7 && !res->mod_info && !INTEL_DEBUG(DEBUG_NO_CCS) && + devinfo->ver >= 7 && !res->mod_info && isl_surf_get_ccs_surf(&screen->isl_dev, &res->surf, NULL, &res->aux.surf, 0); diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 30dacda95e3..7bb5b21cb2a 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -840,10 +840,10 @@ iris_resource_configure_aux(struct iris_screen *screen, const bool has_mcs = isl_surf_get_mcs_surf(&screen->isl_dev, &res->surf, &res->aux.surf); - const bool has_hiz = !INTEL_DEBUG(DEBUG_NO_HIZ) && + const bool has_hiz = isl_surf_get_hiz_surf(&screen->isl_dev, &res->surf, &res->aux.surf); - const bool has_ccs = !INTEL_DEBUG(DEBUG_NO_CCS) && + const bool has_ccs = iris_get_ccs_surf_or_support(&screen->isl_dev, &res->surf, &res->aux.surf, &res->aux.extra_aux.surf);