util/format: Add new 12-bit P012 RGB/planar formats

Introduce three 12-bit formats: X4R12_UNORM, X4R12X4G12_UNORM, and X4G12_X4B12X4R12_420_UNORM.
These formats allocate 12 bits for each color channel with 4 bits of padding to align with Vulkan's P012
and related planar formats.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30821>
This commit is contained in:
Valentine Burley
2024-08-23 08:25:38 +00:00
committed by Marge Bot
parent 1134ad8799
commit 81ebd6ea8d
3 changed files with 27 additions and 1 deletions
+1
View File
@@ -106,6 +106,7 @@ def has_access(format):
'g8b8_g8r8_unorm',
'b8g8_r8g8_unorm',
'x6g10_x6b10x6r10_420_unorm',
'x4g12_x4b12x4r12_420_unorm',
'y8_400_unorm',
'y8_u8_v8_422_unorm',
'y8_u8v8_422_unorm',