Mesa (staging/21.3): zink: add vertex shader pipeline bit for generated barrier construction

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 2 21:21:47 UTC 2022


Module: Mesa
Branch: staging/21.3
Commit: 76b60224c2742755268b952166e9a803b611952d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=76b60224c2742755268b952166e9a803b611952d

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue Jan 18 11:17:12 2022 -0500

zink: add vertex shader pipeline bit for generated barrier construction

if the vertex buffer resource has writes, it needs this bit too

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14691>
(cherry picked from commit 95bfb7568862e209cb3ec49f9a70f329f7324410)

---

 .pick_status.json                      | 2 +-
 src/gallium/drivers/zink/zink_draw.cpp | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 68e4074d1a3..bd36a2bd570 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1651,7 +1651,7 @@
         "description": "zink: add vertex shader pipeline bit for generated barrier construction",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/zink_draw.cpp b/src/gallium/drivers/zink/zink_draw.cpp
index 380874288e0..473e664f723 100644
--- a/src/gallium/drivers/zink/zink_draw.cpp
+++ b/src/gallium/drivers/zink/zink_draw.cpp
@@ -374,6 +374,8 @@ update_barriers(struct zink_context *ctx, bool is_compute)
                   access |= VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT;
                   pipeline |= VK_PIPELINE_STAGE_VERTEX_INPUT_BIT;
                   bind_count -= util_bitcount(res->vbo_bind_mask);
+                  if (res->write_bind_count[is_compute])
+                     pipeline |= VK_PIPELINE_STAGE_VERTEX_SHADER_BIT;
                }
                bind_count -= res->so_bind_count;
             }



More information about the mesa-commit mailing list