C Specification

To end an indexed query after the set of desired drawing or dispatching commands is recorded, call:

// Provided by VK_EXT_transform_feedback
void vkCmdEndQueryIndexedEXT(
    VkCommandBuffer                             commandBuffer,
    VkQueryPool                                 queryPool,
    uint32_t                                    query,
    uint32_t                                    index);

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.

  • index is the query type specific index.

Description

The command completes the query in queryPool identified by query and index, and marks it as available.

The vkCmdEndQueryIndexedEXT command operates the same as the vkCmdEndQuery command, except that it also accepts a query type specific index parameter.

This command defines an execution dependency between other query commands that reference the same query index.

The first synchronization scope includes all commands which reference the queries in queryPool indicated by query that occur earlier in submission order.

The second synchronization scope includes only the operation of this command.

Valid Usage
  • VUID-vkCmdEndQueryIndexedEXT-None-02342
    All queries used by the command must be active

  • VUID-vkCmdEndQueryIndexedEXT-query-02343
    query must be less than the number of queries in queryPool

  • VUID-vkCmdEndQueryIndexedEXT-commandBuffer-02344
    commandBuffer must not be a protected command buffer

  • VUID-vkCmdEndQueryIndexedEXT-query-02345
    If vkCmdEndQueryIndexedEXT is called within a render pass instance, the sum of query and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in queryPool

  • VUID-vkCmdEndQueryIndexedEXT-queryType-06694
    If the queryType used to create queryPool was VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT or VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT, the index parameter must be less than VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackStreams

  • VUID-vkCmdEndQueryIndexedEXT-queryType-06695
    If the queryType used to create queryPool was not VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT and not VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT, the index must be zero

  • VUID-vkCmdEndQueryIndexedEXT-queryType-06696
    If the queryType used to create queryPool was VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT or VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT, index must equal the index used to begin the query

  • [[VUID-{refpage}-None-07007]] VUID-{refpage}-None-07007
    If called within a subpass of a render pass instance, the corresponding vkCmdBeginQuery* command must have been called previously within the same subpass

  • [[VUID-{refpage}-None-07008]] VUID-{refpage}-None-07008
    If called outside of a render pass instance, the corresponding vkCmdBeginQuery* command must have been called outside of a render pass instance

Valid Usage (Implicit)
  • VUID-vkCmdEndQueryIndexedEXT-commandBuffer-parameter
    commandBuffer must be a valid VkCommandBuffer handle

  • VUID-vkCmdEndQueryIndexedEXT-queryPool-parameter
    queryPool must be a valid VkQueryPool handle

  • VUID-vkCmdEndQueryIndexedEXT-commandBuffer-recording
    commandBuffer must be in the recording state

  • VUID-vkCmdEndQueryIndexedEXT-commandBuffer-cmdpool
    The VkCommandPool that commandBuffer was allocated from must support graphics, compute, decode, or encode operations

  • VUID-vkCmdEndQueryIndexedEXT-videocoding
    This command must only be called outside of a video coding scope

  • VUID-vkCmdEndQueryIndexedEXT-commonparent
    Both of commandBuffer, and queryPool must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization
  • Host access to commandBuffer must be externally synchronized

  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type

Primary
Secondary

Both

Outside

Graphics
Compute
Decode
Encode

Action
State

See Also

Document Notes

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.

Copyright 2014-2022 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0