<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: VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT and bringing down initial pipeline compile times"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=106246">106246</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>radv: VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT and bringing down initial pipeline compile times
          </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=139124" name="attach_139124" title="volund-benchmark.sh">attachment 139124</a> <a href="attachment.cgi?id=139124&action=edit" title="volund-benchmark.sh">[details]</a></span>
volund-benchmark.sh

Hello,

a general issue encountered in DXVK is that pipelines have to be compiled at
draw time, as the pipeline state and the combination of shaders used for
rendering are not known in advance. This leads to noticable stutter in a lot of
games when the shader cache is cold.

The attached script measures the pipeline compile times of the Unity Blacksmith
demo, which can be downloaded here:
<a href="https://blogs.unity3d.com/2015/06/24/releasing-the-blacksmith/">https://blogs.unity3d.com/2015/06/24/releasing-the-blacksmith/</a>

I picked this demo because it warms the shader cache as part of its loading
process, making for a reproducible test case. On my Ryzen 2700X setup, all the
vkCreateGraphicsPipelines calls combined take about four minutes using the
"Higher" preset on mesa 18.0.1, llvm 6.0 and latest dxvk-master, where about
2/3rds of the total CPU time is spent inside LLVM, and 1/6th inside
libvulkan-radeon.

An optimization I have in mind for DXVK would be to use
VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT in order to reduce the initial
compile times, and to compile an optimized version of the pipeline
asynchronously in the background. However, this requires driver support for
VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT.

Please let me know if this is a viable option and if significant gains are to
be expected when implementing support for this flag in the driver.</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>