Lines Matching refs:semaphore

127    struct vk_semaphore *semaphore;
146 /* We should always be able to get a semaphore type for internal */
153 /* If the timeline mode is ASSISTED, then any permanent binary semaphore
155 * temporary unless that temporary is also used as a semaphore signal
167 semaphore = vk_object_zalloc(device, pAllocator, size,
169 if (semaphore == NULL)
172 semaphore->type = semaphore_type;
180 VkResult result = vk_sync_init(device, &semaphore->permanent,
183 vk_object_free(device, pAllocator, semaphore);
187 *pSemaphore = vk_semaphore_to_handle(semaphore);
194 struct vk_semaphore *semaphore)
196 if (semaphore->temporary == NULL)
199 vk_sync_destroy(device, semaphore->temporary);
200 semaphore->temporary = NULL;
209 VK_FROM_HANDLE(vk_semaphore, semaphore, _semaphore);
211 if (semaphore == NULL)
214 vk_semaphore_reset_temporary(device, semaphore);
215 vk_sync_finish(device, &semaphore->permanent);
217 vk_object_free(device, pAllocator, semaphore);
283 VK_FROM_HANDLE(vk_semaphore, semaphore, _semaphore);
288 struct vk_sync *sync = vk_semaphore_get_active_sync(semaphore);
311 VK_FROM_HANDLE(vk_semaphore, semaphore, pWaitInfo->pSemaphores[i]);
312 assert(semaphore->type == VK_SEMAPHORE_TYPE_TIMELINE);
315 .sync = vk_semaphore_get_active_sync(semaphore),
342 VK_FROM_HANDLE(vk_semaphore, semaphore, pSignalInfo->semaphore);
343 struct vk_sync *sync = vk_semaphore_get_active_sync(semaphore);
348 * UID-VkSemaphoreSignalInfo-semaphore-03257
350 * "semaphore must have been created with a VkSemaphoreType of
353 assert(semaphore->type == VK_SEMAPHORE_TYPE_TIMELINE);
360 * semaphore"
362 * Since 0 is the lowest possible semaphore timeline value, we can assert
390 VK_FROM_HANDLE(vk_semaphore, semaphore, pImportSemaphoreFdInfo->semaphore);
406 * VkSemaphoreTypeCreateInfo::semaphoreType field of the semaphore
410 if (unlikely(semaphore->type == VK_SEMAPHORE_TYPE_TIMELINE)) {
413 "semaphore");
417 get_semaphore_sync_type(device->physical, semaphore->type, handle_type);
426 sync = &semaphore->permanent;
429 vk_sync_semaphore_handle_types(sync->type, semaphore->type));
442 result = vk_error(semaphore, VK_ERROR_INVALID_EXTERNAL_HANDLE);
453 * "Importing a semaphore payload from a file descriptor transfers
464 * semaphore's temporary payload with the new vk_sync at the top. However,
465 * we choose to be nice to applications and only replace the semaphore if
469 vk_semaphore_reset_temporary(device, semaphore);
470 semaphore->temporary = temporary;
482 VK_FROM_HANDLE(vk_semaphore, semaphore, pGetFdInfo->semaphore);
486 struct vk_sync *sync = vk_semaphore_get_active_sync(semaphore);
502 * transference semantics, semaphore must have been created with a
505 if (unlikely(semaphore->type != VK_SEMAPHORE_TYPE_BINARY)) {
507 "Cannot export a timeline semaphore as SYNC_FD");
514 * transference semantics, semaphore must have an associated
515 * semaphore signal operation that has been submitted for execution
516 * and any semaphore signal operations on which it depends (if any)
540 * semaphore payload to a handle with copy transference has the same
541 * side effects on the source semaphore’s payload as executing a
542 * semaphore wait operation."
544 * In other words, exporting a sync file also resets the semaphore. We
548 if (sync == &semaphore->permanent) {
556 unreachable("Invalid semaphore export handle type");
562 * handle type’s import operations. [...] If the semaphore was using
563 * a temporarily imported payload, the semaphore’s prior permanent
566 vk_semaphore_reset_temporary(device, semaphore);