typedef VkResult (VKAPI *PFN_vkSetEvent)(VkDevice device, VkEvent event);
typedef VkResult (VKAPI *PFN_vkResetEvent)(VkDevice device, VkEvent event);
typedef VkResult (VKAPI *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, VkQueryPool* pQueryPool);
+typedef VkResult (VKAPI *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool);
typedef VkResult (VKAPI *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags);
typedef VkResult (VKAPI *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer);
typedef VkResult (VKAPI *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView);
const VkQueryPoolCreateInfo* pCreateInfo,
VkQueryPool* pQueryPool);
+VkResult VKAPI vkDestroyQueryPool(
+ VkDevice device,
+ VkQueryPool queryPool);
+
VkResult VKAPI vkGetQueryPoolResults(
VkDevice device,
VkQueryPool queryPool,
assert(obj_type == VK_OBJECT_TYPE_QUERY_POOL);
- anv_gem_munmap(pool->bo.map, pool->bo.size);
- anv_gem_close(device, pool->bo.gem_handle);
- anv_device_free(device, pool);
+ anv_DestroyQueryPool(anv_device_to_handle(device),
+ anv_query_pool_to_handle(pool));
}
VkResult anv_CreateQueryPool(
return result;
}
+VkResult anv_DestroyQueryPool(
+ VkDevice _device,
+ VkQueryPool _pool)
+{
+ ANV_FROM_HANDLE(anv_device, device, _device);
+ ANV_FROM_HANDLE(anv_query_pool, pool, _pool);
+
+ anv_gem_munmap(pool->bo.map, pool->bo.size);
+ anv_gem_close(device, pool->bo.gem_handle);
+ anv_device_free(device, pool);
+
+ return VK_SUCCESS;
+}
+
VkResult anv_GetQueryPoolResults(
VkDevice _device,
VkQueryPool queryPool,