diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index b8056cd1974..3ed3a401c8f 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -1956,7 +1956,7 @@ timeline_wait(struct zink_context *ctx, uint32_t batch_id, uint64_t timeout) wi.sType = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO; wi.semaphoreCount = 1; /* handle batch_id overflow */ - wi.pSemaphores = batch_id > ctx->curr_batch ? &screen->prev_sem : &screen->sem; + wi.pSemaphores = batch_id > screen->curr_batch ? &screen->prev_sem : &screen->sem; uint64_t batch_id64 = batch_id; wi.pValues = &batch_id64; bool success = false;