From a1e0b210612b040c0308ca35f5417d6dbf650085 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 4 May 2018 09:43:01 -0700 Subject: [PATCH] intel/isl: Add new aux modes available on gen12 v2. Add media compression. (Nanley) Co-authored-by: Nanley Chery Reviewed-by: Kenneth Graunke Reviewed-by: Jordan Justen --- src/intel/isl/isl.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h index 11d50a1d044..757d5fb0ae8 100644 --- a/src/intel/isl/isl.h +++ b/src/intel/isl/isl.h @@ -602,6 +602,21 @@ enum isl_aux_usage { * @invariant isl_surf::samples == 1 */ ISL_AUX_USAGE_CCS_E, + + /** The auxiliary surface provides full lossless media color compression + * + * @invariant isl_surf::samples == 1 + */ + ISL_AUX_USAGE_MC, + + /** The auxiliary surface is a HiZ surface and CCS is also enabled */ + ISL_AUX_USAGE_HIZ_CCS, + + /** The auxiliary surface is an MCS and CCS is also enabled + * + * @invariant isl_surf::samples > 1 + */ + ISL_AUX_USAGE_MCS_CCS, }; /** @@ -1639,11 +1654,28 @@ isl_tiling_to_i915_tiling(enum isl_tiling tiling); enum isl_tiling isl_tiling_from_i915_tiling(uint32_t tiling); +static inline bool +isl_aux_usage_has_hiz(enum isl_aux_usage usage) +{ + return usage == ISL_AUX_USAGE_HIZ || + usage == ISL_AUX_USAGE_HIZ_CCS; +} + +static inline bool +isl_aux_usage_has_mcs(enum isl_aux_usage usage) +{ + return usage == ISL_AUX_USAGE_MCS || + usage == ISL_AUX_USAGE_MCS_CCS; +} + static inline bool isl_aux_usage_has_ccs(enum isl_aux_usage usage) { return usage == ISL_AUX_USAGE_CCS_D || - usage == ISL_AUX_USAGE_CCS_E; + usage == ISL_AUX_USAGE_CCS_E || + usage == ISL_AUX_USAGE_MC || + usage == ISL_AUX_USAGE_HIZ_CCS || + usage == ISL_AUX_USAGE_MCS_CCS; } const struct isl_drm_modifier_info * ATTRIBUTE_CONST -- 2.30.2