panfrost: advertise support for YUYV and variants

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21109>
This commit is contained in:
Italo Nicola
2023-06-22 11:55:01 +00:00
committed by Marge Bot
parent 4685628411
commit c1ad78476d
+22
View File
@@ -170,10 +170,32 @@ const struct pan_blendable_format
}
#endif
#if PAN_ARCH == 7
#define YUV_NO_SWAP (0)
#define YUV_SWAP (1)
#define FMT_YUV(pipe, mali, swizzle, swap, siting, flags) \
[PIPE_FORMAT_##pipe] = { \
.hw = (MALI_YUV_SWIZZLE_##swizzle) | ((YUV_##swap) << 3) | \
((MALI_YUV_CR_SITING_##siting) << 9) | ((MALI_##mali) << 12), \
.bind = FLAGS_##flags, \
}
#endif
/* clang-format off */
const struct panfrost_format GENX(panfrost_pipe_format)[PIPE_FORMAT_COUNT] = {
FMT(NONE, CONSTANT, 0000, L, VTR_),
#if PAN_ARCH == 7
/* Multiplane formats */
FMT_YUV(R8G8_R8B8_UNORM, YUYV8, UVYA, NO_SWAP, CO_SITED, _T__),
FMT_YUV(G8R8_B8R8_UNORM, VYUY8, UYVA, SWAP, CO_SITED, _T__),
FMT_YUV(R8B8_R8G8_UNORM, YUYV8, VYUA, NO_SWAP, CO_SITED, _T__),
FMT_YUV(B8R8_G8R8_UNORM, VYUY8, VUYA, SWAP, CO_SITED, _T__),
FMT_YUV(R8_G8B8_420_UNORM, Y8_UV8_420, YUVA, NO_SWAP, CO_SITED, _T__),
FMT_YUV(G8_B8R8_420_UNORM, Y8_UV8_420, YVUA, NO_SWAP, CO_SITED, _T__),
#endif
#if PAN_ARCH <= 7
FMT(ETC1_RGB8, ETC2_RGB8, RGB1, L, _T__),
FMT(ETC2_RGB8, ETC2_RGB8, RGB1, L, _T__),