typedef VkResult (VKAPI *PFN_vkQueueBindSparseBufferMemory)(VkQueue queue, VkBuffer buffer, VkDeviceSize rangeOffset, VkDeviceSize rangeSize, VkDeviceMemory mem, VkDeviceSize memOffset);
typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageMemory)(VkQueue queue, VkImage image, const VkImageMemoryBindInfo* pBindInfo, VkDeviceMemory mem, VkDeviceSize memOffset);
typedef VkResult (VKAPI *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence);
+typedef VkResult (VKAPI *PFN_vkDestroyFence)(VkDevice device, VkFence fence);
typedef VkResult (VKAPI *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences);
typedef VkResult (VKAPI *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence);
typedef VkResult (VKAPI *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout);
const VkFenceCreateInfo* pCreateInfo,
VkFence* pFence);
+VkResult VKAPI vkDestroyFence(
+ VkDevice device,
+ VkFence fence);
+
VkResult VKAPI vkResetFences(
VkDevice device,
uint32_t fenceCount,
assert(obj_type == VK_OBJECT_TYPE_FENCE);
- anv_gem_munmap(fence->bo.map, fence->bo.size);
- anv_gem_close(device, fence->bo.gem_handle);
- anv_device_free(device, fence);
+ anv_DestroyFence(anv_device_to_handle(device),
+ anv_fence_to_handle(fence));
}
VkResult anv_CreateFence(
return result;
}
+VkResult anv_DestroyFence(
+ VkDevice _device,
+ VkFence _fence)
+{
+ ANV_FROM_HANDLE(anv_device, device, _device);
+ ANV_FROM_HANDLE(anv_fence, fence, _fence);
+
+ anv_gem_munmap(fence->bo.map, fence->bo.size);
+ anv_gem_close(device, fence->bo.gem_handle);
+ anv_device_free(device, fence);
+
+ return VK_SUCCESS;
+}
+
VkResult anv_ResetFences(
VkDevice _device,
uint32_t fenceCount,