mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
pan/format: Use HW version to determine siting for YUV 422 formats
On v10, only YUV 420 formats support center_y or center siting.
On previous HW versions, YUV 422 formats support center_y siting but not
center_x or center siting.
Fixes: 83c76cceaf ("panfrost: advertise YUV formats for valhall")
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33104>
This commit is contained in:
parent
1da221427e
commit
23aa784c05
1 changed files with 13 additions and 7 deletions
|
|
@ -137,6 +137,12 @@ const struct pan_blendable_format
|
|||
#define YUV_NO_SWAP (0)
|
||||
#define YUV_SWAP (1)
|
||||
|
||||
#if PAN_ARCH <= 9
|
||||
#define MALI_YUV_CR_SITING_CENTER_422 (MALI_YUV_CR_SITING_CENTER_Y)
|
||||
#else
|
||||
#define MALI_YUV_CR_SITING_CENTER_422 (MALI_YUV_CR_SITING_CENTER_X)
|
||||
#endif
|
||||
|
||||
#define FMT_YUV(pipe, mali, swizzle, swap, siting, flags) \
|
||||
[PIPE_FORMAT_##pipe] = { \
|
||||
.hw = (MALI_YUV_SWIZZLE_##swizzle) | ((YUV_##swap) << 3) | \
|
||||
|
|
@ -170,20 +176,20 @@ const struct panfrost_format GENX(panfrost_pipe_format)[PIPE_FORMAT_COUNT] = {
|
|||
|
||||
#if PAN_ARCH >= 7
|
||||
/* Multiplane formats */
|
||||
FMT_YUV(R8G8_R8B8_UNORM, YUYV8, UVYA, NO_SWAP, CENTER_Y, _T__),
|
||||
FMT_YUV(G8R8_B8R8_UNORM, VYUY8, UYVA, SWAP, CENTER_Y, _T__),
|
||||
FMT_YUV(R8B8_R8G8_UNORM, YUYV8, VYUA, NO_SWAP, CENTER_Y, _T__),
|
||||
FMT_YUV(B8R8_G8R8_UNORM, VYUY8, VUYA, SWAP, CENTER_Y, _T__),
|
||||
FMT_YUV(R8G8_R8B8_UNORM, YUYV8, UVYA, NO_SWAP, CENTER_422, _T__),
|
||||
FMT_YUV(G8R8_B8R8_UNORM, VYUY8, UYVA, SWAP, CENTER_422, _T__),
|
||||
FMT_YUV(R8B8_R8G8_UNORM, YUYV8, VYUA, NO_SWAP, CENTER_422, _T__),
|
||||
FMT_YUV(B8R8_G8R8_UNORM, VYUY8, VUYA, SWAP, CENTER_422, _T__),
|
||||
FMT_YUV(R8_G8B8_420_UNORM, Y8_UV8_420, YUVA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R8_B8G8_420_UNORM, Y8_UV8_420, YVUA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R8_G8_B8_420_UNORM, Y8_U8_V8_420, YUVA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R8_B8_G8_420_UNORM, Y8_U8_V8_420, YVUA, NO_SWAP, CENTER, _T__),
|
||||
|
||||
FMT_YUV(R8_G8B8_422_UNORM, Y8_UV8_422, YUVA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R8_B8G8_422_UNORM, Y8_UV8_422, YVUA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R8_G8B8_422_UNORM, Y8_UV8_422, YUVA, NO_SWAP, CENTER_422, _T__),
|
||||
FMT_YUV(R8_B8G8_422_UNORM, Y8_UV8_422, YVUA, NO_SWAP, CENTER_422, _T__),
|
||||
|
||||
FMT_YUV(R10_G10B10_420_UNORM, Y10_UV10_420, YUVA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R10_G10B10_422_UNORM, Y10_UV10_422, YUVA, NO_SWAP, CENTER, _T__),
|
||||
FMT_YUV(R10_G10B10_422_UNORM, Y10_UV10_422, YUVA, NO_SWAP, CENTER_422, _T__),
|
||||
#endif
|
||||
|
||||
FMTC(ETC1_RGB8, ETC2_RGB8, RGBA8_UNORM, RGB1, L),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue