<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 - [radeonsi] The Witcher 3 freezes the system with no attachments calls & transform feedback Wine patch"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104193">104193</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[radeonsi] The Witcher 3 freezes the system with no attachments calls & transform feedback Wine patch
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (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/Gallium/radeonsi
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>shtetldik@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=136068" name="attach_136068" title="The Witcher 3: rotfiends radeonsi freeze">attachment 136068</a> <a href="attachment.cgi?id=136068&action=edit" title="The Witcher 3: rotfiends radeonsi freeze">[details]</a></span>
The Witcher 3: rotfiends radeonsi freeze

Wine has an issue with distorted monsters in The Witcher 3. Józef Kucia
identified the problem as follows:

* wined3d doesn't support draw calls with no attachments,
* wined3d tries to map transform feedback buffers while transform feedback is
paused.

See <a href="https://bugs.winehq.org/show_bug.cgi?id=43872#c8">https://bugs.winehq.org/show_bug.cgi?id=43872#c8</a>

He provided a patch:
<a href="https://bugs.winehq.org/attachment.cgi?id=59848&action=diff&context=patch&collapsed=&headers=1&format=raw">https://bugs.winehq.org/attachment.cgi?id=59848&action=diff&context=patch&collapsed=&headers=1&format=raw</a>

However applying it, is causing a system freeze (with radeonsi) after such kind
of monsters are encountered in the game and fighting them for some time. See
attached savegame for example with rotfiends.

Interestingly, Józef Kucia couldn't reproduce this freeze with radeon driver,
so it appears to be radeonsi specific.

You can apply the above Wine patch to Wine git master to test it (I build Wine
using just that patch, and one staging patch for performance: 

<a href="https://raw.githubusercontent.com/wine-compholio/wine-staging/master/patches/wined3d-buffer_create/0001-wined3d-Do-not-pin-large-buffers.patch">https://raw.githubusercontent.com/wine-compholio/wine-staging/master/patches/wined3d-buffer_create/0001-wined3d-Do-not-pin-large-buffers.patch</a>

My last test environment:

OpenGL renderer string: AMD Radeon (TM) RX 480 Graphics (POLARIS10 / DRM 3.18.0
/ 4.13.0-1-amd64, LLVM 5.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.4.0-devel
(git-b926da241a)</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>