mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
vulkan/drm-syncobj: Stop returning early waiting for sync files
In the WAIT_ALL case in spin_wait_for_sync_file(), we were returning the moment we saw the first success. However, this isn't a wait-all, it's a bad wait-any. We should instead just continue on to check the next sync until we've ensured that every sync in the array has a sync file. The only reason this wasn't blowing up in our face is because it only affects non-timeline drivers (pretty rare these days) and because most of the places where we use WAIT_PENDING on non-timeline drivers is to guard a sync file export and those typically have only a single sync in the array. Cc: mesa-stable Reviewed-by: Gurchetan Singh <gurchetansingh@google.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38635>
This commit is contained in:
parent
21f646d196
commit
e4e619d685
1 changed files with 3 additions and 0 deletions
|
|
@ -261,6 +261,9 @@ spin_wait_for_sync_file(struct vk_device *device,
|
|||
for (uint32_t i = 0; i < wait_count; i++) {
|
||||
while (1) {
|
||||
VkResult result = sync_has_sync_file(device, waits[i].sync);
|
||||
if (result == VK_SUCCESS)
|
||||
break; /* Break out of the inner while */
|
||||
|
||||
if (result != VK_TIMEOUT)
|
||||
return result;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue