VKCMDBEGINQUERY(3)

NAME
vkCmdBeginQuery - Begin a query.

C SPECIFICATION

    void vkCmdBeginQuery(
        VkCommandBuffer                             commandBuffer,
        VkQueryPool                                 queryPool,
        uint32_t                                    query,
        VkQueryControlFlags                         flags);

PARAMETERS

commandBuffer
    The command buffer upon which to execute the query.

queryPool
    The query pool which contains the requested query.

entry
    The index of the entry within queryPool at which the query resides.

flags
    A set of flags controlling how the query should be executed (see VkQueryControlFlags).

DESCRIPTION

vkCmdBeginQuery begins the query located at the entry indicated by entry in the pool specified in queryPool. The flags parameter specifies how the query should be executed and must be one of the flags defined in VkQueryControlFlags.

VALID USAGE

    • commandBuffer must be a valid VkCommandBuffer handle

    • queryPool must be a valid VkQueryPool handle

    • flags must be a valid combination of VkQueryControlFlagBits values

    • 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 not be active

    • The query identified by queryPool and query must be unavailable

    • If the precise occlusion queries feature is not enabled, or the queryType used to create queryPool was not VK_QUERY_TYPE_OCCLUSION, flags must not contain VK_QUERY_CONTROL_PRECISE_BIT

    • queryPool must have been created with a queryType that differs from that of any other queries that have been made active, and are currently still active within commandBuffer

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

    • If the queryType used to create queryPool was VK_QUERY_TYPE_OCCLUSION, the VkCommandPool that commandBuffer was created from must support graphics operations

    • If the queryType used to create queryPool was VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the pipelineStatistics indicate graphics operations, the VkCommandPool that commandBuffer was created from must support graphics operations

    • If the queryType used to create queryPool was VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the pipelineStatistics indicate compute operations, the VkCommandPool that commandBuffer was created from must support compute operations

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

NOTES

Although vkCmdBeginQuery does not generate errors or return a value, enabled validation layers may detect possible error conditions or potentially undefined behavior and report this via some other means.

SEE ALSO

vkCmdEndQuery, vkCreateQueryPool, vkCmdResetQueryPool, vkCmdCopyQueryPoolResults, vkGetQueryPoolResults, vkDestroyQueryPool

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.