You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
Images with multi-plane formats (e.g. VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16) cannot be directly read from a shader.
In order to achieve this, there are only two method that I am aware of:
Sample it with a YCbCr sampler
Create one image view for each plane and read them separately
Unfortunately, I am unable to use the first method as YCbCr samplers integrate very badly in fully bindless architectures, requiring the use of immutable descriptors and combined image samplers.
This leaves me with only the second method, in which I need to create the image views with the corresponding compatible format for each plane (or any other size-compatible format), as specified in the Vulkan specs.
For VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16, these are:
Plane 0: VK_FORMAT_R10X6_UNORM_PACK16
Plane 1: VK_FORMAT_R10X6G10X6_UNORM_2PACK16
In the case of these "10X6" formats, because each component has 6 bits that are left unused (and undefined), the other size-compatible formats cannot be used to reliably sample the image:
If the underlying VkImage format has an X component in its format description, undefined values are read from those bits.
[...]
For example, when a VK_FORMAT_R10X6_UNORM_PACK16 VkImage is sampled via a VK_FORMAT_R16_UNORM VkImageView, the low 6 bits of the value before format conversion are undefined and format conversion may return a range of different values.
Currently, VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 is reported as supported but neither VK_FORMAT_R10X6_UNORM_PACK16 nor VK_FORMAT_R10X6G10X6_UNORM_2PACK16 are.
This makes it impossible to sample the image using the second method.
I couldn't find a text in the specs that also require the support for all plane-compatible formats when a multi-plane format is supported, so I'm not sure if this is a driver bug or if the specs are simply too loose.
The text was updated successfully, but these errors were encountered:
OS: Windows 11 64-bit
GPU: AMD Radeon(TM) Graphics (Ryzen 7 9800X3D)
Driver: 24.12.1
Problem:
Images with multi-plane formats (e.g.
VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16
) cannot be directly read from a shader.In order to achieve this, there are only two method that I am aware of:
Unfortunately, I am unable to use the first method as YCbCr samplers integrate very badly in fully bindless architectures, requiring the use of immutable descriptors and combined image samplers.
This leaves me with only the second method, in which I need to create the image views with the corresponding compatible format for each plane (or any other size-compatible format), as specified in the Vulkan specs.
For
VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16
, these are:VK_FORMAT_R10X6_UNORM_PACK16
VK_FORMAT_R10X6G10X6_UNORM_2PACK16
In the case of these "10X6" formats, because each component has 6 bits that are left unused (and undefined), the other size-compatible formats cannot be used to reliably sample the image:
Currently,
VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16
is reported as supported but neitherVK_FORMAT_R10X6_UNORM_PACK16
norVK_FORMAT_R10X6G10X6_UNORM_2PACK16
are.This makes it impossible to sample the image using the second method.
I couldn't find a text in the specs that also require the support for all plane-compatible formats when a multi-plane format is supported, so I'm not sure if this is a driver bug or if the specs are simply too loose.
The text was updated successfully, but these errors were encountered: