<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Am 10.07.2017 um 17:52 schrieb Jason
      Ekstrand:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOFGe96gaX2OjsXr8bNBUiqwyKAQfMSycH7PXgYAt_BBJ1UHkQ@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Mon, Jul 10, 2017 at 8:45 AM,
            Christian König <span dir="ltr"><<a
                href="mailto:deathsimple@vodafone.de" target="_blank"
                moz-do-not-send="true">deathsimple@vodafone.de</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div bgcolor="#FFFFFF">
                <div>
                  <div class="gmail-h5">
                    <div
                      class="gmail-m_-226855681158848481moz-cite-prefix">Am
                      10.07.2017 um 17:28 schrieb Jason Ekstrand:<br>
                    </div>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div class="gmail_extra">
                          <div class="gmail_quote">On Wed, Jul 5, 2017
                            at 6:04 PM, Dave Airlie <span dir="ltr"><<a
                                href="mailto:airlied@gmail.com"
                                target="_blank" moz-do-not-send="true">airlied@gmail.com</a>></span>
                            wrote:<br>
                            [SNIP]<br>
                            <div>So, reading some CTS tests again, and I
                              think we have a problem here.  The Vulkan
                              spec allows you to wait on a fence that is
                              in the unsignaled state.</div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    <br>
                  </div>
                </div>
                At least on the closed source driver that would be
                illegal as far as I know.<br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Then they are doing workarounds in userspace.  There
              are definitely CTS tests for this:<br>
              <br>
              <a
href="https://github.com/KhronosGroup/VK-GL-CTS/blob/master/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationBasicFenceTests.cpp#L74"
                moz-do-not-send="true">https://github.com/KhronosGroup/VK-GL-CTS/blob/master/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationBasicFenceTests.cpp#L74</a><br>
            </div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div> You can't wait on a semaphore before the signal
                operation is send down to the kerel.</div>
            </blockquote>
            <div><br>
            </div>
            <div>We (Intel) deal with this today by tracking whether or
              not the fence has been submitted and using a condition
              variable in userspace to sort it all out.</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Which sounds exactly like what AMD is doing in it's drivers as well.<br>
    <br>
    <blockquote type="cite"
cite="mid:CAOFGe96gaX2OjsXr8bNBUiqwyKAQfMSycH7PXgYAt_BBJ1UHkQ@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div>If we ever want to share fences across processes (which
              we do), then this needs to be sorted in the kernel. </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    That would clearly get a NAK from my side, even Microsoft forbids
    wait before signal because you can easily end up in deadlock
    situations.<br>
    <br>
    Regards,<br>
    Christian.<br>
  </body>
</html>