mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
vulkan/sync: Return early in vk_sync_timeline_wait() if wait_value == 0
This is a trivial case so we don't even need to take the lock. Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827>
This commit is contained in:
parent
415f4d7678
commit
4a634a56bb
1 changed files with 2 additions and 0 deletions
|
|
@ -563,6 +563,8 @@ vk_sync_timeline_wait(struct vk_device *device,
|
|||
uint64_t abs_timeout_ns)
|
||||
{
|
||||
struct vk_sync_timeline_state *state = to_vk_sync_timeline_state(sync);
|
||||
if (wait_value == 0)
|
||||
return VK_SUCCESS;
|
||||
|
||||
mtx_lock(&state->mutex);
|
||||
VkResult result = vk_sync_timeline_wait_locked(device, state,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue