From: Bas Nieuwenhuizen Date: Sun, 24 May 2020 22:05:20 +0000 (+0200) Subject: util/format: Add more multi-planar formats. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cf9926714783efa4524ca2afd62a9817dcbccf06;p=mesa.git util/format: Add more multi-planar formats. These don't have a fourcc code as far as I can tell, but we want them for internal Vulkan use. Reviewed-by: Eric Anholt Part-of: --- diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h index 8b10aae40a6..f1a4652c36e 100644 --- a/src/gallium/include/pipe/p_format.h +++ b/src/gallium/include/pipe/p_format.h @@ -240,6 +240,18 @@ enum pipe_format { PIPE_FORMAT_NV12, PIPE_FORMAT_NV21, + /* PIPE_FORMAT_Y8_U8_V8_420_UNORM = IYUV */ + /* PIPE_FORMAT_Y8_U8V8_420_UNORM = NV12 */ + PIPE_FORMAT_Y8_U8_V8_422_UNORM, + PIPE_FORMAT_Y8_U8V8_422_UNORM, + PIPE_FORMAT_Y8_U8_V8_444_UNORM, + + PIPE_FORMAT_Y16_U16_V16_420_UNORM, + /* PIPE_FORMAT_Y16_U16V16_420_UNORM */ + PIPE_FORMAT_Y16_U16_V16_422_UNORM, + PIPE_FORMAT_Y16_U16V16_422_UNORM, + PIPE_FORMAT_Y16_U16_V16_444_UNORM, + PIPE_FORMAT_A4R4_UNORM, PIPE_FORMAT_R4A4_UNORM, PIPE_FORMAT_R8A8_UNORM, @@ -571,11 +583,19 @@ pipe_format_to_chroma_format(enum pipe_format format) case PIPE_FORMAT_IYUV: case PIPE_FORMAT_P010: case PIPE_FORMAT_P016: + case PIPE_FORMAT_Y16_U16_V16_420_UNORM: return PIPE_VIDEO_CHROMA_FORMAT_420; case PIPE_FORMAT_UYVY: case PIPE_FORMAT_YUYV: case PIPE_FORMAT_YV16: + case PIPE_FORMAT_Y8_U8_V8_422_UNORM: + case PIPE_FORMAT_Y8_U8V8_422_UNORM: + case PIPE_FORMAT_Y16_U16_V16_422_UNORM: + case PIPE_FORMAT_Y16_U16V16_422_UNORM: return PIPE_VIDEO_CHROMA_FORMAT_422; + case PIPE_FORMAT_Y8_U8_V8_444_UNORM: + case PIPE_FORMAT_Y16_U16_V16_444_UNORM: + return PIPE_VIDEO_CHROMA_FORMAT_444; default: return PIPE_VIDEO_CHROMA_FORMAT_NONE; } diff --git a/src/util/format/u_format.csv b/src/util/format/u_format.csv index 97c76a92880..2f71e70e736 100644 --- a/src/util/format/u_format.csv +++ b/src/util/format/u_format.csv @@ -386,6 +386,15 @@ PIPE_FORMAT_IYUV , planar3, 1, 1, 1, , , , , xy PIPE_FORMAT_NV12 , planar2, 1, 1, 1, , , , , xyzw, yuv PIPE_FORMAT_NV21 , planar2, 1, 1, 1, , , , , xyzw, yuv +PIPE_FORMAT_Y8_U8_V8_422_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv +PIPE_FORMAT_Y8_U8V8_422_UNORM , planar2, 1, 1, 1, , , , , xyzw, yuv +PIPE_FORMAT_Y8_U8_V8_444_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv + +PIPE_FORMAT_Y16_U16_V16_420_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv +PIPE_FORMAT_Y16_U16_V16_422_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv +PIPE_FORMAT_Y16_U16V16_422_UNORM , planar2, 1, 1, 1, , , , , xyzw, yuv +PIPE_FORMAT_Y16_U16_V16_444_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv + PIPE_FORMAT_P010 , planar2, 1, 1, 1, , , , , xyzw, yuv PIPE_FORMAT_P016 , planar2, 1, 1, 1, , , , , xyzw, yuv diff --git a/src/util/format/u_format.h b/src/util/format/u_format.h index 1b6f0b88289..f13dc9fc0d8 100644 --- a/src/util/format/u_format.h +++ b/src/util/format/u_format.h @@ -1336,13 +1336,21 @@ util_format_get_plane_format(enum pipe_format format, unsigned plane) case PIPE_FORMAT_YV12: case PIPE_FORMAT_YV16: case PIPE_FORMAT_IYUV: + case PIPE_FORMAT_Y8_U8_V8_422_UNORM: + case PIPE_FORMAT_Y8_U8_V8_444_UNORM: return PIPE_FORMAT_R8_UNORM; case PIPE_FORMAT_NV12: + case PIPE_FORMAT_Y8_U8V8_422_UNORM: return !plane ? PIPE_FORMAT_R8_UNORM : PIPE_FORMAT_RG88_UNORM; case PIPE_FORMAT_NV21: return !plane ? PIPE_FORMAT_R8_UNORM : PIPE_FORMAT_GR88_UNORM; + case PIPE_FORMAT_Y16_U16_V16_420_UNORM: + case PIPE_FORMAT_Y16_U16_V16_422_UNORM: + case PIPE_FORMAT_Y16_U16_V16_444_UNORM: + return PIPE_FORMAT_R16_UNORM; case PIPE_FORMAT_P010: case PIPE_FORMAT_P016: + case PIPE_FORMAT_Y16_U16V16_422_UNORM: return !plane ? PIPE_FORMAT_R16_UNORM : PIPE_FORMAT_R16G16_UNORM; default: return format; @@ -1361,6 +1369,11 @@ util_format_get_plane_width(enum pipe_format format, unsigned plane, case PIPE_FORMAT_NV21: case PIPE_FORMAT_P010: case PIPE_FORMAT_P016: + case PIPE_FORMAT_Y8_U8_V8_422_UNORM: + case PIPE_FORMAT_Y8_U8V8_422_UNORM: + case PIPE_FORMAT_Y16_U16_V16_420_UNORM: + case PIPE_FORMAT_Y16_U16_V16_422_UNORM: + case PIPE_FORMAT_Y16_U16V16_422_UNORM: return !plane ? width : (width + 1) / 2; default: return width; @@ -1378,6 +1391,7 @@ util_format_get_plane_height(enum pipe_format format, unsigned plane, case PIPE_FORMAT_NV21: case PIPE_FORMAT_P010: case PIPE_FORMAT_P016: + case PIPE_FORMAT_Y16_U16_V16_420_UNORM: return !plane ? height : (height + 1) / 2; case PIPE_FORMAT_YV16: default: diff --git a/src/util/format/u_format_yuv.c b/src/util/format/u_format_yuv.c index ae088f43978..a6e0c2f0796 100644 --- a/src/util/format/u_format_yuv.c +++ b/src/util/format/u_format_yuv.c @@ -1147,3 +1147,143 @@ util_format_g8r8_b8r8_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED uns void util_format_g8r8_b8r8_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src, UNUSED unsigned i, UNUSED unsigned j) {} + +void +util_format_y8_u8_v8_422_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y8_u8_v8_422_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y8_u8_v8_422_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y8_u8_v8_422_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const float *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y8_u8_v8_422_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src, + UNUSED unsigned i, UNUSED unsigned j) {} + +void +util_format_y8_u8v8_422_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y8_u8v8_422_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y8_u8v8_422_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y8_u8v8_422_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const float *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y8_u8v8_422_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src, + UNUSED unsigned i, UNUSED unsigned j) {} + +void +util_format_y8_u8_v8_444_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y8_u8_v8_444_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y8_u8_v8_444_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y8_u8_v8_444_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const float *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y8_u8_v8_444_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src, + UNUSED unsigned i, UNUSED unsigned j) {} + +void +util_format_y16_u16_v16_420_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16_v16_420_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16_v16_420_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16_v16_420_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const float *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16_v16_420_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src, + UNUSED unsigned i, UNUSED unsigned j) {} + +void +util_format_y16_u16_v16_422_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16_v16_422_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16_v16_422_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16_v16_422_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const float *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16_v16_422_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src, + UNUSED unsigned i, UNUSED unsigned j) {} + +void +util_format_y16_u16v16_422_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16v16_422_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16v16_422_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16v16_422_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const float *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16v16_422_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src, + UNUSED unsigned i, UNUSED unsigned j) {} + +void +util_format_y16_u16_v16_444_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16_v16_444_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16_v16_444_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride, + UNUSED const uint8_t *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16_v16_444_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride, + UNUSED const float *src_row, UNUSED unsigned src_stride, + UNUSED unsigned width, UNUSED unsigned height) {} +void +util_format_y16_u16_v16_444_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src, + UNUSED unsigned i, UNUSED unsigned j) {} diff --git a/src/util/format/u_format_yuv.h b/src/util/format/u_format_yuv.h index 37f76dc014c..e7f03c8e157 100644 --- a/src/util/format/u_format_yuv.h +++ b/src/util/format/u_format_yuv.h @@ -448,4 +448,144 @@ void util_format_g8r8_b8r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); +void +util_format_y8_u8_v8_422_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y8_u8_v8_422_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y8_u8_v8_422_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y8_u8_v8_422_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, + const float *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y8_u8_v8_422_unorm_fetch_rgba_float(float *dst, const uint8_t *src, + unsigned i, unsigned j); + +void +util_format_y8_u8v8_422_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y8_u8v8_422_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y8_u8v8_422_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y8_u8v8_422_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, + const float *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y8_u8v8_422_unorm_fetch_rgba_float(float *dst, const uint8_t *src, + unsigned i, unsigned j); + +void +util_format_y8_u8_v8_444_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y8_u8_v8_444_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y8_u8_v8_444_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y8_u8_v8_444_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, + const float *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y8_u8_v8_444_unorm_fetch_rgba_float(float *dst, const uint8_t *src, + unsigned i, unsigned j); + +void +util_format_y16_u16_v16_420_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16_v16_420_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16_v16_420_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16_v16_420_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, + const float *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16_v16_420_unorm_fetch_rgba_float(float *dst, const uint8_t *src, + unsigned i, unsigned j); + +void +util_format_y16_u16_v16_422_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16_v16_422_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16_v16_422_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16_v16_422_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, + const float *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16_v16_422_unorm_fetch_rgba_float(float *dst, const uint8_t *src, + unsigned i, unsigned j); + +void +util_format_y16_u16v16_422_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16v16_422_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16v16_422_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16v16_422_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, + const float *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16v16_422_unorm_fetch_rgba_float(float *dst, const uint8_t *src, + unsigned i, unsigned j); + +void +util_format_y16_u16_v16_444_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16_v16_444_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16_v16_444_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16_v16_444_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, + const float *src_row, unsigned src_stride, + unsigned width, unsigned height); +void +util_format_y16_u16_v16_444_unorm_fetch_rgba_float(float *dst, const uint8_t *src, + unsigned i, unsigned j); + #endif /* U_FORMAT_YUV_H_ */ diff --git a/src/vulkan/util/vk_format.c b/src/vulkan/util/vk_format.c index 2b89e0bdeea..9ffd3b9e292 100644 --- a/src/vulkan/util/vk_format.c +++ b/src/vulkan/util/vk_format.c @@ -254,6 +254,22 @@ vk_format_to_pipe_format(enum VkFormat vkformat) return PIPE_FORMAT_IYUV; case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: return PIPE_FORMAT_NV12; + case VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM: + return PIPE_FORMAT_Y8_U8_V8_422_UNORM; + case VK_FORMAT_G8_B8R8_2PLANE_422_UNORM: + return PIPE_FORMAT_Y8_U8V8_422_UNORM; + case VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM: + return PIPE_FORMAT_Y8_U8_V8_444_UNORM; + case VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM: + return PIPE_FORMAT_Y16_U16_V16_420_UNORM; + case VK_FORMAT_G16_B16R16_2PLANE_420_UNORM: + return PIPE_FORMAT_P016; + case VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM: + return PIPE_FORMAT_Y16_U16_V16_422_UNORM; + case VK_FORMAT_G16_B16R16_2PLANE_422_UNORM: + return PIPE_FORMAT_Y16_U16V16_422_UNORM; + case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM: + return PIPE_FORMAT_Y16_U16_V16_444_UNORM; default: return PIPE_FORMAT_NONE; }