Validation error on vkCmdWriteTimestamps, After query pool creation, each query must be reset before it is use
Author: grandemkCreated Nov 16, 2023Updated Aug 18, 2026
Hi, and thanks for this awesome profiler ;)
Here is the error I'm getting:
08:18:37.223 Engine Error Validation Error: [ VUID-vkCmdWriteTimestamp-None-00830 ]
vkCmdWriteTimestamp: VkQueryPool 0x27d60e0000000019[] and query 9053: query not reset.
After query pool creation, each query must be reset before it is used. Queries must
also be reset between uses. The Vulkan spec states: All queries used by the command
must be unavailable (https://vulkan.lunarg.com/doc/view/1.3.261.1/windows/1.3-extensions/vkspec.html#VUID-vkCmdWriteTimestamp-None-00830)
Object 0: handle = 0x1ee49843bb0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1:
handle = 0x27d60e0000000019, type = VK_OBJECT_TYPE_QUERY_POOL; | MessageID = 0xeb0b9b05From reading the VkCtx / VkCtxScope source code, I feel like I'm not hitting the limit of the number of timestamp (which seems to be 64 * 1024), but the error is what I would expect if I had a wraparound in the query ids, and it disappears if I reduce the amount of TracyVkZone.
The documentation says
You also need to periodically collect the GPU events using the TracyVkCollect(ctx, cmdbuf). The provided command buffer must be in the recording state and outside a render pass instance.
Here is what I'm doing, in essence:
vkBeginCommandBuffer(cmd, ...);
vkBeginRenderPass(cmd, ...)
for (int i = 0; i < 10000; ++i)
{
TracyVkZone(ctx, cmd, "Per Entity Draw");
// Bind stuff + vkCmdDrawIndexed in a very inefficient manner
}
vkCmdEndRenderPass(cmd)
TracyVkCollect(ctx, cmd);
vkEndCommandBuffer(cmd);Source: wolfpld/tracy