anv: Use the YCbCr format info from common code

We still maintain our own table of formats but all of the conversion and
sampling info we pull from common code.

Acked-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19950>
This commit is contained in:
Jason Ekstrand
2021-03-30 23:44:25 -05:00
committed by Marge Bot
parent 30a91d333d
commit 2ac771973d
5 changed files with 85 additions and 109 deletions

View File

@@ -3258,20 +3258,10 @@ struct anv_format_plane {
enum isl_format isl_format:16;
struct isl_swizzle swizzle;
/* Whether this plane contains chroma channels */
bool has_chroma;
/* For downscaling of YUV planes */
uint8_t denominator_scales[2];
/* How to map sampled ycbcr planes to a single 4 component element. */
struct isl_swizzle ycbcr_swizzle;
/* What aspect is associated to this plane */
VkImageAspectFlags aspect;
};
struct anv_format {
struct anv_format_plane planes[3];
VkFormat vk_format;