1// Copyright 2019-2021 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5// Common Valid Usage 6// Common to vkCmdBeginQuery* commands 7 * [[VUID-{refpage}-None-00807]] 8 All queries used by the command must: be unavailable 9 * [[VUID-{refpage}-queryType-02804]] 10 The pname:queryType used to create pname:queryPool must: not be 11 ename:VK_QUERY_TYPE_TIMESTAMP 12ifdef::VK_KHR_acceleration_structure[] 13 * [[VUID-{refpage}-queryType-04728]] 14 The pname:queryType used to create pname:queryPool must: not be 15 ename:VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR or 16 ename:VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR 17endif::VK_KHR_acceleration_structure[] 18ifdef::VK_NV_ray_tracing[] 19 * [[VUID-{refpage}-queryType-04729]] 20 The pname:queryType used to create pname:queryPool must: not be 21 ename:VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV 22endif::VK_NV_ray_tracing[] 23 * [[VUID-{refpage}-queryType-00800]] 24 If the <<features-occlusionQueryPrecise,precise occlusion queries>> 25 feature is not enabled, or the pname:queryType used to create 26 pname:queryPool was not ename:VK_QUERY_TYPE_OCCLUSION, pname:flags must: 27 not contain ename:VK_QUERY_CONTROL_PRECISE_BIT 28 * [[VUID-{refpage}-query-00802]] 29 pname:query must: be less than the number of queries in pname:queryPool 30 * [[VUID-{refpage}-queryType-00803]] 31 If the pname:queryType used to create pname:queryPool was 32 ename:VK_QUERY_TYPE_OCCLUSION, the sname:VkCommandPool that 33 pname:commandBuffer was allocated from must: support graphics operations 34 * [[VUID-{refpage}-queryType-00804]] 35 If the pname:queryType used to create pname:queryPool was 36 ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the 37 pname:pipelineStatistics indicate graphics operations, the 38 sname:VkCommandPool that pname:commandBuffer was allocated from must: 39 support graphics operations 40 * [[VUID-{refpage}-queryType-00805]] 41 If the pname:queryType used to create pname:queryPool was 42 ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the 43 pname:pipelineStatistics indicate compute operations, the 44 sname:VkCommandPool that pname:commandBuffer was allocated from must: 45 support compute operations 46ifdef::VK_VERSION_1_1[] 47 * [[VUID-{refpage}-commandBuffer-01885]] 48 pname:commandBuffer must: not be a protected command buffer 49endif::VK_VERSION_1_1[] 50ifdef::VK_VERSION_1_1,VK_KHR_multiview[] 51 * [[VUID-{refpage}-query-00808]] 52 If called within a render pass instance, the sum of pname:query and the 53 number of bits set in the current subpass's view mask must: be less than 54 or equal to the number of queries in pname:queryPool 55endif::VK_VERSION_1_1,VK_KHR_multiview[] 56ifdef::VK_KHR_video_encode_queue[] 57 * [[VUID-{refpage}-queryType-04862]] 58 If the pname:queryType used to create pname:queryPool was 59 ename:VK_QUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHR the 60 sname:VkCommandPool that pname:commandBuffer was allocated from must: 61 support <<video-encode-operations, video encode operations>> 62endif::VK_KHR_video_encode_queue[] 63// Common Valid Usage 64