Module: Mesa
Branch: main
Commit: b6ddf8f0a4edf68dc2be106144753cce62259281
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b6ddf8f0a4edf68dc2be106144753cce62259281

Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Apr  8 10:13:56 2022 -0400

zink: don't generate VK_ACCESS_SHADER_READ_BIT barrier for vertex inputs

this is both redundant and illegal

Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15827>

---

 src/gallium/drivers/zink/zink_draw.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_draw.cpp 
b/src/gallium/drivers/zink/zink_draw.cpp
index f79f13f1046..8f91fa459ac 100644
--- a/src/gallium/drivers/zink/zink_draw.cpp
+++ b/src/gallium/drivers/zink/zink_draw.cpp
@@ -399,8 +399,9 @@ update_barriers(struct zink_context *ctx, bool is_compute)
             if (res->write_bind_count[is_compute])
                access |= VK_ACCESS_SHADER_READ_BIT;
             /* TODO: there are no other write-only buffer descriptors without 
deeper shader analysis */
-            if (res->image_bind_count[is_compute] != 
res->bind_count[is_compute] ||
-                res->write_bind_count[is_compute] != 
res->image_bind_count[is_compute])
+            if (pipeline != VK_PIPELINE_STAGE_VERTEX_INPUT_BIT &&
+                (res->image_bind_count[is_compute] != 
res->bind_count[is_compute] ||
+                 res->write_bind_count[is_compute] != 
res->image_bind_count[is_compute]))
                access |= VK_ACCESS_SHADER_READ_BIT;
          } else {
             if (res->bind_count[is_compute] != 
res->write_bind_count[is_compute])

Reply via email to