Lines Matching refs:fence
118 VkFence fence) in anv_QueueSubmit() argument
161 if (fence && submitCount == 0) { in anv_QueueSubmit()
167 result = anv_cmd_buffer_execbuf(device, NULL, NULL, 0, NULL, 0, fence); in anv_QueueSubmit()
173 VkFence submit_fence = (i == submitCount - 1) ? fence : VK_NULL_HANDLE; in anv_QueueSubmit()
268 struct anv_fence *fence; in anv_CreateFence() local
272 fence = vk_zalloc2(&device->alloc, pAllocator, sizeof(*fence), 8, in anv_CreateFence()
274 if (fence == NULL) in anv_CreateFence()
278 fence->permanent.type = ANV_FENCE_TYPE_SYNCOBJ; in anv_CreateFence()
284 fence->permanent.syncobj = anv_gem_syncobj_create(device, create_flags); in anv_CreateFence()
285 if (!fence->permanent.syncobj) in anv_CreateFence()
288 fence->permanent.type = ANV_FENCE_TYPE_BO; in anv_CreateFence()
291 &fence->permanent.bo.bo, 4096); in anv_CreateFence()
296 fence->permanent.bo.state = ANV_BO_FENCE_STATE_SIGNALED; in anv_CreateFence()
298 fence->permanent.bo.state = ANV_BO_FENCE_STATE_RESET; in anv_CreateFence()
302 *pFence = anv_fence_to_handle(fence); in anv_CreateFence()
334 ANV_FROM_HANDLE(anv_fence, fence, _fence); in anv_DestroyFence()
336 if (!fence) in anv_DestroyFence()
339 anv_fence_impl_cleanup(device, &fence->temporary); in anv_DestroyFence()
340 anv_fence_impl_cleanup(device, &fence->permanent); in anv_DestroyFence()
342 vk_free2(&device->alloc, pAllocator, fence); in anv_DestroyFence()
353 ANV_FROM_HANDLE(anv_fence, fence, pFences[i]); in anv_ResetFences()
362 if (fence->temporary.type != ANV_FENCE_TYPE_NONE) { in anv_ResetFences()
363 anv_fence_impl_cleanup(device, &fence->temporary); in anv_ResetFences()
364 fence->temporary.type = ANV_FENCE_TYPE_NONE; in anv_ResetFences()
367 struct anv_fence_impl *impl = &fence->permanent; in anv_ResetFences()
391 ANV_FROM_HANDLE(anv_fence, fence, _fence); in anv_GetFenceStatus()
397 fence->temporary.type != ANV_FENCE_TYPE_NONE ? in anv_GetFenceStatus()
398 &fence->temporary : &fence->permanent; in anv_GetFenceStatus()
403 assert(fence->temporary.type == ANV_FENCE_TYPE_NONE); in anv_GetFenceStatus()
472 ANV_FROM_HANDLE(anv_fence, fence, pFences[i]); in anv_wait_for_syncobj_fences()
473 assert(fence->permanent.type == ANV_FENCE_TYPE_SYNCOBJ); in anv_wait_for_syncobj_fences()
476 fence->temporary.type != ANV_FENCE_TYPE_NONE ? in anv_wait_for_syncobj_fences()
477 &fence->temporary : &fence->permanent; in anv_wait_for_syncobj_fences()
546 ANV_FROM_HANDLE(anv_fence, fence, pFences[i]); in anv_wait_for_bo_fences()
552 assert(fence->permanent.type == ANV_FENCE_TYPE_BO); in anv_wait_for_bo_fences()
553 assert(fence->temporary.type == ANV_FENCE_TYPE_NONE); in anv_wait_for_bo_fences()
554 struct anv_fence_impl *impl = &fence->permanent; in anv_wait_for_bo_fences()
612 ANV_FROM_HANDLE(anv_fence, fence, pFences[i]); in anv_wait_for_bo_fences()
613 if (fence->permanent.bo.state == ANV_BO_FENCE_STATE_RESET) in anv_wait_for_bo_fences()
723 ANV_FROM_HANDLE(anv_fence, fence, pImportFenceFdInfo->fence); in anv_ImportFenceFdKHR()
778 anv_fence_impl_cleanup(device, &fence->temporary); in anv_ImportFenceFdKHR()
779 fence->temporary = new_impl; in anv_ImportFenceFdKHR()
781 anv_fence_impl_cleanup(device, &fence->permanent); in anv_ImportFenceFdKHR()
782 fence->permanent = new_impl; in anv_ImportFenceFdKHR()
794 ANV_FROM_HANDLE(anv_fence, fence, pGetFdInfo->fence); in anv_GetFenceFdKHR()
799 fence->temporary.type != ANV_FENCE_TYPE_NONE ? in anv_GetFenceFdKHR()
800 &fence->temporary : &fence->permanent; in anv_GetFenceFdKHR()
833 if (impl == &fence->temporary) in anv_GetFenceFdKHR()