#4326 added read-only access to bgra8unorm (if the bgra8unorm-storage feature is supported) based on the findings in #3838 (comment); but I haven't considered bgra8unorm's additional requirements (on Vulkan) in my investigation.
Vulkan
Storage image loads are supported in all shader stages for image views whose format features contain VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT.
from https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#descriptorsets-storageimage
In addition to VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, bgra8unorm requires VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT for read-only access (KhronosGroup/Vulkan-Docs#2027 (comment)).
The reports at https://vulkan.gpuinfo.org/ don't contain VkFormatFeatureFlagBits2 info (SaschaWillems/VulkanCapsViewer#194), so we can't analyze the hardware/driver landscape for STORAGE_WRITE_WITHOUT_FORMAT vs STORAGE_WRITE_WITHOUT_FORMAT. But at least based on intel's open-source mesa driver code we can see that the write access is a lot more common than the read access. More context can be found here: gfx-rs/wgpu#4655.
For completeness, here are the current requirements for bgra8unorm with STORAGE_BINDING usage on underlying APIs:
|
Vulkan |
D3D12 FL11_0 |
Metal |
| write-only |
STORAGE_WRITE_WITHOUT_FORMAT |
"UAV Typed Store" |
✅ |
| read-only |
STORAGE_READ_WITHOUT_FORMAT |
✅ (via SRV) |
✅ |
| read-write |
STORAGE_WRITE_WITHOUT_FORMAT & STORAGE_READ_WITHOUT_FORMAT |
"UAV Typed Store" & "UAV Typed Load" |
❌ |
I think the bgra8unorm-storage feature should only allow write-only access (as it originally did).
#4326 added
read-onlyaccess tobgra8unorm(if thebgra8unorm-storagefeature is supported) based on the findings in #3838 (comment); but I haven't consideredbgra8unorm's additional requirements (on Vulkan) in my investigation.In addition to
VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT,bgra8unormrequiresVK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BITforread-onlyaccess (KhronosGroup/Vulkan-Docs#2027 (comment)).The reports at https://vulkan.gpuinfo.org/ don't contain
VkFormatFeatureFlagBits2info (SaschaWillems/VulkanCapsViewer#194), so we can't analyze the hardware/driver landscape forSTORAGE_WRITE_WITHOUT_FORMATvsSTORAGE_WRITE_WITHOUT_FORMAT. But at least based on intel's open-source mesa driver code we can see that the write access is a lot more common than the read access. More context can be found here: gfx-rs/wgpu#4655.For completeness, here are the current requirements for
bgra8unormwithSTORAGE_BINDINGusage on underlying APIs:STORAGE_WRITE_WITHOUT_FORMATSTORAGE_READ_WITHOUT_FORMATSTORAGE_WRITE_WITHOUT_FORMAT&STORAGE_READ_WITHOUT_FORMATI think the
bgra8unorm-storagefeature should only allowwrite-onlyaccess (as it originally did).