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 <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
This commit is contained in:
Faith Ekstrand 2023-08-14 13:50:18 -05:00 committed by Marge Bot
parent 3fff38f624
commit 0e33bb56a4

View file

@ -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: