From af8459f194b6ba339670ed85ff0b905f20f08391 Mon Sep 17 00:00:00 2001 From: Alexey Panteleev Date: Wed, 11 Sep 2024 12:30:39 -0700 Subject: [PATCH] Fixed the misuse of vkGetQueryPoolResults in the profiler. --- src/refresh/vkpt/profiler.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/refresh/vkpt/profiler.c b/src/refresh/vkpt/profiler.c index d0bfd7da1..eb95c71cc 100644 --- a/src/refresh/vkpt/profiler.c +++ b/src/refresh/vkpt/profiler.c @@ -43,11 +43,7 @@ typedef struct profiler_entry_samples_s static struct { VkQueryPool query_pool; - uint64_t query_pool_results[NUM_PROFILER_QUERIES_PER_FRAME * 2]; - // ^^^ - // not sure why (* 2) is necessary, looks like there is a bug in AMD drivers - // causing vkGetQueryPoolResults to stop writing the results halfway through - // the buffer if it's properly sized. + uint64_t query_pool_results[NUM_PROFILER_QUERIES_PER_FRAME]; bool queries_used[NUM_PROFILER_QUERIES_PER_FRAME * MAX_FRAMES_IN_FLIGHT]; @@ -212,7 +208,7 @@ vkpt_profiler_next_frame(VkCommandBuffer cmd_buf) sizeof(profiler_data.query_pool_results), profiler_data.query_pool_results, sizeof(profiler_data.query_pool_results[0]), - VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT); + VK_QUERY_RESULT_64_BIT); if (result != VK_SUCCESS && result != VK_NOT_READY) {