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

Author: Mike Blumenkrantz <[email protected]>
Date:   Thu Feb  2 17:09:14 2023 -0500

zink: add a flag to indicate whether a descriptor buffer is bound

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21085>

---

 src/gallium/drivers/zink/zink_batch.c | 2 ++
 src/gallium/drivers/zink/zink_types.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_batch.c 
b/src/gallium/drivers/zink/zink_batch.c
index f6407e228cb..6be245c4faa 100644
--- a/src/gallium/drivers/zink/zink_batch.c
+++ b/src/gallium/drivers/zink/zink_batch.c
@@ -155,6 +155,7 @@ zink_reset_batch_state(struct zink_context *ctx, struct 
zink_batch_state *bs)
     */
    bs->fence.submitted = false;
    bs->has_barriers = false;
+   bs->db_bound = false;
    if (bs->fence.batch_id)
       zink_screen_update_last_finished(screen, bs->fence.batch_id);
    bs->submit_count++;
@@ -421,6 +422,7 @@ zink_batch_bind_db(struct zink_context *ctx)
       assert(infos[i].usage);
    }
    VKSCR(CmdBindDescriptorBuffersEXT)(batch->state->cmdbuf, count, infos);
+   batch->state->db_bound = true;
 }
 
 /* called on context creation and after flushing an old batch */
diff --git a/src/gallium/drivers/zink/zink_types.h 
b/src/gallium/drivers/zink/zink_types.h
index d966ad30064..0812d6269fd 100644
--- a/src/gallium/drivers/zink/zink_types.h
+++ b/src/gallium/drivers/zink/zink_types.h
@@ -580,6 +580,7 @@ struct zink_batch_state {
 
    bool is_device_lost;
    bool has_barriers;
+   bool db_bound;
 };
 
 static inline struct zink_batch_state *

Reply via email to