radv: Fix host->host signalling with legacy timeline semaphores.

Fixes: 88d41367b8 "radv: Add timelines with a VK_KHR_timeline_semaphore impl."
Reviewed-by: Dave Airlie <airlied@redhat.com>
Tested-by: Andres Rodriguez <andresx7@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6097>
(cherry picked from commit 05b2783270)
This commit is contained in:
Bas Nieuwenhuizen 2020-07-28 04:14:23 +02:00 committed by Eric Engestrom
parent 92c179f52a
commit 6c1358b024
2 changed files with 11 additions and 2 deletions

View file

@ -2902,7 +2902,7 @@
"description": "radv: Fix host->host signalling with legacy timeline semaphores.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "88d41367b8aee961e6c47173a1e8848009e2215a"
},

View file

@ -6215,7 +6215,16 @@ radv_SignalSemaphore(VkDevice _device,
radv_timeline_trigger_waiters_locked(&part->timeline, &processing_list);
pthread_mutex_unlock(&part->timeline.mutex);
return radv_process_submissions(&processing_list);
VkResult result = radv_process_submissions(&processing_list);
/* This needs to happen after radv_process_submissions, so
* that any submitted submissions that are now unblocked get
* processed before we wake the application. This way we
* ensure that any binary semaphores that are now unblocked
* are usable by the application. */
pthread_cond_broadcast(&device->timeline_cond);
return result;
}
case RADV_SEMAPHORE_NONE:
case RADV_SEMAPHORE_SYNCOBJ: