• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019-2022 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
21ifndef::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
22  * [[VUID-{refpage}-aspectMask-06478]]
23    If a slink:VkImageView is sampled with
24    <<textures-depth-compare-operation,depth comparison>>, the image view
25    must: have been created with an pname:aspectMask that contains
26    ename:VK_IMAGE_ASPECT_DEPTH_BIT
27endif::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
28ifdef::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
29  * [[VUID-{refpage}-None-06479]]
30    If a slink:VkImageView is sampled with
31    <<textures-depth-compare-operation,depth comparison>>, the image view's
32    <<resources-image-view-format-features,format features>> must: contain
33    ename:VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT
34endif::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
35  * [[VUID-{refpage}-None-02691]]
36    If a sname:VkImageView is accessed using atomic operations as a result
37    of this command, then the image view's
38    <<resources-image-view-format-features,format features>> must: contain
39    ename:VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
40ifdef::VK_IMG_filter_cubic,VK_EXT_filter_cubic[]
41  * [[VUID-{refpage}-None-02692]]
42    If a sname:VkImageView is sampled with ename:VK_FILTER_CUBIC_EXT as a
43    result of this command, then the image view's
44    <<resources-image-view-format-features,format features>> must: contain
45    ename:VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
46ifndef::VK_EXT_filter_cubic[]
47  * [[VUID-{refpage}-None-02693]]
48    Any slink:VkImageView being sampled with ename:VK_FILTER_CUBIC_EXT as a
49    result of this command must: not have a elink:VkImageViewType of
50    ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE, or
51    ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY
52endif::VK_EXT_filter_cubic[]
53ifdef::VK_EXT_filter_cubic[]
54  * [[VUID-{refpage}-filterCubic-02694]]
55    Any slink:VkImageView being sampled with ename:VK_FILTER_CUBIC_EXT as a
56    result of this command must: have a elink:VkImageViewType and format
57    that supports cubic filtering, as specified by
58    sname:VkFilterCubicImageViewImageFormatPropertiesEXT::pname:filterCubic
59    returned by fname:vkGetPhysicalDeviceImageFormatProperties2
60  * [[VUID-{refpage}-filterCubicMinmax-02695]]
61    Any slink:VkImageView being sampled with ename:VK_FILTER_CUBIC_EXT with
62    a reduction mode of either ename:VK_SAMPLER_REDUCTION_MODE_MIN or
63    ename:VK_SAMPLER_REDUCTION_MODE_MAX as a result of this command must:
64    have a elink:VkImageViewType and format that supports cubic filtering
65    together with minmax filtering, as specified by
66    sname:VkFilterCubicImageViewImageFormatPropertiesEXT::pname:filterCubicMinmax
67    returned by fname:vkGetPhysicalDeviceImageFormatProperties2
68endif::VK_EXT_filter_cubic[]
69endif::VK_IMG_filter_cubic,VK_EXT_filter_cubic[]
70ifdef::VK_NV_corner_sampled_image[]
71  * [[VUID-{refpage}-flags-02696]]
72    Any slink:VkImage created with a slink:VkImageCreateInfo::pname:flags
73    containing ename:VK_IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a
74    result of this command must: only be sampled using a
75    elink:VkSamplerAddressMode of
76    ename:VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
77endif::VK_NV_corner_sampled_image[]
78ifdef::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
79  * [[VUID-{refpage}-OpTypeImage-07027]]
80    For any slink:VkImageView being written as a storage image where the
81    image format field of the code:OpTypeImage is code:Unknown, the view's
82    <<resources-image-view-format-features,format features>> must: contain
83    ename:VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT
84  * [[VUID-{refpage}-OpTypeImage-07028]]
85    For any slink:VkImageView being read as a storage image where the image
86    format field of the code:OpTypeImage is code:Unknown, the view's
87    <<resources-image-view-format-features,format features>> must: contain
88    ename:VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT
89  * [[VUID-{refpage}-OpTypeImage-07029]]
90    For any slink:VkBufferView being written as a storage texel buffer where
91    the image format field of the code:OpTypeImage is code:Unknown, the
92    view's <<VkFormatProperties3,buffer features>> must: contain
93    ename:VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT
94  * [[VUID-{refpage}-OpTypeImage-07030]]
95    Any slink:VkBufferView being read as a storage texel buffer where the
96    image format field of the code:OpTypeImage is code:Unknown then the
97    view's <<VkFormatProperties3,buffer features>> must: contain
98    ename:VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT
99endif::VK_VERSION_1_3,VK_KHR_format_feature_flags2[]
100  * [[VUID-{refpage}-None-02697]]
101    For each set _n_ that is statically used by the sname:VkPipeline bound
102    to the pipeline bind point used by this command, a descriptor set must:
103    have been bound to _n_ at the same pipeline bind point, with a
104    sname:VkPipelineLayout that is compatible for set _n_, with the
105    sname:VkPipelineLayout used to create the current sname:VkPipeline, as
106    described in <<descriptorsets-compatibility>>
107ifndef::VK_VERSION_1_3,VK_KHR_maintenance4[]
108  * [[VUID-{refpage}-None-02698]]
109    For each push constant that is statically used by the sname:VkPipeline
110    bound to the pipeline bind point used by this command, a push constant
111    value must: have been set for the same pipeline bind point, with a
112    sname:VkPipelineLayout that is compatible for push constants, with the
113    sname:VkPipelineLayout used to create the current sname:VkPipeline, as
114    described in <<descriptorsets-compatibility>>
115endif::VK_VERSION_1_3,VK_KHR_maintenance4[]
116ifdef::VK_VERSION_1_3,VK_KHR_maintenance4[]
117  * [[VUID-{refpage}-maintenance4-06425]]
118    If the <<features-maintenance4, pname:maintenance4>> feature is not
119    enabled, then for each push constant that is statically used by the
120    sname:VkPipeline bound to the pipeline bind point used by this command,
121    a push constant value must: have been set for the same pipeline bind
122    point, with a sname:VkPipelineLayout that is compatible for push
123    constants, with the sname:VkPipelineLayout used to create the current
124    sname:VkPipeline, as described in <<descriptorsets-compatibility>>
125endif::VK_VERSION_1_3,VK_KHR_maintenance4[]
126ifndef::VK_EXT_descriptor_buffer[]
127  * [[VUID-{refpage}-None-02699]]
128    Descriptors in each bound descriptor set, specified via
129    fname:vkCmdBindDescriptorSets, must: be valid as described by
130    <<descriptor-validity,descriptor validity>> if they are statically used
131    by the sname:VkPipeline bound to the pipeline bind point used by this
132    command
133endif::VK_EXT_descriptor_buffer[]
134ifdef::VK_EXT_descriptor_buffer[]
135  * [[VUID-{refpage}-None-08114]]
136    Descriptors in each bound descriptor set, specified via
137    fname:vkCmdBindDescriptorSets, must: be valid if they are statically
138    used by the sname:VkPipeline bound to the pipeline bind point used by
139    this command and the bound sname:VkPipeline was not created with
140    ename:VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
141  * [[VUID-{refpage}-None-08115]]
142    If the descriptors used by the sname:VkPipeline bound to the pipeline
143    bind point were specified via fname:vkCmdBindDescriptorSets, the bound
144    sname:VkPipeline must: have been created without
145    ename:VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
146  * [[VUID-{refpage}-None-08116]]
147    Descriptors in bound descriptor buffers, specified via
148    fname:vkCmdSetDescriptorBufferOffsetsEXT, must: be valid if they are
149    dynamically used by the sname:VkPipeline bound to the pipeline bind
150    point used by this command and the bound sname:VkPipeline was created
151    with ename:VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
152  * [[VUID-{refpage}-None-08117]]
153    If the descriptors used by the sname:VkPipeline bound to the pipeline
154    bind point were specified via fname:vkCmdSetDescriptorBufferOffsetsEXT,
155    the bound sname:VkPipeline must: have been created with
156    ename:VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
157  * [[VUID-{refpage}-None-08119]]
158    If a descriptor is dynamically used with a sname:VkPipeline created with
159    ename:VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT, the descriptor
160    memory must: be resident
161endif::VK_EXT_descriptor_buffer[]
162  * [[VUID-{refpage}-None-02700]]
163    A valid pipeline must: be bound to the pipeline bind point used by this
164    command
165  * [[VUID-{refpage}-commandBuffer-02701]]
166    If the sname:VkPipeline object bound to the pipeline bind point used by
167    this command requires any dynamic state, that state must: have been set
168    or inherited (if the `apiext:VK_NV_inherited_viewport_scissor` extension
169    is enabled) for pname:commandBuffer, and done so after any previously
170    bound pipeline with the corresponding state not specified as dynamic
171  * [[VUID-{refpage}-None-02859]]
172    There must: not have been any calls to dynamic state setting commands
173    for any state not specified as dynamic in the sname:VkPipeline object
174    bound to the pipeline bind point used by this command, since that
175    pipeline was bound
176  * [[VUID-{refpage}-None-02702]]
177    If the sname:VkPipeline object bound to the pipeline bind point used by
178    this command accesses a sname:VkSampler object that uses unnormalized
179    coordinates, that sampler must: not be used to sample from any
180    sname:VkImage with a sname:VkImageView of the type
181    ename:VK_IMAGE_VIEW_TYPE_3D, ename:VK_IMAGE_VIEW_TYPE_CUBE,
182    ename:VK_IMAGE_VIEW_TYPE_1D_ARRAY, ename:VK_IMAGE_VIEW_TYPE_2D_ARRAY or
183    ename:VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage
184  * [[VUID-{refpage}-None-02703]]
185    If the sname:VkPipeline object bound to the pipeline bind point used by
186    this command accesses a sname:VkSampler object that uses unnormalized
187    coordinates, that sampler must: not be used with any of the SPIR-V
188    `OpImageSample*` or `OpImageSparseSample*` instructions with
189    code:ImplicitLod, code:Dref or code:Proj in their name, in any shader
190    stage
191  * [[VUID-{refpage}-None-02704]]
192    If the sname:VkPipeline object bound to the pipeline bind point used by
193    this command accesses a sname:VkSampler object that uses unnormalized
194    coordinates, that sampler must: not be used with any of the SPIR-V
195    `OpImageSample*` or `OpImageSparseSample*` instructions that includes a
196    LOD bias or any offset values, in any shader stage
197ifndef::VK_EXT_pipeline_robustness[]
198  * [[VUID-{refpage}-None-02705]]
199    If the <<features-robustBufferAccess, pname:robustBufferAccess>> feature
200    is not enabled, and if the sname:VkPipeline object bound to the pipeline
201    bind point used by this command accesses a uniform buffer, it must: not
202    access values outside of the range of the buffer as specified in the
203    descriptor set bound to the same pipeline bind point
204endif::VK_EXT_pipeline_robustness[]
205ifdef::VK_EXT_pipeline_robustness[]
206  * [[VUID-{refpage}-uniformBuffers-06935]]
207    If any stage of the sname:VkPipeline object bound to the pipeline bind
208    point used by this command accesses a uniform buffer, and that stage was
209    created without enabling either
210    ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT or
211    ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT
212    for pname:uniformBuffers, and the <<features-robustBufferAccess,
213    pname:robustBufferAccess>> feature is not enabled, that stage must: not
214    access values outside of the range of the buffer as specified in the
215    descriptor set bound to the same pipeline bind point
216endif::VK_EXT_pipeline_robustness[]
217ifndef::VK_EXT_pipeline_robustness[]
218  * [[VUID-{refpage}-None-02706]]
219    If the <<features-robustBufferAccess, pname:robustBufferAccess>> feature
220    is not enabled, and if the sname:VkPipeline object bound to the pipeline
221    bind point used by this command accesses a storage buffer, it must: not
222    access values outside of the range of the buffer as specified in the
223    descriptor set bound to the same pipeline bind point
224endif::VK_EXT_pipeline_robustness[]
225ifdef::VK_EXT_pipeline_robustness[]
226  * [[VUID-{refpage}-storageBuffers-06936]]
227    If any stage of the sname:VkPipeline object bound to the pipeline bind
228    point used by this command accesses a storage buffer, and that stage was
229    created without enabling either
230    ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT or
231    ename:VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT
232    for pname:storageBuffers, and the <<features-robustBufferAccess,
233    pname:robustBufferAccess>> feature is not enabled, that stage must: not
234    access values outside of the range of the buffer as specified in the
235    descriptor set bound to the same pipeline bind point
236endif::VK_EXT_pipeline_robustness[]
237ifdef::VK_VERSION_1_1[]
238  * [[VUID-{refpage}-commandBuffer-02707]]
239    If pname:commandBuffer is an unprotected command buffer and
240    <<limits-protectedNoFault, pname:protectedNoFault>> is not supported,
241    any resource accessed by the slink:VkPipeline object bound to the
242    pipeline bind point used by this command must: not be a protected
243    resource
244endif::VK_VERSION_1_1[]
245ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
246  * [[VUID-{refpage}-None-06550]]
247    If the sname:VkPipeline object bound to the pipeline bind point used by
248    this command accesses a sname:VkSampler or sname:VkImageView object that
249    enables <<samplers-YCbCr-conversion,sampler {YCbCr} conversion>>, that
250    object must: only be used with `OpImageSample*` or
251    `OpImageSparseSample*` instructions
252  * [[VUID-{refpage}-ConstOffset-06551]]
253    If the sname:VkPipeline object bound to the pipeline bind point used by
254    this command accesses a sname:VkSampler or sname:VkImageView object that
255    enables <<samplers-YCbCr-conversion,sampler {YCbCr} conversion>>, that
256    object must: not use the code:ConstOffset and code:Offset operands
257endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
258  * [[VUID-{refpage}-viewType-07752]]
259    If a slink:VkImageView is accessed as a result of this command, then the
260    image view's pname:viewType must: match the code:Dim operand of the
261    code:OpTypeImage as described in <<textures-operation-validation>>
262  * [[VUID-{refpage}-format-07753]]
263    If a slink:VkImageView is accessed as a result of this command, then the
264    image view's pname:format must: match the numeric format from the
265    code:Sampled code:Type operand of the code:OpTypeImage as described in
266    the SPIR-V Sampled Type column of the <<formats-numericformat>> table
267  * [[VUID-{refpage}-None-04115]]
268    If a slink:VkImageView is accessed using code:OpImageWrite as a result
269    of this command, then the code:Type of the code:Texel operand of that
270    instruction must: have at least as many components as the image view's
271    format
272  * [[VUID-{refpage}-OpImageWrite-04469]]
273    If a slink:VkBufferView is accessed using code:OpImageWrite as a result
274    of this command, then the code:Type of the code:Texel operand of that
275    instruction must: have at least as many components as the buffer view's
276    format
277ifdef::VK_EXT_shader_image_atomic_int64[]
278  * [[VUID-{refpage}-SampledType-04470]]
279    If a slink:VkImageView with a elink:VkFormat that has a 64-bit component
280    width is accessed as a result of this command, the code:SampledType of
281    the code:OpTypeImage operand of that instruction must: have a code:Width
282    of 64
283  * [[VUID-{refpage}-SampledType-04471]]
284    If a slink:VkImageView with a elink:VkFormat that has a component width
285    less than 64-bit is accessed as a result of this command, the
286    code:SampledType of the code:OpTypeImage operand of that instruction
287    must: have a code:Width of 32
288  * [[VUID-{refpage}-SampledType-04472]]
289    If a slink:VkBufferView with a elink:VkFormat that has a 64-bit
290    component width is accessed as a result of this command, the
291    code:SampledType of the code:OpTypeImage operand of that instruction
292    must: have a code:Width of 64
293  * [[VUID-{refpage}-SampledType-04473]]
294    If a slink:VkBufferView with a elink:VkFormat that has a component width
295    less than 64-bit is accessed as a result of this command, the
296    code:SampledType of the code:OpTypeImage operand of that instruction
297    must: have a code:Width of 32
298  * [[VUID-{refpage}-sparseImageInt64Atomics-04474]]
299    If the <<features-sparseImageInt64Atomics,
300    pname:sparseImageInt64Atomics>> feature is not enabled, slink:VkImage
301    objects created with the ename:VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT flag
302    must: not be accessed by atomic instructions through an code:OpTypeImage
303    with a code:SampledType with a code:Width of 64 by this command
304  * [[VUID-{refpage}-sparseImageInt64Atomics-04475]]
305    If the <<features-sparseImageInt64Atomics,
306    pname:sparseImageInt64Atomics>> feature is not enabled, slink:VkBuffer
307    objects created with the ename:VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT
308    flag must: not be accessed by atomic instructions through an
309    code:OpTypeImage with a code:SampledType with a code:Width of 64 by this
310    command
311endif::VK_EXT_shader_image_atomic_int64[]
312ifdef::VK_QCOM_image_processing[]
313  * [[VUID-{refpage}-OpImageWeightedSampleQCOM-06971]]
314    If code:OpImageWeightedSampleQCOM is used to sample a slink:VkImageView
315    as a result of this command, then the image view's
316    <<resources-image-view-format-features,format features>> must: contain
317    ename:VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM
318  * [[VUID-{refpage}-OpImageWeightedSampleQCOM-06972]]
319    If code:OpImageWeightedSampleQCOM uses a slink:VkImageView as a sample
320    weight image as a result of this command, then the image view's
321    <<resources-image-view-format-features,format features>> must: contain
322    ename:VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM
323  * [[VUID-{refpage}-OpImageBoxFilterQCOM-06973]]
324    If code:OpImageBoxFilterQCOM is used to sample a slink:VkImageView as a
325    result of this command, then the image view's
326    <<resources-image-view-format-features,format features>> must: contain
327    ename:VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT_QCOM
328  * [[VUID-{refpage}-OpImageBlockMatchSSDQCOM-06974]]
329    If code:OpImageBlockMatchSSDQCOM is used to read from an
330    slink:VkImageView as a result of this command, then the image view's
331    <<resources-image-view-format-features,format features>> must: contain
332    ename:VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM
333  * [[VUID-{refpage}-OpImageBlockMatchSADQCOM-06975]]
334    If code:OpImageBlockMatchSADQCOM is used to read from an
335    slink:VkImageView as a result of this command, then the image view's
336    <<resources-image-view-format-features,format features>> must: contain
337    ename:VK_FORMAT_FEATURE_2_BLOCK_MATCHING_BIT_QCOM
338  * [[VUID-{refpage}-OpImageBlockMatchSADQCOM-06976]]
339    If code:OpImageBlockMatchSADQCOM or OpImageBlockMatchSSDQCOM is used to
340    read from a reference image as result of this command, then the
341    specified reference coordinates must: not fail
342    <<textures-integer-coordinate-validation,integer texel coordinate
343    validation>>
344  * [[VUID-{refpage}-OpImageWeightedSampleQCOM-06977]]
345    If code:OpImageWeightedSampleQCOM, code:OpImageBoxFilterQCOM,
346    code:OpImageBlockMatchSSDQCOM, or code:OpImageBlockMatchSADQCOM uses a
347    slink:VkSampler as a result of this command, then the sampler must: have
348    been created with ename:VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM
349  * [[VUID-{refpage}-OpImageWeightedSampleQCOM-06978]]
350    If any command other than code:OpImageWeightedSampleQCOM,
351    code:OpImageBoxFilterQCOM, code:OpImageBlockMatchSSDQCOM, or
352    code:OpImageBlockMatchSADQCOM uses a slink:VkSampler as a result of this
353    command, then the sampler must: not have been created with
354    ename:VK_SAMPLER_CREATE_IMAGE_PROCESSING_BIT_QCOM
355endif::VK_QCOM_image_processing[]
356  * [[VUID-{refpage}-None-07288]]
357    Any shader invocation executed by this command must:
358    <<shaders-termination,terminate>>
359// Common Valid Usage
360