| // Copyright 2023 The Khronos Group Inc. |
| // |
| // SPDX-License-Identifier: CC-BY-4.0 |
| |
| :imageparam: srcImage |
| :imagesubresource: imageSubresource |
| |
| // Common Valid Usage |
| |
| * If pname:{imageparam} is of type ename:VK_IMAGE_TYPE_1D, then for each element |
| of pname:pRegions, pname:imageOffset.y must: be `0` and pname:imageExtent.height must: be `1` |
| * For each element of pname:pRegions, pname:imageOffset.z and |
| [eq]#(pname:imageExtent.depth {plus} pname:imageOffset.z)# must: both be |
| greater than or equal to `0` and less than or equal to the depth of the specified pname:{imagesubresource} of pname:{imageparam} |
| * If pname:{imageparam} is of type ename:VK_IMAGE_TYPE_1D or ename:VK_IMAGE_TYPE_2D, then for each element of pname:pRegions, pname:imageOffset.z must: be `0` and pname:imageExtent.depth must: be `1` |
| * For each element of pname:pRegions, pname:bufferRowLength must: be a |
| multiple of the <<formats-compatibility-classes,texel block extent width>> of the elink:VkFormat of pname:{imageparam} |
| * For each element of pname:pRegions, pname:bufferImageHeight must: be a |
| multiple of the <<formats-compatibility-classes,texel block extent height>> of the elink:VkFormat of pname:{imageparam} |
| * For each element of pname:pRegions, pname:imageOffset.x must: be a |
| multiple of the <<formats-compatibility-classes,texel block extent width>> of the elink:VkFormat of pname:{imageparam} |
| * For each element of pname:pRegions, pname:imageOffset.y must: be a |
| multiple of the <<formats-compatibility-classes,texel block extent height>> of the elink:VkFormat of pname:{imageparam} |
| * For each element of pname:pRegions, pname:imageOffset.z must: be a |
| multiple of the <<formats-compatibility-classes,texel block extent depth>> of the elink:VkFormat of pname:{imageparam} |
| * For each element of pname:pRegions, if the sum of pname:imageOffset.x |
| and pname:extent.width does not equal the width of the subresource specified by pname:srcSubresource, pname:extent.width must: be a multiple of the <<formats-compatibility-classes,texel block extent width>> of the elink:VkFormat of pname:{imageparam} |
| * For each element of pname:pRegions, if the sum of pname:imageOffset.y |
| and pname:extent.height does not equal the height of the subresource specified by pname:srcSubresource, pname:extent.height must: be a multiple of the <<formats-compatibility-classes,texel block extent |
| height>> of the elink:VkFormat of pname:{imageparam} |
| * For each element of pname:pRegions, if the sum of pname:imageOffset.z |
| and pname:extent.depth does not equal the depth of the subresource specified by pname:srcSubresource, pname:extent.depth must: be a |
| multiple of the <<formats-compatibility-classes,texel block extent |
| depth>> of the elink:VkFormat of pname:{imageparam} |
| * For each element of pname:pRegions, pname:{imagesubresource}.aspectMask must: specify aspects present in pname:{imageparam} |
| ifdef::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] |
| * If pname:{imageparam} has a elink:VkFormat with <<formats-requiring-sampler-ycbcr-conversion,two planes>> then for each |
| element of pname:pRegions, pname:{imagesubresource}.aspectMask must: be |
| ename:VK_IMAGE_ASPECT_PLANE_0_BIT or ename:VK_IMAGE_ASPECT_PLANE_1_BIT |
| * If pname:{imageparam} has a elink:VkFormat with |
| <<formats-requiring-sampler-ycbcr-conversion,three planes>> then for |
| each element of pname:pRegions, pname:{imagesubresource}.aspectMask must: be ename:VK_IMAGE_ASPECT_PLANE_0_BIT, ename:VK_IMAGE_ASPECT_PLANE_1_BIT, or ename:VK_IMAGE_ASPECT_PLANE_2_BIT |
| endif::VK_VERSION_1_1,VK_KHR_sampler_ycbcr_conversion[] |
| * If pname:{imageparam} is of type ename:VK_IMAGE_TYPE_3D, for each element of |
| pname:pRegions, pname:{imagesubresource}.baseArrayLayer must: be `0` and pname:{imagesubresource}.layerCount must: be `1` |
| * For each element of pname:pRegions, pname:bufferRowLength divided by the <<formats-compatibility-classes,texel block extent width>> and then multiplied by the texel block size of pname:{imageparam} must: be less than or equal to [eq]#2^31^-1# |
| // Common Valid Usage |