Skip to content

Commit

Permalink
WIP: Vulkan spec states that you can't call vkGetQueryPoolResults wit…
Browse files Browse the repository at this point in the history
…h a dataSize of 0
  • Loading branch information
Valakor committed Jan 7, 2024
1 parent bf90e0d commit fce6e3b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Remotery.c
Original file line number Diff line number Diff line change
Expand Up @@ -10153,6 +10153,9 @@ static rmtError CopyTimestamps(VulkanBindImpl* bind, VkDevice vulkan_device, rmt
rmtU32 query_count = ring_pos_b - ring_pos_a;
rmtU64 query_size = query_count * sizeof(rmtU64);

if (query_count == 0)
return RMT_ERROR_NONE;

bind->vkGetQueryPoolResults(vulkan_device, bind->gpuTimestampRingBuffer, ring_pos_a, query_count, query_size, cpu_timestamps + ring_pos_a,
sizeof(rmtU64), VK_QUERY_RESULT_64_BIT);

Expand Down

0 comments on commit fce6e3b

Please sign in to comment.