Lines Matching refs:sync
578 struct tu_syncobj *sync =
579 vk_object_alloc(&device->vk, pAllocator, sizeof(*sync),
581 if (!sync)
591 vk_free2(&device->vk.alloc, pAllocator, sync);
595 sync->binary.permanent = create.handle;
596 sync->binary.temporary = 0;
597 sync->type = TU_SEMAPHORE_BINARY;
599 sync->type = TU_SEMAPHORE_TIMELINE;
600 sync->timeline.highest_signaled = sync->timeline.highest_submitted =
602 list_inithead(&sync->timeline.points);
603 list_inithead(&sync->timeline.free_points);
606 *p_sync = sync;
612 sync_set_temporary(struct tu_device *device, struct tu_syncobj *sync, uint32_t syncobj)
614 if (sync->binary.temporary) {
616 &(struct drm_syncobj_destroy) { .handle = sync->binary.temporary });
618 sync->binary.temporary = syncobj;
622 sync_destroy(VkDevice _device, struct tu_syncobj *sync, const VkAllocationCallbacks *pAllocator)
626 if (!sync)
629 if (sync->type == TU_SEMAPHORE_BINARY) {
630 sync_set_temporary(device, sync, 0);
632 &(struct drm_syncobj_destroy) { .handle = sync->binary.permanent });
634 tu_timeline_finish(device, &sync->timeline);
637 vk_object_free(&device->vk, pAllocator, sync);
641 sync_import(VkDevice _device, struct tu_syncobj *sync, bool temporary, bool sync_fd, int fd)
647 uint32_t *dst = temporary ? &sync->binary.temporary : &sync->binary.permanent;
686 sync_set_temporary(device, sync, create.handle);
693 sync_export(VkDevice _device, struct tu_syncobj *sync, bool sync_fd, int *p_fd)
698 .handle = sync->binary.temporary ?: sync->binary.permanent,
707 sync_set_temporary(device, sync, 0);
743 TU_FROM_HANDLE(tu_syncobj, sync, sem);
744 sync_destroy(device, sync, pAllocator);
750 TU_FROM_HANDLE(tu_syncobj, sync, info->semaphore);
751 return sync_import(device, sync, info->flags & VK_SEMAPHORE_IMPORT_TEMPORARY_BIT,
758 TU_FROM_HANDLE(tu_syncobj, sync, info->semaphore);
759 return sync_export(device, sync,
1491 TU_FROM_HANDLE(tu_syncobj, sync, fence);
1492 sync_destroy(device, sync, pAllocator);
1498 TU_FROM_HANDLE(tu_syncobj, sync, info->fence);
1499 return sync_import(device, sync, info->flags & VK_FENCE_IMPORT_TEMPORARY_BIT,
1506 TU_FROM_HANDLE(tu_syncobj, sync, info->fence);
1507 return sync_export(device, sync,
1634 tu_syncobj_to_fd(struct tu_device *device, struct tu_syncobj *sync)
1636 struct drm_syncobj_handle handle = { .handle = sync->binary.permanent };