1// Copyright 2019-2023 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_KHR_ray_tracing_maintenance1[] 19 * [[VUID-{refpage}-queryType-06741]] 20 The pname:queryType used to create pname:queryPool must: not be 21 ename:VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR or 22 ename:VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR 23endif::VK_KHR_ray_tracing_maintenance1[] 24ifdef::VK_NV_ray_tracing[] 25 * [[VUID-{refpage}-queryType-04729]] 26 The pname:queryType used to create pname:queryPool must: not be 27 ename:VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV 28endif::VK_NV_ray_tracing[] 29ifdef::VK_KHR_VK_EXT_opacity_micromap[] 30 * [[VUID-{refpage}-queryType-08972]] 31 The pname:queryType used to create pname:queryPool must: not be 32 ename:VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT or 33 ename:VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT 34endif::VK_KHR_VK_EXT_opacity_micromap[] 35 * [[VUID-{refpage}-queryType-00800]] 36 If the <<features-occlusionQueryPrecise, pname:occlusionQueryPrecise>> 37 feature is not enabled, or the pname:queryType used to create 38 pname:queryPool was not ename:VK_QUERY_TYPE_OCCLUSION, pname:flags must: 39 not contain ename:VK_QUERY_CONTROL_PRECISE_BIT 40 * [[VUID-{refpage}-query-00802]] 41 pname:query must: be less than the number of queries in pname:queryPool 42 * [[VUID-{refpage}-queryType-00803]] 43 If the pname:queryType used to create pname:queryPool was 44 ename:VK_QUERY_TYPE_OCCLUSION, the sname:VkCommandPool that 45 pname:commandBuffer was allocated from must: support graphics operations 46 * [[VUID-{refpage}-queryType-00804]] 47 If the pname:queryType used to create pname:queryPool was 48 ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the 49 pname:pipelineStatistics indicate graphics operations, the 50 sname:VkCommandPool that pname:commandBuffer was allocated from must: 51 support graphics operations 52 * [[VUID-{refpage}-queryType-00805]] 53 If the pname:queryType used to create pname:queryPool was 54 ename:VK_QUERY_TYPE_PIPELINE_STATISTICS and any of the 55 pname:pipelineStatistics indicate compute operations, the 56 sname:VkCommandPool that pname:commandBuffer was allocated from must: 57 support compute operations 58ifdef::VK_VERSION_1_1[] 59 * [[VUID-{refpage}-commandBuffer-01885]] 60 pname:commandBuffer must: not be a protected command buffer 61endif::VK_VERSION_1_1[] 62ifdef::VK_VERSION_1_1,VK_KHR_multiview[] 63 * [[VUID-{refpage}-query-00808]] 64 If called within a render pass instance, the sum of pname:query and the 65 number of bits set in the current subpass's view mask must: be less than 66 or equal to the number of queries in pname:queryPool 67endif::VK_VERSION_1_1,VK_KHR_multiview[] 68ifdef::VK_KHR_video_queue[] 69 * [[VUID-{refpage}-queryType-07126]] 70 If the pname:queryType used to create pname:queryPool was 71 ename:VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, then the sname:VkCommandPool 72 that pname:commandBuffer was allocated from must: have been created with 73 a queue family index that supports <<queries-result-status-only,result 74 status queries>>, as indicated by 75 slink:VkQueueFamilyQueryResultStatusPropertiesKHR::pname:queryResultStatusSupport 76 * [[VUID-{refpage}-None-07127]] 77 If there is a bound video session, then there must: be no 78 <<queries-operation-active,active>> queries 79 * [[VUID-{refpage}-queryType-07128]] 80 If the pname:queryType used to create pname:queryPool was 81 ename:VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR and there is a bound video 82 session, then pname:queryPool must: have been created with a 83 slink:VkVideoProfileInfoKHR structure included in the pname:pNext chain 84 of slink:VkQueryPoolCreateInfo identical to the one specified in 85 slink:VkVideoSessionCreateInfoKHR::pname:pVideoProfile the bound video 86 session was created with 87endif::VK_KHR_video_queue[] 88ifdef::VK_KHR_video_encode_queue[] 89 * [[VUID-{refpage}-queryType-04862]] 90 If the pname:queryType used to create pname:queryPool was 91 ename:VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, then the 92 sname:VkCommandPool that pname:commandBuffer was allocated from must: 93 support <<video-encode-operations, video encode operations>> 94 * [[VUID-{refpage}-queryType-07129]] 95 If the pname:queryType used to create pname:queryPool was 96 ename:VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, then there must: be a 97 bound video session 98 * [[VUID-{refpage}-queryType-07130]] 99 If the pname:queryType used to create pname:queryPool was 100 ename:VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR and there is a bound video 101 session, then pname:queryPool must: have been created with a 102 slink:VkVideoProfileInfoKHR structure included in the pname:pNext chain 103 of slink:VkQueryPoolCreateInfo identical to the one specified in 104 slink:VkVideoSessionCreateInfoKHR::pname:pVideoProfile the bound video 105 session was created with 106endif::VK_KHR_video_encode_queue[] 107ifdef::VK_KHR_video_queue[] 108ifdef::VK_KHR_video_encode_queue[] 109 * [[VUID-{refpage}-queryType-07131]] 110 If the pname:queryType used to create pname:queryPool was not 111 ename:VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR or 112 ename:VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, then there must: be no 113 bound video session 114endif::VK_KHR_video_encode_queue[] 115ifndef::VK_KHR_video_encode_queue[] 116 * [[VUID-{refpage}-queryType-07132]] 117 If the pname:queryType used to create pname:queryPool was not 118 ename:VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR, then there must: be no bound 119 video session 120endif::VK_KHR_video_encode_queue[] 121endif::VK_KHR_video_queue[] 122// Common Valid Usage 123