From 930ea030ed159b92aab8ce830ae58fe74a717c0b Mon Sep 17 00:00:00 2001 From: Jianxun Zhang Date: Fri, 7 Jun 2024 19:25:51 -0700 Subject: [PATCH] isl: Initialize the last usage in isl_encode_aux_mode[] (xe2) The ISL_AUX_USAGE_STC_CCS is the last defined usage. We could get a random value from isl_encode_aux_mode[] once it is passed as index if its element is not initialized. Explicit initialization of ISL_AUX_USAGE_HIZ_CCS_WT is added too. Suggested by Nanley Chery Signed-off-by: Jianxun Zhang Reviewed-by: Nanley Chery Part-of: --- src/intel/isl/isl_surface_state.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c index 3aa97a3edd3..70312282834 100644 --- a/src/intel/isl/isl_surface_state.c +++ b/src/intel/isl/isl_surface_state.c @@ -85,6 +85,8 @@ static const uint32_t isl_encode_aux_mode[] = { [ISL_AUX_USAGE_MC] = AUX_NONE, [ISL_AUX_USAGE_MCS] = AUX_MCS, [ISL_AUX_USAGE_MCS_CCS] = AUX_MCS, + [ISL_AUX_USAGE_STC_CCS] = AUX_NONE, + [ISL_AUX_USAGE_HIZ_CCS_WT] = AUX_NONE, }; #elif GFX_VER >= 12 static const uint32_t isl_encode_aux_mode[] = {