Mesa (main): zink: split renderpasses for TextureBarrierNV() usage

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 10 03:17:03 UTC 2022


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu May  5 13:34:47 2022 -0400

zink: split renderpasses for TextureBarrierNV() usage

if no fbfetch is present, then this is a draw -> sampler read barrier,
and zink does not emit a self-dependency for this by default

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16354>

---

 src/gallium/drivers/zink/zink_context.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index a611ea57556..1a9bbdaae4f 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -3357,6 +3357,10 @@ zink_texture_barrier(struct pipe_context *pctx, unsigned flags)
    if (!ctx->framebuffer || !ctx->framebuffer->state.num_attachments)
       return;
 
+   /* this is not an in-renderpass barrier */
+   if (!ctx->fbfetch_outputs)
+      zink_batch_no_rp(ctx);
+
    if (zink_screen(ctx->base.screen)->info.have_KHR_synchronization2) {
       VkDependencyInfo dep = {0};
       dep.sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO;



More information about the mesa-commit mailing list