• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2020-2024 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5// Common Valid Usage
6// Common to VkCmdCopyImage* commands
7  * [[VUID-{refpage}-pRegions-00124]]
8    The union of all source regions, and the union of all destination
9    regions, specified by the elements of pname:pRegions, must: not overlap
10    in memory
11ifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
12  * [[VUID-{refpage}-srcImage-01995]]
13    The <<resources-image-format-features,format features>> of
14    pname:srcImage must: contain ename:VK_FORMAT_FEATURE_TRANSFER_SRC_BIT
15endif::VK_VERSION_1_1,VK_KHR_maintenance1[]
16  * [[VUID-{refpage}-srcImageLayout-00128]]
17    pname:srcImageLayout must: specify the layout of the image subresources
18    of pname:srcImage specified in pname:pRegions at the time this command
19    is executed on a sname:VkDevice
20  * [[VUID-{refpage}-srcImageLayout-01917]]
21    pname:srcImageLayout must: be
22ifdef::VK_KHR_shared_presentable_image[]
23    ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,
24endif::VK_KHR_shared_presentable_image[]
25    ename:VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, or
26    ename:VK_IMAGE_LAYOUT_GENERAL
27  * [[VUID-{refpage}-srcImage-09460]]
28    If pname:srcImage and pname:dstImage are the same, and any elements of
29    pname:pRegions contains the pname:srcSubresource and
30    pname:dstSubresource with matching pname:mipLevel and overlapping array
31    layers, then the pname:srcImageLayout and pname:dstImageLayout must: be
32    ename:VK_IMAGE_LAYOUT_GENERAL
33ifdef::VK_KHR_shared_presentable_image[]
34    or ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
35endif::VK_KHR_shared_presentable_image[]
36ifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
37  * [[VUID-{refpage}-dstImage-01996]]
38    The <<resources-image-format-features,format features>> of
39    pname:dstImage must: contain ename:VK_FORMAT_FEATURE_TRANSFER_DST_BIT
40endif::VK_VERSION_1_1,VK_KHR_maintenance1[]
41  * [[VUID-{refpage}-dstImageLayout-00133]]
42    pname:dstImageLayout must: specify the layout of the image subresources
43    of pname:dstImage specified in pname:pRegions at the time this command
44    is executed on a sname:VkDevice
45  * [[VUID-{refpage}-dstImageLayout-01395]]
46    pname:dstImageLayout must: be
47ifdef::VK_KHR_shared_presentable_image[]
48    ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,
49endif::VK_KHR_shared_presentable_image[]
50    ename:VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, or
51    ename:VK_IMAGE_LAYOUT_GENERAL
52  * [[VUID-{refpage}-srcImage-01548]]
53ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
54    If the elink:VkFormat of each of pname:srcImage and pname:dstImage is
55    not a <<formats-requiring-sampler-ycbcr-conversion,_multi-planar
56    format_>>, the
57endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
58ifndef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[The]
59    elink:VkFormat of each of pname:srcImage and pname:dstImage must: be
60    <<formats-size-compatibility,size-compatible>>
61ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
62  * [[VUID-{refpage}-None-01549]]
63    In a copy to or from a plane of a
64    <<formats-requiring-sampler-ycbcr-conversion,multi-planar image>>, the
65    elink:VkFormat of the image and plane must: be compatible according to
66    <<formats-compatible-planes,the description of compatible planes>> for
67    the plane being copied
68endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
69  * [[VUID-{refpage}-srcImage-09247]]
70    If the elink:VkFormat of each of pname:srcImage and pname:dstImage is a
71    <<compressed_image_formats,compressed image format>>, the formats must:
72    have the same texel block extent
73  * [[VUID-{refpage}-srcImage-00136]]
74    The sample count of pname:srcImage and pname:dstImage must: match
75  * [[VUID-{refpage}-srcOffset-01783]]
76    The pname:srcOffset and pname:extent members of each element of
77    pname:pRegions must: respect the image transfer granularity requirements
78    of pname:commandBuffer's command pool's queue family, as described in
79    slink:VkQueueFamilyProperties
80  * [[VUID-{refpage}-dstOffset-01784]]
81    The pname:dstOffset and pname:extent members of each element of
82    pname:pRegions must: respect the image transfer granularity requirements
83    of pname:commandBuffer's command pool's queue family, as described in
84    slink:VkQueueFamilyProperties
85// The remaining common VU used to be in image_copy_common.adoc and have been
86// rewritten to apply to the calling command rather than the structure
87// parameter(s) of that command.
88ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
89  * [[VUID-{refpage}-srcImage-01551]]
90    If neither pname:srcImage nor pname:dstImage has a
91    <<formats-requiring-sampler-ycbcr-conversion, multi-planar image
92    format>> then for each element of pname:pRegions,
93    pname:srcSubresource.aspectMask and pname:dstSubresource.aspectMask
94    must: match
95  * [[VUID-{refpage}-srcImage-08713]]
96    If pname:srcImage has a <<formats-requiring-sampler-ycbcr-conversion,
97    multi-planar image format>>, then for each element of pname:pRegions,
98    pname:srcSubresource.aspectMask must: be a single valid
99    <<formats-planes-image-aspect,multi-planar aspect mask>> bit
100  * [[VUID-{refpage}-dstImage-08714]]
101    If pname:dstImage has a <<formats-requiring-sampler-ycbcr-conversion,
102    multi-planar image format>>, then for each element of pname:pRegions,
103    pname:dstSubresource.aspectMask must: be a single valid
104    <<formats-planes-image-aspect,multi-planar aspect mask>> bit
105  * [[VUID-{refpage}-srcImage-01556]]
106    If pname:srcImage has a
107    <<formats-requiring-sampler-ycbcr-conversion,multi-planar image format>>
108    and the pname:dstImage does not have a multi-planar image format, then
109    for each element of pname:pRegions, pname:dstSubresource.aspectMask
110    must: be ename:VK_IMAGE_ASPECT_COLOR_BIT
111  * [[VUID-{refpage}-dstImage-01557]]
112    If pname:dstImage has a
113    <<formats-requiring-sampler-ycbcr-conversion,multi-planar image format>>
114    and the pname:srcImage does not have a multi-planar image format, then
115    for each element of pname:pRegions, pname:srcSubresource.aspectMask
116    must: be ename:VK_IMAGE_ASPECT_COLOR_BIT
117endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
118ifndef::VKSC_VERSION_1_0[]
119  * [[VUID-{refpage}-apiVersion-07932]]
120    If
121ifdef::VK_KHR_maintenance1[]
122    the apiext:VK_KHR_maintenance1 extension is not enabled,
123endif::VK_KHR_maintenance1[]
124ifdef::VK_VERSION_1_1,VK_KHR_maintenance1[or]
125ifdef::VK_VERSION_1_1[]
126    slink:VkPhysicalDeviceProperties::pname:apiVersion is less than Vulkan
127    1.1,
128endif::VK_VERSION_1_1[]
129ifdef::VK_VERSION_1_1,VK_KHR_maintenance1[and]
130    either pname:srcImage or pname:dstImage is of type
131    ename:VK_IMAGE_TYPE_3D, then for each element of pname:pRegions,
132    pname:srcSubresource.baseArrayLayer and
133    pname:dstSubresource.baseArrayLayer must: both be `0`, and
134    pname:srcSubresource.layerCount and pname:dstSubresource.layerCount
135    must: both be `1`
136endif::VKSC_VERSION_1_0[]
137  * [[VUID-{refpage}-srcImage-04443]]
138    If pname:srcImage is of type ename:VK_IMAGE_TYPE_3D, then for each
139    element of pname:pRegions, pname:srcSubresource.baseArrayLayer must: be
140    `0` and pname:srcSubresource.layerCount must: be `1`
141  * [[VUID-{refpage}-dstImage-04444]]
142    If pname:dstImage is of type ename:VK_IMAGE_TYPE_3D, then for each
143    element of pname:pRegions, pname:dstSubresource.baseArrayLayer must: be
144    `0` and pname:dstSubresource.layerCount must: be `1`
145  * [[VUID-{refpage}-aspectMask-00142]]
146    For each element of pname:pRegions, pname:srcSubresource.aspectMask
147    must: specify aspects present in pname:srcImage
148  * [[VUID-{refpage}-aspectMask-00143]]
149    For each element of pname:pRegions, pname:dstSubresource.aspectMask
150    must: specify aspects present in pname:dstImage
151  * [[VUID-{refpage}-srcOffset-00144]]
152    For each element of pname:pRegions, pname:srcOffset.x and
153    [eq]#(pname:extent.width {plus} pname:srcOffset.x)# must: both be
154    greater than or equal to `0` and less than or equal to the width of the
155    specified pname:srcSubresource of pname:srcImage
156  * [[VUID-{refpage}-srcOffset-00145]]
157    For each element of pname:pRegions, pname:srcOffset.y and
158    [eq]#(pname:extent.height {plus} pname:srcOffset.y)# must: both be
159    greater than or equal to `0` and less than or equal to the height of the
160    specified pname:srcSubresource of pname:srcImage
161  * [[VUID-{refpage}-srcImage-00146]]
162    If pname:srcImage is of type ename:VK_IMAGE_TYPE_1D, then for each
163    element of pname:pRegions, pname:srcOffset.y must: be `0` and
164    pname:extent.height must: be `1`
165  * [[VUID-{refpage}-srcOffset-00147]]
166    If pname:srcImage is of type ename:VK_IMAGE_TYPE_3D, then for each
167    element of pname:pRegions, pname:srcOffset.z and
168    [eq]#(pname:extent.depth {plus} pname:srcOffset.z)# must: both be
169    greater than or equal to `0` and less than or equal to the depth of the
170    specified pname:srcSubresource of pname:srcImage
171  * [[VUID-{refpage}-srcImage-01785]]
172    If pname:srcImage is of type ename:VK_IMAGE_TYPE_1D, then for each
173    element of pname:pRegions, pname:srcOffset.z must: be `0` and
174    pname:extent.depth must: be `1`
175  * [[VUID-{refpage}-dstImage-01786]]
176    If pname:dstImage is of type ename:VK_IMAGE_TYPE_1D, then for each
177    element of pname:pRegions, pname:dstOffset.z must: be `0` and
178    pname:extent.depth must: be `1`
179  * [[VUID-{refpage}-srcImage-01787]]
180    If pname:srcImage is of type ename:VK_IMAGE_TYPE_2D, then for each
181    element of pname:pRegions, pname:srcOffset.z must: be `0`
182  * [[VUID-{refpage}-dstImage-01788]]
183    If pname:dstImage is of type ename:VK_IMAGE_TYPE_2D, then for each
184    element of pname:pRegions, pname:dstOffset.z must: be `0`
185ifndef::VKSC_VERSION_1_0[]
186  * [[VUID-{refpage}-apiVersion-07933]]
187    If
188ifdef::VK_KHR_maintenance1[]
189    the apiext:VK_KHR_maintenance1 extension is not enabled,
190endif::VK_KHR_maintenance1[]
191ifdef::VK_VERSION_1_1,VK_KHR_maintenance1[and]
192ifdef::VK_VERSION_1_1[]
193    slink:VkPhysicalDeviceProperties::pname:apiVersion is less than Vulkan
194    1.1,
195endif::VK_VERSION_1_1[]
196    pname:srcImage and pname:dstImage must: have the same elink:VkImageType
197  * [[VUID-{refpage}-apiVersion-08969]]
198    If
199ifdef::VK_KHR_maintenance1[]
200    the apiext:VK_KHR_maintenance1 extension is not enabled,
201endif::VK_KHR_maintenance1[]
202ifdef::VK_VERSION_1_1,VK_KHR_maintenance1[and]
203ifdef::VK_VERSION_1_1[]
204    slink:VkPhysicalDeviceProperties::pname:apiVersion is less than Vulkan
205    1.1,
206endif::VK_VERSION_1_1[]
207    pname:srcImage or pname:dstImage is of type ename:VK_IMAGE_TYPE_2D, then
208    for each element of pname:pRegions, pname:extent.depth must: be `1`
209endif::VKSC_VERSION_1_0[]
210ifdef::VK_VERSION_1_1,VK_KHR_maintenance1[]
211  * [[VUID-{refpage}-srcImage-07743]]
212    If pname:srcImage and pname:dstImage have a different elink:VkImageType,
213ifdef::VK_KHR_maintenance5[]
214    and <<features-maintenance5, pname:maintenance5>> is not enabled,
215endif::VK_KHR_maintenance5[]
216    one must: be ename:VK_IMAGE_TYPE_3D and the other must: be
217    ename:VK_IMAGE_TYPE_2D
218  * [[VUID-{refpage}-srcImage-08793]]
219    If pname:srcImage and pname:dstImage have the same elink:VkImageType,
220    for each element of pname:pRegions,
221ifdef::VK_KHR_maintenance5[]
222    if neither of the pname:layerCount members of pname:srcSubresource or
223    pname:dstSubresource are ename:VK_REMAINING_ARRAY_LAYERS,
224endif::VK_KHR_maintenance5[]
225    the pname:layerCount members of pname:srcSubresource or
226    pname:dstSubresource must: match
227ifdef::VK_KHR_maintenance5[]
228  * [[VUID-{refpage}-srcImage-08794]]
229    If pname:srcImage and pname:dstImage have the same elink:VkImageType,
230    and one of the pname:layerCount members of pname:srcSubresource or
231    pname:dstSubresource is ename:VK_REMAINING_ARRAY_LAYERS, the other
232    member must: be either ename:VK_REMAINING_ARRAY_LAYERS or equal to the
233    pname:arrayLayers member of the slink:VkImageCreateInfo used to create
234    the image minus pname:baseArrayLayer
235endif::VK_KHR_maintenance5[]
236  * [[VUID-{refpage}-srcImage-01790]]
237    If pname:srcImage and pname:dstImage are both of type
238    ename:VK_IMAGE_TYPE_2D, then for each element of pname:pRegions,
239    pname:extent.depth must: be `1`
240  * [[VUID-{refpage}-srcImage-01791]]
241    If pname:srcImage is of type ename:VK_IMAGE_TYPE_2D, and pname:dstImage
242    is of type ename:VK_IMAGE_TYPE_3D, then for each element of
243    pname:pRegions, pname:extent.depth must: equal
244    pname:srcSubresource.layerCount
245  * [[VUID-{refpage}-dstImage-01792]]
246    If pname:dstImage is of type ename:VK_IMAGE_TYPE_2D, and pname:srcImage
247    is of type ename:VK_IMAGE_TYPE_3D, then for each element of
248    pname:pRegions, pname:extent.depth must: equal
249    pname:dstSubresource.layerCount
250endif::VK_VERSION_1_1,VK_KHR_maintenance1[]
251  * [[VUID-{refpage}-dstOffset-00150]]
252    For each element of pname:pRegions, pname:dstOffset.x and
253    [eq]#(pname:extent.width {plus} pname:dstOffset.x)# must: both be
254    greater than or equal to `0` and less than or equal to the width of the
255    specified pname:dstSubresource of pname:dstImage
256  * [[VUID-{refpage}-dstOffset-00151]]
257    For each element of pname:pRegions, pname:dstOffset.y and
258    [eq]#(pname:extent.height {plus} pname:dstOffset.y)# must: both be
259    greater than or equal to `0` and less than or equal to the height of the
260    specified pname:dstSubresource of pname:dstImage
261  * [[VUID-{refpage}-dstImage-00152]]
262    If pname:dstImage is of type ename:VK_IMAGE_TYPE_1D, then for each
263    element of pname:pRegions, pname:dstOffset.y must: be `0` and
264    pname:extent.height must: be `1`
265  * [[VUID-{refpage}-dstOffset-00153]]
266    If pname:dstImage is of type ename:VK_IMAGE_TYPE_3D, then for each
267    element of pname:pRegions, pname:dstOffset.z and
268    [eq]#(pname:extent.depth {plus} pname:dstOffset.z)# must: both be
269    greater than or equal to `0` and less than or equal to the depth of the
270    specified pname:dstSubresource of pname:dstImage
271  * [[VUID-{refpage}-pRegions-07278]]
272    For each element of pname:pRegions, pname:srcOffset.x must: be a
273    multiple of the <<formats-compatibility-classes,texel block extent
274    width>> of the elink:VkFormat of pname:srcImage
275  * [[VUID-{refpage}-pRegions-07279]]
276    For each element of pname:pRegions, pname:srcOffset.y must: be a
277    multiple of the <<formats-compatibility-classes,texel block extent
278    height>> of the elink:VkFormat of pname:srcImage
279  * [[VUID-{refpage}-pRegions-07280]]
280    For each element of pname:pRegions, pname:srcOffset.z must: be a
281    multiple of the <<formats-compatibility-classes,texel block extent
282    depth>> of the elink:VkFormat of pname:srcImage
283  * [[VUID-{refpage}-pRegions-07281]]
284    For each element of pname:pRegions, pname:dstOffset.x must: be a
285    multiple of the <<formats-compatibility-classes,texel block extent
286    width>> of the elink:VkFormat of pname:dstImage
287  * [[VUID-{refpage}-pRegions-07282]]
288    For each element of pname:pRegions, pname:dstOffset.y must: be a
289    multiple of the <<formats-compatibility-classes,texel block extent
290    height>> of the elink:VkFormat of pname:dstImage
291  * [[VUID-{refpage}-pRegions-07283]]
292    For each element of pname:pRegions, pname:dstOffset.z must: be a
293    multiple of the <<formats-compatibility-classes,texel block extent
294    depth>> of the elink:VkFormat of pname:dstImage
295  * [[VUID-{refpage}-srcImage-01728]]
296    For each element of pname:pRegions, if the sum of pname:srcOffset.x and
297    pname:extent.width does not equal the width of the subresource specified
298    by pname:srcSubresource, pname:extent.width must: be a multiple of the
299    <<formats-compatibility-classes,texel block extent width>> of the
300    elink:VkFormat of pname:srcImage
301  * [[VUID-{refpage}-srcImage-01729]]
302    For each element of pname:pRegions, if the sum of pname:srcOffset.y and
303    pname:extent.height does not equal the height of the subresource
304    specified by pname:srcSubresource, pname:extent.height must: be a
305    multiple of the <<formats-compatibility-classes,texel block extent
306    height>> of the elink:VkFormat of pname:srcImage
307  * [[VUID-{refpage}-srcImage-01730]]
308    For each element of pname:pRegions, if the sum of pname:srcOffset.z and
309    pname:extent.depth does not equal the depth of the subresource specified
310    by pname:srcSubresource, pname:extent.depth must: be a multiple of the
311    <<formats-compatibility-classes,texel block extent depth>> of the
312    elink:VkFormat of pname:srcImage
313  * [[VUID-{refpage}-dstImage-01732]]
314    For each element of pname:pRegions, if the sum of pname:dstOffset.x and
315    pname:extent.width does not equal the width of the subresource specified
316    by pname:dstSubresource, pname:extent.width must: be a multiple of the
317    <<formats-compatibility-classes,texel block extent width>> of the
318    elink:VkFormat of pname:dstImage
319  * [[VUID-{refpage}-dstImage-01733]]
320    For each element of pname:pRegions, if the sum of pname:dstOffset.y and
321    pname:extent.height does not equal the height of the subresource
322    specified by pname:dstSubresource, pname:extent.height must: be a
323    multiple of the <<formats-compatibility-classes,texel block extent
324    height>> of the elink:VkFormat of pname:dstImage
325  * [[VUID-{refpage}-dstImage-01734]]
326    For each element of pname:pRegions, if the sum of pname:dstOffset.z and
327    pname:extent.depth does not equal the depth of the subresource specified
328    by pname:dstSubresource, pname:extent.depth must: be a multiple of the
329    <<formats-compatibility-classes,texel block extent depth>> of the
330    elink:VkFormat of pname:dstImage
331  * [[VUID-{refpage}-aspect-06662]]
332ifdef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
333    If the pname:aspect member of any element of pname:pRegions includes any
334    flag other than ename:VK_IMAGE_ASPECT_STENCIL_BIT or pname:srcImage was
335    not created with <<VkImageStencilUsageCreateInfo,separate stencil
336    usage>>,
337endif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
338    ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT must: have been included in the
339    slink:VkImageCreateInfo::pname:usage used to create pname:srcImage
340  * [[VUID-{refpage}-aspect-06663]]
341ifdef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
342    If the pname:aspect member of any element of pname:pRegions includes any
343    flag other than ename:VK_IMAGE_ASPECT_STENCIL_BIT or pname:dstImage was
344    not created with <<VkImageStencilUsageCreateInfo,separate stencil
345    usage>>,
346endif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
347    ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT must: have been included in the
348    slink:VkImageCreateInfo::pname:usage used to create pname:dstImage
349ifdef::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
350  * [[VUID-{refpage}-aspect-06664]]
351    If the pname:aspect member of any element of pname:pRegions includes
352    ename:VK_IMAGE_ASPECT_STENCIL_BIT, and pname:srcImage was created with
353    <<VkImageStencilUsageCreateInfo,separate stencil usage>>,
354    ename:VK_IMAGE_USAGE_TRANSFER_SRC_BIT must: have been included in the
355    slink:VkImageStencilUsageCreateInfo::pname:stencilUsage used to create
356    pname:srcImage
357  * [[VUID-{refpage}-aspect-06665]]
358    If the pname:aspect member of any element of pname:pRegions includes
359    ename:VK_IMAGE_ASPECT_STENCIL_BIT, and pname:dstImage was created with
360    <<VkImageStencilUsageCreateInfo,separate stencil usage>>,
361    ename:VK_IMAGE_USAGE_TRANSFER_DST_BIT must: have been included in the
362    slink:VkImageStencilUsageCreateInfo::pname:stencilUsage used to create
363    pname:dstImage
364endif::VK_VERSION_1_2,VK_EXT_separate_stencil_usage[]
365// Common Valid Usage
366