<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Support VK_IMAGE_USAGE_STORAGE_BIT for WSI swapchain surfaces"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=106646">106646</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Support VK_IMAGE_USAGE_STORAGE_BIT for WSI swapchain surfaces
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/Vulkan/Common
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>bugs.freedesktop@haasn.xyz
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>airlied@freedesktop.org, chadversary@chromium.org, daniel@fooishbar.org, jason@jlekstrand.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>