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 <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3226
Fixes: 34f32a6d66
("anv: implement VK_KHR_timeline_semaphore")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5774>
This commit is contained in:

committed by
Marge Bot

parent
137d8f9889
commit
edc8119da4
@@ -2184,6 +2184,7 @@ VkResult anv_GetSemaphoreCounterValue(
|
|||||||
switch (impl->type) {
|
switch (impl->type) {
|
||||||
case ANV_SEMAPHORE_TYPE_TIMELINE: {
|
case ANV_SEMAPHORE_TYPE_TIMELINE: {
|
||||||
pthread_mutex_lock(&device->mutex);
|
pthread_mutex_lock(&device->mutex);
|
||||||
|
anv_timeline_gc_locked(device, &impl->timeline);
|
||||||
*pValue = impl->timeline.highest_past;
|
*pValue = impl->timeline.highest_past;
|
||||||
pthread_mutex_unlock(&device->mutex);
|
pthread_mutex_unlock(&device->mutex);
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
|
Reference in New Issue
Block a user