diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2022-11-23 12:40:00 +0100 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2022-11-23 19:12:00 +0000 |
commit | 11f33e6198add2383b442c1aff8a070a12a403c1 (patch) | |
tree | b0e8e3f195ef870c6c0926f0db74c0d94db2df48 | |
parent | 4b38684f60c41dbbd772fa4cc447dbce04dacaa4 (diff) |
vk/runtime: Fix narrowing of timeline signal and wait value to u32.
They are u64. Fixes deadlock in
dEQP-VK.wsi.xcb.present_id_wait.wait.past_no_timeout.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: 9bffd81f1cb7 ("vulkan: Add common implementations of vkQueueSubmit
and vkQueueWaitIdle")
Reviewed-by: Marcin Ĺšlusarz <marcin.slusarz@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19951>
(cherry picked from commit f2e535e4fed5bdc13e11a443316a4b77cd5eb81a)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/vulkan/runtime/vk_queue.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/.pick_status.json b/.pick_status.json index 8e68041d83a..21db11dce41 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4,7 +4,7 @@ "description": "vk/runtime: Fix narrowing of timeline signal and wait value to u32.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "9bffd81f1cb7c4a653d18b4b43296f89caed4db7" }, diff --git a/src/vulkan/runtime/vk_queue.c b/src/vulkan/runtime/vk_queue.c index b79553fc374..867d2f5f6fa 100644 --- a/src/vulkan/runtime/vk_queue.c +++ b/src/vulkan/runtime/vk_queue.c @@ -679,7 +679,7 @@ vk_queue_submit(struct vk_queue *queue, sync = &semaphore->permanent; } - uint32_t wait_value = semaphore->type == VK_SEMAPHORE_TYPE_TIMELINE ? + uint64_t wait_value = semaphore->type == VK_SEMAPHORE_TYPE_TIMELINE ? info->waits[i].value : 0; submit->waits[i] = (struct vk_sync_wait) { @@ -746,7 +746,7 @@ vk_queue_submit(struct vk_queue *queue, info->signals[i].semaphore); struct vk_sync *sync = vk_semaphore_get_active_sync(semaphore); - uint32_t signal_value = info->signals[i].value; + uint64_t signal_value = info->signals[i].value; if (semaphore->type == VK_SEMAPHORE_TYPE_TIMELINE) { if (signal_value == 0) { result = vk_queue_set_lost(queue, |