radv: Skip wait timeline ioctl with 0 handles.

Fixes: 55d8022878 "radv: Add winsys functions for timeline syncobj."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14165>
(cherry picked from commit 20b51cdabe)
This commit is contained in:
Bas Nieuwenhuizen 2021-12-12 01:01:55 +01:00 committed by Eric Engestrom
parent 9c96f43758
commit 5928a69a71
2 changed files with 7 additions and 3 deletions

View File

@ -85,7 +85,7 @@
"description": "radv: Skip wait timeline ioctl with 0 handles.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "55d8022878fd11093c861a6386734f88454f21b1"
},

View File

@ -4853,8 +4853,12 @@ wait_for_submission_timelines_available(struct radv_deferred_queue_submission *s
points[syncobj_idx] = submission->wait_values[i];
++syncobj_idx;
}
bool success = device->ws->wait_timeline_syncobj(device->ws, syncobj, points, syncobj_idx, true,
true, timeout);
bool success = true;
if (syncobj_idx > 0) {
success = device->ws->wait_timeline_syncobj(device->ws, syncobj, points, syncobj_idx, true,
true, timeout);
}
free(points);
return success ? VK_SUCCESS : VK_TIMEOUT;