summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>2020-07-28 04:14:23 +0200
committerEric Engestrom <eric@engestrom.ch>2020-08-05 22:23:20 +0200
commit6c1358b0248eb3a07d999ec2d20dab0cc42c25eb (patch)
tree3214a831603dd0cdc65bcb4ac0a026c8a09c95dd /src
parent92c179f52aa4541a3433529260d129ee7e1c648b (diff)
radv: Fix host->host signalling with legacy timeline semaphores.
Fixes: 88d41367b8a "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 05b278327066304d8822eb6414a89120c816e14a)
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_device.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index d131f3d39b4..803f48e6664 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -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: