From f335158cfa4faf366de88fd04d83e6fb0279b14a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 7 Jul 2025 11:07:53 -0400 Subject: [PATCH] zink: always insert current batch sparse semaphore into sparse wait chain this avoids desync in the case where a batch performs multiple distinct sparse commit operations cc: mesa-stable Part-of: --- src/gallium/drivers/zink/zink_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_bo.c b/src/gallium/drivers/zink/zink_bo.c index 21a01916278..be67b2c1e3a 100644 --- a/src/gallium/drivers/zink/zink_bo.c +++ b/src/gallium/drivers/zink/zink_bo.c @@ -805,7 +805,7 @@ buffer_bo_commit(struct zink_context *ctx, struct zink_resource *res, uint32_t o uint32_t va_page = offset / ZINK_SPARSE_BUFFER_PAGE_SIZE; uint32_t end_va_page = va_page + DIV_ROUND_UP(size, ZINK_SPARSE_BUFFER_PAGE_SIZE); - VkSemaphore cur_sem = VK_NULL_HANDLE; + VkSemaphore cur_sem = *sem; if (commit) { while (va_page < end_va_page) { uint32_t span_va_page;