- fix vkGetQueryPoolResults: parameter dataSize must be greater than 0

This commit is contained in:
Magnus Norddahl 2019-05-03 16:10:14 +02:00 committed by Rachael Alexanderson
parent 32ec93b009
commit 8775d70e52

View file

@ -845,6 +845,7 @@ void VulkanFrameBuffer::PopGroup()
void VulkanFrameBuffer::UpdateGpuStats()
{
uint64_t timestamps[MaxTimestampQueries];
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;