From c394f2f0ea25c9ca83f0eed3f96c7376eb780bab Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Mon, 16 Aug 2021 09:08:24 -0700 Subject: [PATCH] iris: Drop redundant iris_resource_disable_aux call Drop the call to iris_resource_disable_aux in iris_resource_configure_aux. With the previous patches, we no longer create CCS surfaces and pick the AUX_NONE usage. As a result, if the aux usage is NONE, all iris_resource fields already indicate that aux is disabled. Reviewed-by: Kenneth Graunke Part-of: --- src/gallium/drivers/iris/iris_resource.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 79a8abcf56b..1e05b9e67df 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -773,7 +773,8 @@ iris_resource_configure_aux(struct iris_screen *screen, } else if (want_ccs_e_for_format(devinfo, res->surf.format)) { res->aux.possible_usages |= devinfo->ver < 12 ? 1 << ISL_AUX_USAGE_CCS_E : 1 << ISL_AUX_USAGE_GFX12_CCS_E; - } else if (isl_format_supports_ccs_d(devinfo, res->surf.format)) { + } else { + assert(isl_format_supports_ccs_d(devinfo, res->surf.format)); res->aux.possible_usages |= 1 << ISL_AUX_USAGE_CCS_D; } } @@ -788,9 +789,6 @@ iris_resource_configure_aux(struct iris_screen *screen, switch (res->aux.usage) { case ISL_AUX_USAGE_NONE: - /* Update relevant fields to indicate that aux is disabled. */ - iris_resource_disable_aux(res); - /* Having no aux buffer is only okay if there's no modifier with aux. */ return !res->mod_info || res->mod_info->aux_usage == ISL_AUX_USAGE_NONE; case ISL_AUX_USAGE_HIZ: