<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 29/11/2018 16:58, Jason Ekstrand
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOFGe94o-U5NsFpsC+5444uKJCUEOkSKMoB2VkpvX3gKPJZ2kw@mail.gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div class="gmail_quote">
          <div dir="ltr">On Thu, Nov 29, 2018 at 10:45 AM Lionel
            Landwerlin <<a
              href="mailto:lionel.g.landwerlin@intel.com"
              moz-do-not-send="true">lionel.g.landwerlin@intel.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Pipeline
            barriers inserted through vkCmdPipelineBarrier() should be<br>
            taken into account when copying results.<br>
            <br>
            In the particular bug below, the results of the<br>
            vkCmdCopyQueryPoolResults() command was being overwritten by
            the<br>
            preceding vkCmdCopyBuffer() with a same destination buffer.
            This is<br>
            because we copy the buffers using the 3D pipeline whereas we
            copy the<br>
            query results using the command streamer. Those work in
            parallel<br>
            unless synchronized.<br>
            <br>
            v2: Unconditionally flush the pipeline before copying the
            results<br>
                (Jason)<br>
            <br>
            Signed-off-by: Lionel Landwerlin <<a
              href="mailto:lionel.g.landwerlin@intel.com"
              target="_blank" moz-do-not-send="true">lionel.g.landwerlin@intel.com</a>><br>
            Suggested-by: Jason Ekstrand <<a
              href="mailto:jason@jlekstrand.net" target="_blank"
              moz-do-not-send="true">jason@jlekstrand.net</a>><br>
            Bugzilla: <a
              href="https://bugs.freedesktop.org/show_bug.cgi?id=108894"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://bugs.freedesktop.org/show_bug.cgi?id=108894</a><br>
            Cc: <a href="mailto:mesa-stable@lists.freedesktop.org"
              target="_blank" moz-do-not-send="true">mesa-stable@lists.freedesktop.org</a><br>
            ---<br>
             src/intel/vulkan/genX_query.c | 9 ++++-----<br>
             1 file changed, 4 insertions(+), 5 deletions(-)<br>
            <br>
            diff --git a/src/intel/vulkan/genX_query.c
            b/src/intel/vulkan/genX_query.c<br>
            index ce8757f2643..f1472c0d570 100644<br>
            --- a/src/intel/vulkan/genX_query.c<br>
            +++ b/src/intel/vulkan/genX_query.c<br>
            @@ -729,11 +729,10 @@ void genX(CmdCopyQueryPoolResults)(<br>
                ANV_FROM_HANDLE(anv_query_pool, pool, queryPool);<br>
                ANV_FROM_HANDLE(anv_buffer, buffer, destBuffer);<br>
            <br>
            -   if (flags & VK_QUERY_RESULT_WAIT_BIT) {<br>
            -      anv_batch_emit(&cmd_buffer->batch,
            GENX(PIPE_CONTROL), pc) {<br>
            -         pc.CommandStreamerStallEnable = true;<br>
            -         pc.StallAtPixelScoreboard     = true;<br>
            -      }<br>
            +   if (flags & VK_QUERY_RESULT_WAIT_BIT ||<br>
          </blockquote>
          <div><br>
          </div>
          <div>That bare & should have some parens.  With that,</div>
          <div><br>
          </div>
          <div>Reviewed-by: Jason Ekstrand <<a
              href="mailto:jason@jlekstrand.net" moz-do-not-send="true">jason@jlekstrand.net</a>><br>
          </div>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>Thanks, pushed with your requested change.</p>
    <p><br>
    </p>
    <p>-</p>
    <p>Lionel<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAOFGe94o-U5NsFpsC+5444uKJCUEOkSKMoB2VkpvX3gKPJZ2kw@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            +       (cmd_buffer->state.pending_pipe_bits &
            ANV_PIPE_FLUSH_BITS)) {<br>
            +      cmd_buffer->state.pending_pipe_bits |=
            ANV_PIPE_CS_STALL_BIT;<br>
            +      genX(cmd_buffer_apply_pipe_flushes)(cmd_buffer);<br>
                }<br>
            <br>
                struct anv_address dest_addr =
            anv_address_add(buffer->address, destOffset);<br>
            -- <br>
            2.20.0.rc1<br>
            <br>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>