Support VK_IMAGE_USAGE_STORAGE_BIT for WSI swapchain surfaces
Submitted by Niklas Haas
Assigned to Jason Ekstrand
It would appear as though RADV (and ANV, judging by the code) on both X11 and Wayland only support the following hard-coded list of VkImageUsageFlags:
caps->supportedUsageFlags = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
Could we get VK_IMAGE_USAGE_STORAGE_BIT added to this list? Other Vulkan implementations I looked at (NVIDIA and AMDVLK) both support it, and simply adding it to the list seems to work just fine for me. (on RADV+X11, not sure about ANV or Wayland)
Use case: I have a rendering pipeline (mpv/vlc/libplacebo) that may involve the use of a compute shader during the final output step, in order to do HDR peak detection. If the swapchain image supports STORAGE_BIT then I can directly paint to screen without needing to allocate an intermediate texture and roundtrip through a fragment shader unnecessarily.