From a6515765c88f666cc6f6d4a49d84db5b1aafed4f Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Fri, 3 May 2019 16:10:14 +0200 Subject: [PATCH] - fix vkGetQueryPoolResults: parameter dataSize must be greater than 0 --- src/rendering/vulkan/system/vk_framebuffer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rendering/vulkan/system/vk_framebuffer.cpp b/src/rendering/vulkan/system/vk_framebuffer.cpp index de28f31ca..adc004d37 100644 --- a/src/rendering/vulkan/system/vk_framebuffer.cpp +++ b/src/rendering/vulkan/system/vk_framebuffer.cpp @@ -845,7 +845,8 @@ void VulkanFrameBuffer::PopGroup() void VulkanFrameBuffer::UpdateGpuStats() { uint64_t timestamps[MaxTimestampQueries]; - mTimestampQueryPool->getResults(0, mNextTimestampQuery, sizeof(uint64_t) * mNextTimestampQuery, timestamps, sizeof(uint64_t), VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT); + if (mNextTimestampQuery > 0) + mTimestampQueryPool->getResults(0, mNextTimestampQuery, sizeof(uint64_t) * mNextTimestampQuery, timestamps, sizeof(uint64_t), VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT); double timestampPeriod = device->PhysicalDevice.Properties.limits.timestampPeriod;