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