Skip to content

anv, vulkan: add support for P010 sampling

Chia-I Wu requested to merge olv/mesa:anv-p010 into main

P010 maps to VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 in Vulkan. anv treats the planes as R16 and R16G16 and supports sampling. IIUC, the only caveat is, while P010 requires the lower 6 bits to be 0, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 requires us to ignore the lower 6 bits.

The first 2 commits extend nir_vk_lower_ycbcr_tex to support masking out the lower bits. The third commit enables P010 support in anv. The last commit advertises DRM modifier support for all supported ycbcr formats.

/cc @linyaa

Merge request reports