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  * If pname:{imageparam} is of type ename:VK_IMAGE_TYPE_1D, then for each
11    element of pname:pRegions, pname:imageOffset.y must: be `0` and
12    pname:imageExtent.height must: be `1`
13  * For each element of pname:pRegions, pname:imageOffset.z and
14    [eq]#(pname:imageExtent.depth {plus} pname:imageOffset.z)# must: both be
15    greater than or equal to `0` and less than or equal to the depth of the
16    specified pname:{imagesubresource} of pname:{imageparam}
17  * If pname:{imageparam} is of type ename:VK_IMAGE_TYPE_1D or
18    ename:VK_IMAGE_TYPE_2D, then for each element of pname:pRegions,
19    pname:imageOffset.z must: be `0` and pname:imageExtent.depth must: be
20    `1`
21  * For each element of pname:pRegions, pname:bufferRowLength must: be a
22    multiple of the <<formats-compatibility-classes,texel block extent
23    width>> of the elink:VkFormat of pname:{imageparam}
24  * For each element of pname:pRegions, pname:bufferImageHeight must: be a
25    multiple of the <<formats-compatibility-classes,texel block extent
26    height>> of the elink:VkFormat of pname:{imageparam}
27  * For each element of pname:pRegions, pname:imageOffset.x must: be a
28    multiple of the <<formats-compatibility-classes,texel block extent
29    width>> of the elink:VkFormat of pname:{imageparam}
30  * For each element of pname:pRegions, pname:imageOffset.y must: be a
31    multiple of the <<formats-compatibility-classes,texel block extent
32    height>> of the elink:VkFormat of pname:{imageparam}
33  * For each element of pname:pRegions, pname:imageOffset.z must: be a
34    multiple of the <<formats-compatibility-classes,texel block extent
35    depth>> of the elink:VkFormat of pname:{imageparam}
36  * For each element of pname:pRegions, if the sum of pname:imageOffset.x
37    and pname:extent.width does not equal the width of the subresource
38    specified by pname:srcSubresource, pname:extent.width must: be a
39    multiple of the <<formats-compatibility-classes,texel block extent
40    width>> of the elink:VkFormat of pname:{imageparam}
41  * For each element of pname:pRegions, if the sum of pname:imageOffset.y
42    and pname:extent.height does not equal the height of the subresource
43    specified by pname:srcSubresource, pname:extent.height must: be a
44    multiple of the <<formats-compatibility-classes,texel block extent
45    height>> of the elink:VkFormat of pname:{imageparam}
46  * For each element of pname:pRegions, if the sum of pname:imageOffset.z
47    and pname:extent.depth does not equal the depth of the subresource
48    specified by pname:srcSubresource, pname:extent.depth must: be a
49    multiple of the <<formats-compatibility-classes,texel block extent
50    depth>> of the elink:VkFormat of pname:{imageparam}
51  * For each element of pname:pRegions, pname:{imagesubresource}.aspectMask
52    must: specify aspects present in pname:{imageparam}
53ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
54  * If pname:{imageparam} has a elink:VkFormat with
55    <<formats-requiring-sampler-ycbcr-conversion,two planes>> then for each
56    element of pname:pRegions, pname:{imagesubresource}.aspectMask must: be
57    ename:VK_IMAGE_ASPECT_PLANE_0_BIT or ename:VK_IMAGE_ASPECT_PLANE_1_BIT
58  * If pname:{imageparam} has a elink:VkFormat with
59    <<formats-requiring-sampler-ycbcr-conversion,three planes>> then for
60    each element of pname:pRegions, pname:{imagesubresource}.aspectMask
61    must: be ename:VK_IMAGE_ASPECT_PLANE_0_BIT,
62    ename:VK_IMAGE_ASPECT_PLANE_1_BIT, or ename:VK_IMAGE_ASPECT_PLANE_2_BIT
63endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[]
64  * If pname:{imageparam} is of type ename:VK_IMAGE_TYPE_3D, for each
65    element of pname:pRegions, pname:{imagesubresource}.baseArrayLayer must:
66    be `0` and pname:{imagesubresource}.layerCount must: be `1`
67  * For each element of pname:pRegions, pname:bufferRowLength divided by the
68    <<formats-compatibility-classes,texel block extent width>> and then
69    multiplied by the texel block size of pname:{imageparam} must: be less
70    than or equal to [eq]#2^31^-1#
71// Common Valid Usage
72