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

Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Jan 25 11:20:06 2023 -0500

zink: assert that buffer descriptor usage is populated before bind

this is illegal

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

---

 src/gallium/drivers/zink/zink_batch.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/zink/zink_batch.c 
b/src/gallium/drivers/zink/zink_batch.c
index 931d5667a23..6f315675787 100644
--- a/src/gallium/drivers/zink/zink_batch.c
+++ b/src/gallium/drivers/zink/zink_batch.c
@@ -465,6 +465,7 @@ zink_start_batch(struct zink_context *ctx, struct 
zink_batch *batch)
          infos[i].sType = VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_INFO_EXT;
          infos[i].address = batch->state->dd.db[i]->obj->bda;
          infos[i].usage = batch->state->dd.db[i]->obj->vkusage;
+         assert(infos[i].usage);
       }
       VKSCR(CmdBindDescriptorBuffersEXT)(batch->state->cmdbuf, count, infos);
    }

Reply via email to