mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- add VulkanQueryPool::getResults
This commit is contained in:
parent
d504acad68
commit
692aed0551
1 changed files with 10 additions and 0 deletions
|
@ -210,6 +210,8 @@ public:
|
|||
|
||||
void SetDebugName(const char *name) { device->SetDebugObjectName(name, (uint64_t)pool, VK_OBJECT_TYPE_QUERY_POOL); }
|
||||
|
||||
bool getResults(uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void *data, VkDeviceSize stride, VkQueryResultFlags flags);
|
||||
|
||||
VulkanDevice *device = nullptr;
|
||||
VkQueryPool pool = VK_NULL_HANDLE;
|
||||
|
||||
|
@ -957,6 +959,14 @@ inline VulkanQueryPool::~VulkanQueryPool()
|
|||
vkDestroyQueryPool(device->device, pool, nullptr);
|
||||
}
|
||||
|
||||
inline bool VulkanQueryPool::getResults(uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void *data, VkDeviceSize stride, VkQueryResultFlags flags)
|
||||
{
|
||||
VkResult result = vkGetQueryPoolResults(device->device, pool, firstQuery, queryCount, dataSize, data, stride, flags);
|
||||
if (result != VK_SUCCESS && result != VK_NOT_READY)
|
||||
I_Error("vkGetQueryPoolResults failed");
|
||||
return result == VK_SUCCESS;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline VulkanFramebuffer::VulkanFramebuffer(VulkanDevice *device, VkFramebuffer framebuffer) : device(device), framebuffer(framebuffer)
|
||||
|
|
Loading…
Reference in a new issue