1// Copyright 2023 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5:imageparam: srcImage
6:imagesubresource: imageSubresource
7
8// Common Valid Usage
9
10  * [[VUID-{refpage}-{imageparam}-10000]]
11    If pname:{imageparam} is of type ename:VK_IMAGE_TYPE_1D, then for each
12    element of pname:pRegions, pname:imageOffset.y must: be `0` and
13    pname:imageExtent.height must: be `1`
14  * [[VUID-{refpage}-{imagesubresource}-10001]]
15    For each element of pname:pRegions, pname:imageOffset.z and
16    [eq]#(pname:imageExtent.depth {plus} pname:imageOffset.z)# must: both be
17    greater than or equal to `0` and less than or equal to the depth of the
18    specified pname:{imagesubresource} of pname:{imageparam}
19  * [[VUID-{refpage}-{imageparam}-10002]]
20    If pname:{imageparam} is of type ename:VK_IMAGE_TYPE_1D or
21    ename:VK_IMAGE_TYPE_2D, then for each element of pname:pRegions,
22    pname:imageOffset.z must: be `0` and pname:imageExtent.depth must: be
23    `1`
24  * [[VUID-{refpage}-{imageparam}-10003]]
25    For each element of pname:pRegions, pname:bufferRowLength must: be a
26    multiple of the <<formats-compatibility-classes,texel block extent
27    width>> of the elink:VkFormat of pname:{imageparam}
28  * [[VUID-{refpage}-{imageparam}-10004]]
29    For each element of pname:pRegions, pname:bufferImageHeight must: be a
30    multiple of the <<formats-compatibility-classes,texel block extent
31    height>> of the elink:VkFormat of pname:{imageparam}
32  * [[VUID-{refpage}-{imageparam}-10005]]
33    For each element of pname:pRegions, pname:imageOffset.x must: be a
34    multiple of the <<formats-compatibility-classes,texel block extent
35    width>> of the elink:VkFormat of pname:{imageparam}
36  * [[VUID-{refpage}-{imageparam}-10006]]
37    For each element of pname:pRegions, pname:imageOffset.y must: be a
38    multiple of the <<formats-compatibility-classes,texel block extent
39    height>> of the elink:VkFormat of pname:{imageparam}
40  * [[VUID-{refpage}-{imageparam}-10007]]
41    For each element of pname:pRegions, pname:imageOffset.z must: be a
42    multiple of the <<formats-compatibility-classes,texel block extent
43    depth>> of the elink:VkFormat of pname:{imageparam}
44  * [[VUID-{refpage}-{imageparam}-10008]]
45    For each element of pname:pRegions, if the sum of pname:imageOffset.x
46    and pname:extent.width does not equal the width of the subresource
47    specified by pname:srcSubresource, pname:extent.width must: be a
48    multiple of the <<formats-compatibility-classes,texel block extent
49    width>> of the elink:VkFormat of pname:{imageparam}
50  * [[VUID-{refpage}-{imageparam}-10009]]
51    For each element of pname:pRegions, if the sum of pname:imageOffset.y
52    and pname:extent.height does not equal the height of the subresource
53    specified by pname:srcSubresource, pname:extent.height must: be a
54    multiple of the <<formats-compatibility-classes,texel block extent
55    height>> of the elink:VkFormat of pname:{imageparam}
56  * [[VUID-{refpage}-{imageparam}-10010]]
57    For each element of pname:pRegions, if the sum of pname:imageOffset.z
58    and pname:extent.depth does not equal the depth of the subresource
59    specified by pname:srcSubresource, pname:extent.depth must: be a
60    multiple of the <<formats-compatibility-classes,texel block extent
61    depth>> of the elink:VkFormat of pname:{imageparam}
62  * [[VUID-{refpage}-{imagesubresource}-10011]]
63    For each element of pname:pRegions, pname:{imagesubresource}.aspectMask
64    must: specify aspects present in pname:{imageparam}
65ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
66  * [[VUID-{refpage}-{imageparam}-10012]]
67    If pname:{imageparam} has a elink:VkFormat with
68    <<formats-requiring-sampler-ycbcr-conversion,two planes>> then for each
69    element of pname:pRegions, pname:{imagesubresource}.aspectMask must: be
70    ename:VK_IMAGE_ASPECT_PLANE_0_BIT or ename:VK_IMAGE_ASPECT_PLANE_1_BIT
71  * [[VUID-{refpage}-{imageparam}-10013]]
72    If pname:{imageparam} has a elink:VkFormat with
73    <<formats-requiring-sampler-ycbcr-conversion,three planes>> then for
74    each element of pname:pRegions, pname:{imagesubresource}.aspectMask
75    must: be ename:VK_IMAGE_ASPECT_PLANE_0_BIT,
76    ename:VK_IMAGE_ASPECT_PLANE_1_BIT, or ename:VK_IMAGE_ASPECT_PLANE_2_BIT
77endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
78  * [[VUID-{refpage}-{imageparam}-10014]]
79    If pname:{imageparam} is of type ename:VK_IMAGE_TYPE_3D, for each
80    element of pname:pRegions, pname:{imagesubresource}.baseArrayLayer must:
81    be `0` and pname:{imagesubresource}.layerCount must: be `1`
82  * [[VUID-{refpage}-{imageparam}-10015]]
83    For each element of pname:pRegions, pname:bufferRowLength divided by the
84    <<formats-compatibility-classes,texel block extent width>> and then
85    multiplied by the texel block size of pname:{imageparam} must: be less
86    than or equal to [eq]#2^31^-1#
87// Common Valid Usage
88