From 0e33bb56a4e404f7fa4a58f359bab8d50ae8cfba Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 14 Aug 2023 13:50:18 -0500 Subject: [PATCH] blorp: Use R8G8_UINT for YCRCB_* formats with CCS BLORP uses the get_ccs_compatible_copy_format() based on whether or not ISL claims the format supports CCS_E, not whether or not CCS_E is used on the image. This is probably a good thing as it improves consistency. However, it means that we need CCS-compatible formats for YCRCB_* formats even if we never use them with CCS_E enabled. In practice, these do actually seem to work according to the Vulkan CTS but coverage is likely far less than perfect. Reviewed-by: Nanley Chery Part-of: --- src/intel/blorp/blorp_blit.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index baa1535..57aced3 100644 --- a/src/intel/blorp/blorp_blit.c +++ b/src/intel/blorp/blorp_blit.c @@ -2740,6 +2740,18 @@ get_ccs_compatible_copy_format(const struct isl_format_layout *fmtl) case ISL_FORMAT_R8G8_UINT: return ISL_FORMAT_R8G8_UINT; + case ISL_FORMAT_YCRCB_NORMAL: + case ISL_FORMAT_YCRCB_SWAPY: + case ISL_FORMAT_YCRCB_SWAPUV: + case ISL_FORMAT_YCRCB_SWAPUVY: + /* Tiger Lake starts claiming CCS_E support for certain YCRCB formats. + * BLORP chooses to take the CCS-compatible format path whenever ISL + * claims CCS_E support on a format, not when CCS_E is actually used. + * Therefore, if these formats are going to be used with BLORP, we need + * a CCS-compatible format. R8G8_UINT seems as good as any. + */ + return ISL_FORMAT_R8G8_UINT; + case ISL_FORMAT_B5G5R5X1_UNORM: case ISL_FORMAT_B5G5R5X1_UNORM_SRGB: case ISL_FORMAT_B5G5R5A1_UNORM: -- 2.7.4