util/format: Add VK_EXT_ycbcr_2plane_444_formats formats

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37174>
This commit is contained in:
David Rosca 2025-09-04 12:38:36 +02:00 committed by Marge Bot
parent ef01013b71
commit 10dbb0ed2a
2 changed files with 30 additions and 0 deletions

View file

@ -2122,6 +2122,32 @@
channels: [X4, UN12]
swizzles: [X, Y, Z, W]
# VK_EXT_ycbcr_2plane_444_formats
- name: G8_B8R8_444_UNORM
layout: planar2
colorspace: RGB
block: {width: 1, height: 1, depth: 1}
channels: [UN8]
swizzles: [X, Y, Z, W]
- name: X6G10_X6B10X6R10_444_UNORM
layout: planar2
colorspace: RGB
block: {width: 1, height: 1, depth: 1}
channels: [X6, UN10]
swizzles: [X, Y, Z, W]
- name: X4G12_X4B12X4R12_444_UNORM
layout: planar2
colorspace: RGB
block: {width: 1, height: 1, depth: 1}
channels: [X4, UN12]
swizzles: [X, Y, Z, W]
- name: Y16_U16V16_444_UNORM
layout: planar2
colorspace: YUV
block: {width: 1, height: 1, depth: 1}
channels: []
swizzles: [X, Y, Z, W]
# for YUV420_8BIT, each 2x2 block needs 6 8 bit values to describe it
- name: R8G8B8_420_UNORM_PACKED
layout: subsampled

View file

@ -143,6 +143,10 @@ def has_access(format):
'y8_unorm',
'y8u8v8_420_unorm_packed',
'y10u10v10_420_unorm_packed',
'g8_b8r8_444_unorm',
'x6g10_x6b10x6r10_444_unorm',
'x4g12_x4b12x4r12_444_unorm',
'y16_u16v16_444_unorm',
]
if format.short_name() in noaccess_formats:
return False