-
Notifications
You must be signed in to change notification settings - Fork 525
Clarifications for VK_FORMAT_B8G8R8A8_UNORM #2027
Description
Context
There is some anecdotal evidence online that some implementations support binding a texture with VK_FORMAT_B8G8R8A8_UNORM format while on the shader side using Rgba8 despite Table 59. SPIR-V and Vulkan Image Format Compatibility not mentioning this combination.
There are also people taking a different approach, using Unknown when support for either shaderStorageImageReadWithoutFormat, or shaderStorageImageWriteWithoutFormat is present. However, the Formats without shader storage format section restricts the formats usable with Unknown.
History
- The "SPIR-V and Vulkan Image Format Compatibility" section was present since the first commit (see this blame).
- An addition clarifying the ability to use
Unknowntogether with any vk format was made to the table in the "SPIR-V and Vulkan Image Format Compatibility" section in 1e4e9ca (on Jun 20, 2020) (blame). - The "Formats without shader storage format" section was added in 9dc6dfb (on Oct 5, 2021) (blame).
Possible Solution
Considering the history, I believe that the list of formats in the "Formats without shader storage format" section wants to convey something else (namely the content of the note below it)
This list of formats is the union of required storage formats from Required Format Support section and formats listed in shaderStorageImageExtendedFormats.
and not the fact that those are the only formats usable with Unknown.
Clarifying this, would allow the other 150 texture formats (VK_FORMAT_B8G8R8A8_UNORM being one of them) to qualify for being used with Unknown.