From: Rohan Garg Date: Tue, 9 May 2023 18:17:13 +0000 (+0200) Subject: isl: add helper to check if aux usage is CCS_E X-Git-Tag: upstream/23.3.3~7992 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=963847735a7bd642292ef251416b55d0f726540b;p=platform%2Fupstream%2Fmesa.git isl: add helper to check if aux usage is CCS_E Signed-off-by: Rohan Garg Reviewed-by: Nanley Chery Part-of: --- diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h index 442c0fc..f0b943f 100644 --- a/src/intel/isl/isl.h +++ b/src/intel/isl/isl.h @@ -2211,6 +2211,13 @@ isl_aux_usage_has_ccs(enum isl_aux_usage usage) } static inline bool +isl_aux_usage_has_ccs_e(enum isl_aux_usage usage) +{ + return usage == ISL_AUX_USAGE_CCS_E || + usage == ISL_AUX_USAGE_GFX12_CCS_E; +} + +static inline bool isl_aux_state_has_valid_primary(enum isl_aux_state state) { return state == ISL_AUX_STATE_RESOLVED || diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index 72f433b..90cd640 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -695,8 +695,7 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state, * * If CCS_E is in use, the format must support it. */ - if (info->aux_usage == ISL_AUX_USAGE_CCS_E || - info->aux_usage == ISL_AUX_USAGE_GFX12_CCS_E) + if (isl_aux_usage_has_ccs_e(info->aux_usage)) assert(isl_format_supports_ccs_e(dev->info, info->view->format)); /* It also says: