// Copyright 2019-2021 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

// Common Valid Usage
// Common to vkCmdBeginQuery* commands
  * [[VUID-{refpage}-None-00807]]
    All queries used by the command must: be unavailable
  * [[VUID-{refpage}-queryType-02804]]
    The pname:queryType used to create pname:queryPool must: not be
    ename:VK_QUERY_TYPE_TIMESTAMP
ifdef::VK_KHR_acceleration_structure[]
  * [[VUID-{refpage}-queryType-04728]]
    The pname:queryType used to create pname:queryPool must: not be
    ename:VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR or
    ename:VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR
endif::VK_KHR_acceleration_structure[]
ifdef::VK_NV_ray_tracing[]
  * [[VUID-{refpage}-queryType-04729]]
    The pname:queryType used to create pname:queryPool must: not be
    ename:VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV
endif::VK_NV_ray_tracing[]
  * [[VUID-{refpage}-queryType-00800]]
    If the <<features-occlusionQueryPrecise,precise occlusion queries>>
    feature is not enabled, or the pname:queryType used to create
    pname:queryPool was not ename:VK_QUERY_TYPE_OCCLUSION, pname:flags must:
    not contain ename:VK_QUERY_CONTROL_PRECISE_BIT
  * [[VUID-{refpage}-query-00802]]
    pname:query must: be less than the number of queries in pname:queryPool
  * [[VUID-{refpage}-queryType-00803]]
    If the pname:queryType used to create pname:queryPool was
    ename:VK_QUERY_TYPE_OCCLUSION, the sname:VkCommandPool that
    pname:commandBuffer was allocated from must: support graphics operations
  * [[VUID-{refpage}-queryType-00804]]
    If the pname:queryType used to create pname:queryPool was
    ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the
    pname:pipelineStatistics indicate graphics operations, the
    sname:VkCommandPool that pname:commandBuffer was allocated from must:
    support graphics operations
  * [[VUID-{refpage}-queryType-00805]]
    If the pname:queryType used to create pname:queryPool was
    ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the
    pname:pipelineStatistics indicate compute operations, the
    sname:VkCommandPool that pname:commandBuffer was allocated from must:
    support compute operations
ifdef::VK_VERSION_1_1[]
  * [[VUID-{refpage}-commandBuffer-01885]]
    pname:commandBuffer must: not be a protected command buffer
endif::VK_VERSION_1_1[]
ifdef::VK_VERSION_1_1,VK_KHR_multiview[]
  * [[VUID-{refpage}-query-00808]]
    If called within a render pass instance, the sum of pname: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 pname:queryPool
endif::VK_VERSION_1_1,VK_KHR_multiview[]
ifdef::VK_KHR_video_encode_queue[]
  * [[VUID-{refpage}-queryType-04862]]
    If the pname:queryType used to create pname:queryPool was
    ename:VK_QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR the
    sname:VkCommandPool that pname:commandBuffer was allocated from must:
    support <<video-encode-operations, video encode operations>>
endif::VK_KHR_video_encode_queue[]
// Common Valid Usage
