VKCMDENDQUERY(3)

NAME
vkCmdEndQuery - Ends a query.

C SPECIFICATION

To end a query after the set of desired draw or dispatch commands is executed, call:

    void vkCmdEndQuery(
        VkCommandBuffer                             commandBuffer,
        VkQueryPool                                 queryPool,
        uint32_t                                    query);

PARAMETERS

    • commandBuffer is the command buffer into which this command will be recorded.

    • queryPool is the query pool that is managing the results of the query.

    • query is the query index within the query pool where the result is stored.

DESCRIPTION

As queries operate asynchronously, ending a query does not immediately set the query’s status to available. A query is considered finished when the final results of the query are ready to be retrieved by vkGetQueryPoolResults and vkCmdCopyQueryPoolResults, and this is when the query’s status is set to available.

Once a query is ended the query must finish in finite time, unless the state of the query is changed using other commands, e.g. by issuing a reset of the query.

VALID USAGE

    • commandBuffer must be a valid VkCommandBuffer handle

    • queryPool must be a valid VkQueryPool handle

    • commandBuffer must be in the recording state

    • The VkCommandPool that commandBuffer was allocated from must support graphics or compute operations

    • Each of commandBuffer and queryPool must have been created, allocated or retrieved from the same VkDevice

    • The query identified by queryPool and query must currently be active

    • query must be less than the number of queries in queryPool

HOST SYNCHRONIZATION

    • Host access to commandBuffer must be externally synchronized

COMMAND PROPERTIES
Command Buffer Levels | Render Pass Scope | Supported Queue Types
Primary Secondary | Both | GRAPHICS COMPUTE

SEE ALSO

VkCommandBuffer, VkQueryPool

DOCUMENT NOTES

For more information, see the Vulkan Specification at URL

https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkCmdEndQuery

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification,not directly.

COPYRIGHT

Copyright (c) 2014-2016 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.

AUTHOR

Khronos Group
    Author.