<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 - radv: Resolve attachments do not work if view format differs from image format"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110348">110348</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>radv: Resolve attachments do not work if view format differs from image format
          </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>normal
          </td>
        </tr>

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

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

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

        <tr>
          <th>Reporter</th>
          <td>philip.rebohle@tu-dortmund.de
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=143889" name="attach_143889" title="Probably incomplete fix">attachment 143889</a> <a href="attachment.cgi?id=143889&action=edit" title="Probably incomplete fix">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=110348&attachment=143889'>[review]</a>
Probably incomplete fix

Hello,

using resolve attachments where the image view format differs from the actual
image format sometimes leads to incorrect or garbled results. The following
renderdoc capture (recorded on Polaris 10) shows one such example:

<a href="https://mega.nz/#!FeoBSKBS!AaXSH5e_VTs05s7_xStBVB-ptbl-C_lGx7854Apel8o">https://mega.nz/#!FeoBSKBS!AaXSH5e_VTs05s7_xStBVB-ptbl-C_lGx7854Apel8o</a>

Here, the image format is R16G16B16A16_UNORM, while the view format is
R16G16B16A16_SFLOAT. The resolved image is garbled.

Playing around in the code, I observed the following:
- The HW path is the one that's used here and produces the broken image.
- The CS path works, but interprets image data using the image format, not the
view format.
- The FS path works and uses the view format.

The attached patch fixes the problem for this sample, but more work is likely
needed since radv_pick_resolve_method_images currently only takes the image
format into account as well.

I'm also not sure which format should actually be used for the resolve
operation; both AMDVLK and Nvidia use the image format and not the view format,
which is not what I need, and it doesn't look like the Vulkan spec actually
defines this.

- Philip</pre>
        </div>
      </p>


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

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