<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 20 July 2018 at 19:01, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Fri, Jul 20, 2018 at 8:37 AM Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a><wbr>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="m_589076620338929545m_-3162832507255810754moz-cite-prefix">On 20/07/18 11:44, Alex Smith wrote:<br>
    </div>
    <blockquote type="cite">
      <pre>According to the spec, these should apply to all read/write access
types (so would be equivalent to specifying all other access types
individually). Currently, they were doing nothing.

Signed-off-by: Alex Smith <a class="m_589076620338929545m_-3162832507255810754moz-txt-link-rfc2396E" href="mailto:asmith@feralinteractive.com" target="_blank"><asmith@feralinteractive.com></a>
Cc: <a class="m_589076620338929545m_-3162832507255810754moz-txt-link-abbreviated" href="mailto:mesa-stable@lists.freedesktop.org" target="_blank">mesa-stable@lists.freedesktop.<wbr>org</a>
---
 src/intel/vulkan/anv_private.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/intel/vulkan/anv_<wbr>private.h b/src/intel/vulkan/anv_<wbr>private.h
index cec2842792..775bacaff2 100644
--- a/src/intel/vulkan/anv_<wbr>private.h
+++ b/src/intel/vulkan/anv_<wbr>private.h
@@ -1731,6 +1731,9 @@ anv_pipe_flush_bits_for_<wbr>access_flags(VkAccessFlags flags)
          pipe_bits |= ANV_PIPE_RENDER_TARGET_CACHE_<wbr>FLUSH_BIT;
          pipe_bits |= ANV_PIPE_DEPTH_CACHE_FLUSH_<wbr>BIT;
          break;
+      case VK_ACCESS_MEMORY_WRITE_BIT:
+         pipe_bits |= ANV_PIPE_FLUSH_BITS;
+         break;
       default:
          break; /* Nothing to do */
       }
@@ -1761,6 +1764,9 @@ anv_pipe_invalidate_bits_for_<wbr>access_flags(VkAccessFlags flags)
       case VK_ACCESS_TRANSFER_READ_BIT:
          pipe_bits |= ANV_PIPE_TEXTURE_CACHE_<wbr>INVALIDATE_BIT;
          break;
+      case VK_ACCESS_MEMORY_READ_BIT:
+         pipe_bits |= ANV_PIPE_INVALIDATE_BITS;
+         break;</pre>
    </blockquote>
    <br>
    I know this function is a bit oddly named for that, but with this
    part of the spec regarding VK_ACCESS_MEMORY_WRITE_BIT :<br>
    <br>
    "<br>
    <div class="m_589076620338929545m_-3162832507255810754ulist" style="box-sizing:border-box;margin:0px;padding:0px;direction:ltr;color:rgb(34,34,34);font-family:"Helvetica Neue",Helvetica,Helvetica,Arial,sans-serif;font-size:16px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">
      <ul style="box-sizing:border-box;margin:0px 0px 0.75em 1.5em;padding:0px;direction:ltr;font-size:1em;line-height:1.6;list-style-position:outside;font-family:Noto,sans-serif">
        <li style="box-sizing:border-box;margin:0px;padding:0px;direction:ltr">
          <p style="box-sizing:border-box;margin:0px 0px 0.375em;padding:0px;direction:ltr;font-family:Noto,sans-serif;font-weight:normal;font-size:1em;line-height:1.6">When included in a
            destination access mask, makes all available writes visible
            to all future write accesses on entities known to the Vulkan
            device.</p>
        </li>
      </ul>
    </div>
    <div class="m_589076620338929545m_-3162832507255810754paragraph" style="box-sizing:border-box;margin:0px;padding:0px;direction:ltr;color:rgb(34,34,34);font-family:"Helvetica Neue",Helvetica,Helvetica,Arial,sans-serif;font-size:16px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">"<br class="m_589076620338929545m_-3162832507255810754Apple-interchange-newline">
    </div>
    <br>
    I would also add :<br>
    <br>
    case VK_ACCESS_MEMORY_WRITE_BIT:<br>
        pipe_bits |= ANV_PIPE_FLUSH_BITS;<br>
        break;<br>
    <br>
    Does that sound fair?<br></div></blockquote><div><br></div></div></div><div>That's quite the heavy hammer.... But I think it's the right thing to do.<br></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">Yes - these bits are supposed to be the heaviest hammer there is. I'll add that.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Alex</div></div>