To begin a query, call:
// Provided by VK_VERSION_1_0 void vkCmdBeginQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags);
commandBufferis the command buffer into which this command will be recorded.
queryPoolis the query pool that will manage the results of the query.
queryis the query index within the query pool that will contain the results.
flagsis a bitmask of VkQueryControlFlagBits specifying constraints on the types of queries that can be performed.
queryType of the pool is
VK_QUERY_CONTROL_PRECISE_BIT, an implementation
must return a result that matches the actual number of samples passed.
This is described in more detail in Occlusion Queries.
vkCmdBeginQuery is equivalent to calling
vkCmdBeginQueryIndexedEXT with the
index parameter set to zero.
After beginning a query, that query is considered active within the command buffer it was called in until that same query is ended. Queries active in a primary command buffer when secondary command buffers are executed are considered active for those secondary command buffers.
This command defines an execution dependency between other query commands that reference the same query.
The operation of this command happens after the first scope and happens before the second scope.
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.