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

// Common Valid Usage
// Common to all drawing commands
ifdef::VK_KHR_performance_query[]
  * [[VUID-{refpage}-queryPool-03223]]
    If pname:queryPool was created with a pname:queryType of
    ename:VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, the <<profiling-lock,
    profiling lock>> must: have been held before flink:vkBeginCommandBuffer
    was called on pname:commandBuffer
  * [[VUID-{refpage}-queryPool-03224]]
    If pname:queryPool was created with a pname:queryType of
    ename:VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR and one of the counters used
    to create pname:queryPool was
    ename:VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR, the query begin
    must: be the first recorded command in pname:commandBuffer
  * [[VUID-{refpage}-queryPool-03225]]
    If pname:queryPool was created with a pname:queryType of
    ename:VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR and one of the counters used
    to create pname:queryPool was
    ename:VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR, the begin command
    must: not be recorded within a render pass instance
  * [[VUID-{refpage}-queryPool-03226]]
    If pname:queryPool was created with a pname:queryType of
    ename:VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR and another query pool with a
    pname:queryType ename:VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR has been used
    within pname:commandBuffer, its parent primary command buffer or
    secondary command buffer recorded within the same parent primary command
    buffer as pname:commandBuffer, the
    <<features-performanceCounterMultipleQueryPools,pname:performanceCounterMultipleQueryPools>>
    feature must: be enabled
  * [[VUID-{refpage}-None-02863]]
    If pname:queryPool was created with a pname:queryType of
    ename:VK_QUERY_TYPE_PERFORMANCE_QUERY_KHR, this command must: not be
    recorded in a command buffer that, either directly or through secondary
    command buffers, also contains a fname:vkCmdResetQueryPool command
    affecting the same query
endif::VK_KHR_performance_query[]
// Common Valid Usage
