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 all dispatch and drawing commands 7 * [[VUID-{refpage}-magFilter-04553]] 8 If a slink:VkSampler created with pname:magFilter or pname:minFilter 9 equal to ename:VK_FILTER_LINEAR and pname:compareEnable equal to 10 ename:VK_FALSE is used to sample a slink:VkImageView as a result of this 11 command, then the image view's 12 <<resources-image-view-format-features,format features>> must: contain 13 ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT 14 * [[VUID-{refpage}-mipmapMode-04770]] 15 If a slink:VkSampler created with pname:mipmapMode equal to 16 ename:VK_SAMPLER_MIPMAP_MODE_LINEAR and pname:compareEnable equal to 17 ename:VK_FALSE is used to sample a slink:VkImageView as a result of this 18 command, then the image view's 19 <<resources-image-view-format-features,format features>> must: contain 20 ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT 21 * [[VUID-{refpage}-None-02691]] 22 If a sname:VkImageView is accessed using atomic operations as a result 23 of this command, then the image view's 24 <<resources-image-view-format-features,format features>> must: contain 25 ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT 26ifdef::VK_IMG_filter_cubic,VK_EXT_filter_cubic[] 27 * [[VUID-{refpage}-None-02692]] 28 If a sname:VkImageView is sampled with ename:VK_FILTER_CUBIC_EXT as a 29 result of this command, then the image view's 30 <<resources-image-view-format-features,format features>> must: contain 31 ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT 32ifndef::VK_EXT_filter_cubic[] 33 * [[VUID-{refpage}-None-02693]] 34 Any slink:VkImageView being sampled with ename:VK_FILTER_CUBIC_EXT as a 35 result of this command must: not have a elink:VkImageViewType of 36 ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, or 37 ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY 38endif::VK_EXT_filter_cubic[] 39ifdef::VK_EXT_filter_cubic[] 40 * [[VUID-{refpage}-filterCubic-02694]] 41 Any slink:VkImageView being sampled with ename:VK_FILTER_CUBIC_EXT as a 42 result of this command must: have a elink:VkImageViewType and format 43 that supports cubic filtering, as specified by 44 sname:VkFilterCubicImageViewImageFormatPropertiesEXT::pname:filterCubic 45 returned by fname:vkGetPhysicalDeviceImageFormatProperties2 46 * [[VUID-{refpage}-filterCubicMinmax-02695]] 47 Any slink:VkImageView being sampled with ename:VK_FILTER_CUBIC_EXT with 48 a reduction mode of either ename:VK_SAMPLER_REDUCTION_MODE_MIN or 49 ename:VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must: 50 have a elink:VkImageViewType and format that supports cubic filtering 51 together with minmax filtering, as specified by 52 sname:VkFilterCubicImageViewImageFormatPropertiesEXT::pname:filterCubicMinmax 53 returned by fname:vkGetPhysicalDeviceImageFormatProperties2 54endif::VK_EXT_filter_cubic[] 55endif::VK_IMG_filter_cubic,VK_EXT_filter_cubic[] 56ifdef::VK_NV_corner_sampled_image[] 57 * [[VUID-{refpage}-flags-02696]] 58 Any slink:VkImage created with a slink:VkImageCreateInfo::pname:flags 59 containing ename:VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a 60 result of this command must: only be sampled using a 61 elink:VkSamplerAddressMode of 62 ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE 63endif::VK_NV_corner_sampled_image[] 64ifdef::VK_KHR_format_feature_flags2[] 65 * [[VUID-{refpage}-OpTypeImage-06423]] 66 Any slink:VkImageView or slink:VkBufferView being written as a storage 67 image or storage texel buffer where the image format field of the 68 code:OpTypeImage is code:Unknown must: have image format features that 69 support ename:VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR 70 * [[VUID-{refpage}-OpTypeImage-06424]] 71 Any slink:VkImageView or slink:VkBufferView being read as a storage 72 image or storage texel buffer where the image format field of the 73 code:OpTypeImage is code:Unknown must: have image format features that 74 support ename:VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR 75endif::VK_KHR_format_feature_flags2[] 76 * [[VUID-{refpage}-None-02697]] 77 For each set _n_ that is statically used by the sname:VkPipeline bound 78 to the pipeline bind point used by this command, a descriptor set must: 79 have been bound to _n_ at the same pipeline bind point, with a 80 sname:VkPipelineLayout that is compatible for set _n_, with the 81 sname:VkPipelineLayout used to create the current sname:VkPipeline, as 82 described in <<descriptorsets-compatibility>> 83ifndef::VK_KHR_maintenance4[] 84 * [[VUID-{refpage}-None-02698]] 85 For each push constant that is statically used by the sname:VkPipeline 86 bound to the pipeline bind point used by this command, a push constant 87 value must: have been set for the same pipeline bind point, with a 88 sname:VkPipelineLayout that is compatible for push constants, with the 89 sname:VkPipelineLayout used to create the current sname:VkPipeline, as 90 described in <<descriptorsets-compatibility>> 91endif::VK_KHR_maintenance4[] 92ifdef::VK_KHR_maintenance4[] 93 * [[VUID-{refpage}-maintenance4-06425]] 94 If the <<features-maintenance4, pname:maintenance4>> feature is not 95 enabled, then for each push constant that is statically used by the 96 sname:VkPipeline bound to the pipeline bind point used by this command, 97 a push constant value must: have been set for the same pipeline bind 98 point, with a sname:VkPipelineLayout that is compatible for push 99 constants, with the sname:VkPipelineLayout used to create the current 100 sname:VkPipeline, as described in <<descriptorsets-compatibility>> 101endif::VK_KHR_maintenance4[] 102 * [[VUID-{refpage}-None-02699]] 103 Descriptors in each bound descriptor set, specified via 104 fname:vkCmdBindDescriptorSets, must: be valid if they are statically 105 used by the sname:VkPipeline bound to the pipeline bind point used by 106 this command 107 * [[VUID-{refpage}-None-02700]] 108 A valid pipeline must: be bound to the pipeline bind point used by this 109 command 110 * [[VUID-{refpage}-commandBuffer-02701]] 111 If the sname:VkPipeline object bound to the pipeline bind point used by 112 this command requires any dynamic state, that state must: have been set 113 or inherited (if the `apiext:VK_NV_inherited_viewport_scissor` extension 114 is enabled) for pname:commandBuffer, and done so after any previously 115 bound pipeline with the corresponding state not specified as dynamic 116 * [[VUID-{refpage}-None-02859]] 117 There must: not have been any calls to dynamic state setting commands 118 for any state not specified as dynamic in the sname:VkPipeline object 119 bound to the pipeline bind point used by this command, since that 120 pipeline was bound 121 * [[VUID-{refpage}-None-02702]] 122 If the sname:VkPipeline object bound to the pipeline bind point used by 123 this command accesses a sname:VkSampler object that uses unnormalized 124 coordinates, that sampler must: not be used to sample from any 125 sname:VkImage with a sname:VkImageView of the type 126 ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, 127 ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or 128 ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage 129 * [[VUID-{refpage}-None-02703]] 130 If the sname:VkPipeline object bound to the pipeline bind point used by 131 this command accesses a sname:VkSampler object that uses unnormalized 132 coordinates, that sampler must: not be used with any of the SPIR-V 133 `OpImageSample*` or `OpImageSparseSample*` instructions with 134 code:ImplicitLod, code:Dref or code:Proj in their name, in any shader 135 stage 136 * [[VUID-{refpage}-None-02704]] 137 If the sname:VkPipeline object bound to the pipeline bind point used by 138 this command accesses a sname:VkSampler object that uses unnormalized 139 coordinates, that sampler must: not be used with any of the SPIR-V 140 `OpImageSample*` or `OpImageSparseSample*` instructions that includes a 141 LOD bias or any offset values, in any shader stage 142 * [[VUID-{refpage}-None-02705]] 143 If the <<features-robustBufferAccess,robust buffer access>> feature is 144 not enabled, and if the sname:VkPipeline object bound to the pipeline 145 bind point used by this command accesses a uniform buffer, it must: not 146 access values outside of the range of the buffer as specified in the 147 descriptor set bound to the same pipeline bind point 148 * [[VUID-{refpage}-None-02706]] 149 If the <<features-robustBufferAccess,robust buffer access>> feature is 150 not enabled, and if the sname:VkPipeline object bound to the pipeline 151 bind point used by this command accesses a storage buffer, it must: not 152 access values outside of the range of the buffer as specified in the 153 descriptor set bound to the same pipeline bind point 154ifdef::VK_VERSION_1_1[] 155 * [[VUID-{refpage}-commandBuffer-02707]] 156 If pname:commandBuffer is an unprotected command buffer and 157 <<limits-protectedNoFault, pname:protectedNoFault>> is not supported, 158 any resource accessed by the slink:VkPipeline object bound to the 159 pipeline bind point used by this command must: not be a protected 160 resource 161endif::VK_VERSION_1_1[] 162 * [[VUID-{refpage}-None-04115]] 163 If a slink:VkImageView is accessed using code:OpImageWrite as a result 164 of this command, then the code:Type of the code:Texel operand of that 165 instruction must: have at least as many components as the image view's 166 format 167 * [[VUID-{refpage}-OpImageWrite-04469]] 168 If a slink:VkBufferView is accessed using code:OpImageWrite as a result 169 of this command, then the code:Type of the code:Texel operand of that 170 instruction must: have at least as many components as the buffer view's 171 format 172ifdef::VK_EXT_shader_image_atomic_int64[] 173 * [[VUID-{refpage}-SampledType-04470]] 174 If a slink:VkImageView with a elink:VkFormat that has a 64-bit component 175 width is accessed as a result of this command, the code:SampledType of 176 the code:OpTypeImage operand of that instruction must: have a code:Width 177 of 64 178 * [[VUID-{refpage}-SampledType-04471]] 179 If a slink:VkImageView with a elink:VkFormat that has a component width 180 less than 64-bit is accessed as a result of this command, the 181 code:SampledType of the code:OpTypeImage operand of that instruction 182 must: have a code:Width of 32 183 * [[VUID-{refpage}-SampledType-04472]] 184 If a slink:VkBufferView with a elink:VkFormat that has a 64-bit 185 component width is accessed as a result of this command, the 186 code:SampledType of the code:OpTypeImage operand of that instruction 187 must: have a code:Width of 64 188 * [[VUID-{refpage}-SampledType-04473]] 189 If a slink:VkBufferView with a elink:VkFormat that has a component width 190 less than 64-bit is accessed as a result of this command, the 191 code:SampledType of the code:OpTypeImage operand of that instruction 192 must: have a code:Width of 32 193 * [[VUID-{refpage}-sparseImageInt64Atomics-04474]] 194 If the 195 <<features-sparseImageInt64Atomics,pname:sparseImageInt64Atomics>> 196 feature is not enabled, slink:VkImage objects created with the 197 ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag must: not be accessed by 198 atomic instructions through an code:OpTypeImage with a code:SampledType 199 with a code:Width of 64 by this command 200 * [[VUID-{refpage}-sparseImageInt64Atomics-04475]] 201 If the 202 <<features-sparseImageInt64Atomics,pname:sparseImageInt64Atomics>> 203 feature is not enabled, slink:VkBuffer objects created with the 204 ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT flag must: not be accessed 205 by atomic instructions through an code:OpTypeImage with a 206 code:SampledType with a code:Width of 64 by this command 207endif::VK_EXT_shader_image_atomic_int64[] 208// Common Valid Usage 209