Lines Matching refs:semaphore
921 struct anv_semaphore *semaphore, in maybe_transfer_temporary_semaphore() argument
924 struct anv_semaphore_impl *impl = &semaphore->temporary; in maybe_transfer_temporary_semaphore()
929 impl = &semaphore->permanent; in maybe_transfer_temporary_semaphore()
987 ANV_FROM_HANDLE(anv_semaphore, semaphore, _semaphore); in anv_queue_submit_add_in_semaphore()
989 semaphore->temporary.type != ANV_SEMAPHORE_TYPE_NONE ? in anv_queue_submit_add_in_semaphore()
990 &semaphore->temporary : &semaphore->permanent; in anv_queue_submit_add_in_semaphore()
1012 result = maybe_transfer_temporary_semaphore(queue, submit, semaphore, &impl); in anv_queue_submit_add_in_semaphore()
1073 ANV_FROM_HANDLE(anv_semaphore, semaphore, _semaphore); in anv_queue_submit_add_out_semaphore()
1088 semaphore->temporary.type != ANV_SEMAPHORE_TYPE_NONE ? in anv_queue_submit_add_out_semaphore()
1089 &semaphore->temporary : &semaphore->permanent; in anv_queue_submit_add_out_semaphore()
1379 pSubmits[i].pWaitSemaphoreInfos[j].semaphore, in anv_QueueSubmit2KHR()
1411 pSubmits[i].pSignalSemaphoreInfos[j].semaphore, in anv_QueueSubmit2KHR()
2226 struct anv_semaphore *semaphore; in anv_CreateSemaphore() local
2233 semaphore = vk_object_alloc(&device->vk, NULL, sizeof(*semaphore), in anv_CreateSemaphore()
2235 if (semaphore == NULL) in anv_CreateSemaphore()
2246 result = binary_semaphore_create(device, &semaphore->permanent, false); in anv_CreateSemaphore()
2248 result = timeline_semaphore_create(device, &semaphore->permanent, timeline_value); in anv_CreateSemaphore()
2250 vk_object_free(&device->vk, pAllocator, semaphore); in anv_CreateSemaphore()
2256 result = binary_semaphore_create(device, &semaphore->permanent, true); in anv_CreateSemaphore()
2258 result = timeline_semaphore_create(device, &semaphore->permanent, timeline_value); in anv_CreateSemaphore()
2260 vk_object_free(&device->vk, pAllocator, semaphore); in anv_CreateSemaphore()
2266 semaphore->permanent.type = ANV_SEMAPHORE_TYPE_DRM_SYNCOBJ; in anv_CreateSemaphore()
2267 semaphore->permanent.syncobj = anv_gem_syncobj_create(device, 0); in anv_CreateSemaphore()
2268 if (!semaphore->permanent.syncobj) { in anv_CreateSemaphore()
2269 vk_object_free(&device->vk, pAllocator, semaphore); in anv_CreateSemaphore()
2274 vk_object_free(&device->vk, pAllocator, semaphore); in anv_CreateSemaphore()
2278 semaphore->temporary.type = ANV_SEMAPHORE_TYPE_NONE; in anv_CreateSemaphore()
2280 *pSemaphore = anv_semaphore_to_handle(semaphore); in anv_CreateSemaphore()
2317 struct anv_semaphore *semaphore) in anv_semaphore_reset_temporary() argument
2319 if (semaphore->temporary.type == ANV_SEMAPHORE_TYPE_NONE) in anv_semaphore_reset_temporary()
2322 anv_semaphore_impl_cleanup(device, &semaphore->temporary); in anv_semaphore_reset_temporary()
2331 ANV_FROM_HANDLE(anv_semaphore, semaphore, _semaphore); in anv_DestroySemaphore()
2333 if (semaphore == NULL) in anv_DestroySemaphore()
2336 anv_semaphore_impl_cleanup(device, &semaphore->temporary); in anv_DestroySemaphore()
2337 anv_semaphore_impl_cleanup(device, &semaphore->permanent); in anv_DestroySemaphore()
2339 vk_object_base_finish(&semaphore->base); in anv_DestroySemaphore()
2340 vk_free(&device->vk.alloc, semaphore); in anv_DestroySemaphore()
2397 ANV_FROM_HANDLE(anv_semaphore, semaphore, pImportSemaphoreFdInfo->semaphore); in anv_ImportSemaphoreFdKHR()
2414 new_impl.type = semaphore->permanent.type; in anv_ImportSemaphoreFdKHR()
2418 return vk_error(semaphore, VK_ERROR_INVALID_EXTERNAL_HANDLE); in anv_ImportSemaphoreFdKHR()
2449 return vk_errorf(semaphore, VK_ERROR_INVALID_EXTERNAL_HANDLE, in anv_ImportSemaphoreFdKHR()
2462 return vk_error(semaphore, VK_ERROR_INVALID_EXTERNAL_HANDLE); in anv_ImportSemaphoreFdKHR()
2466 anv_semaphore_impl_cleanup(device, &semaphore->temporary); in anv_ImportSemaphoreFdKHR()
2467 semaphore->temporary = new_impl; in anv_ImportSemaphoreFdKHR()
2469 anv_semaphore_impl_cleanup(device, &semaphore->permanent); in anv_ImportSemaphoreFdKHR()
2470 semaphore->permanent = new_impl; in anv_ImportSemaphoreFdKHR()
2482 ANV_FROM_HANDLE(anv_semaphore, semaphore, pGetFdInfo->semaphore); in anv_GetSemaphoreFdKHR()
2488 semaphore->temporary.type != ANV_SEMAPHORE_TYPE_NONE ? in anv_GetSemaphoreFdKHR()
2489 &semaphore->temporary : &semaphore->permanent; in anv_GetSemaphoreFdKHR()
2517 return vk_error(semaphore, VK_ERROR_INVALID_EXTERNAL_HANDLE); in anv_GetSemaphoreFdKHR()
2527 if (impl == &semaphore->temporary) in anv_GetSemaphoreFdKHR()
2539 ANV_FROM_HANDLE(anv_semaphore, semaphore, _semaphore); in anv_GetSemaphoreCounterValue()
2542 semaphore->temporary.type != ANV_SEMAPHORE_TYPE_NONE ? in anv_GetSemaphoreCounterValue()
2543 &semaphore->temporary : &semaphore->permanent; in anv_GetSemaphoreCounterValue()
2701 ANV_FROM_HANDLE(anv_semaphore, semaphore, pWaitInfo->pSemaphores[i]); in anv_WaitSemaphores()
2703 semaphore->temporary.type != ANV_SEMAPHORE_TYPE_NONE ? in anv_WaitSemaphores()
2704 &semaphore->temporary : &semaphore->permanent; in anv_WaitSemaphores()
2750 ANV_FROM_HANDLE(anv_semaphore, semaphore, pSignalInfo->semaphore); in anv_SignalSemaphore()
2753 semaphore->temporary.type != ANV_SEMAPHORE_TYPE_NONE ? in anv_SignalSemaphore()
2754 &semaphore->temporary : &semaphore->permanent; in anv_SignalSemaphore()