From edc8119da4eafb45ae90b70ba33b2c1f5b85c4c1 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 6 Jul 2020 17:11:35 +0300 Subject: [PATCH] anv: garbage collect timeline semaphore when querying value If we don't garbage collect the timeline, the value never progresses even though work completed. Signed-off-by: Lionel Landwerlin Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3226 Fixes: 34f32a6d664807 ("anv: implement VK_KHR_timeline_semaphore") Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Jason Ekstrand Part-of: --- src/intel/vulkan/anv_queue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c index 1e3801daf4a..f997391bdb6 100644 --- a/src/intel/vulkan/anv_queue.c +++ b/src/intel/vulkan/anv_queue.c @@ -2184,6 +2184,7 @@ VkResult anv_GetSemaphoreCounterValue( switch (impl->type) { case ANV_SEMAPHORE_TYPE_TIMELINE: { pthread_mutex_lock(&device->mutex); + anv_timeline_gc_locked(device, &impl->timeline); *pValue = impl->timeline.highest_past; pthread_mutex_unlock(&device->mutex); return VK_SUCCESS; -- 2.30.2