C Specification
The VkCopyImageInfo2 structure is defined as:
// Provided by VK_VERSION_1_3
typedef struct VkCopyImageInfo2 {
VkStructureType sType;
const void* pNext;
VkImage srcImage;
VkImageLayout srcImageLayout;
VkImage dstImage;
VkImageLayout dstImageLayout;
uint32_t regionCount;
const VkImageCopy2* pRegions;
} VkCopyImageInfo2;
or the equivalent
// Provided by VK_KHR_copy_commands2
typedef VkCopyImageInfo2 VkCopyImageInfo2KHR;
Members
-
sTypeis a VkStructureType value identifying this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
srcImageis the source image. -
srcImageLayoutis the current layout of the source image subresource. -
dstImageis the destination image. -
dstImageLayoutis the current layout of the destination image subresource. -
regionCountis the number of regions to copy. -
pRegionsis a pointer to an array of VkImageCopy2 structures specifying the regions to copy.
Description
-
VUID-VkCopyImageInfo2-pRegions-00124
The union of all source regions, and the union of all destination regions, specified by the elements ofpRegions, must not overlap in memory -
VUID-VkCopyImageInfo2-srcImage-01995
The format features ofsrcImagemust containVK_FORMAT_FEATURE_TRANSFER_SRC_BIT -
VUID-VkCopyImageInfo2-srcImageLayout-00128
srcImageLayoutmust specify the layout of the image subresources ofsrcImagespecified inpRegionsat the time this command is executed on aVkDevice -
VUID-VkCopyImageInfo2-srcImageLayout-01917
srcImageLayoutmust beVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, orVK_IMAGE_LAYOUT_GENERAL -
VUID-VkCopyImageInfo2-srcImage-09460
IfsrcImageanddstImageare the same, and any elements ofpRegionscontains thesrcSubresourceanddstSubresourcewith matchingmipLeveland overlapping array layers, then thesrcImageLayoutanddstImageLayoutmust beVK_IMAGE_LAYOUT_GENERALorVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR -
VUID-VkCopyImageInfo2-dstImage-01996
The format features ofdstImagemust containVK_FORMAT_FEATURE_TRANSFER_DST_BIT -
VUID-VkCopyImageInfo2-dstImageLayout-00133
dstImageLayoutmust specify the layout of the image subresources ofdstImagespecified inpRegionsat the time this command is executed on aVkDevice -
VUID-VkCopyImageInfo2-dstImageLayout-01395
dstImageLayoutmust beVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, orVK_IMAGE_LAYOUT_GENERAL -
VUID-VkCopyImageInfo2-srcImage-01548
If the VkFormat of each ofsrcImageanddstImageis not a multi-planar format, the VkFormat of each ofsrcImageanddstImagemust be size-compatible -
VUID-VkCopyImageInfo2-None-01549
In a copy to or from a plane of a multi-planar image, the VkFormat of the image and plane must be compatible according to the description of compatible planes for the plane being copied -
VUID-VkCopyImageInfo2-srcImage-09247
If the VkFormat of each ofsrcImageanddstImageis a compressed image format, the formats must have the same texel block extent -
VUID-VkCopyImageInfo2-srcImage-00136
The sample count ofsrcImageanddstImagemust match -
VUID-VkCopyImageInfo2-srcOffset-01783
ThesrcOffsetandextentmembers of each element ofpRegionsmust respect the image transfer granularity requirements ofcommandBuffer’s command pool’s queue family, as described in VkQueueFamilyProperties -
VUID-VkCopyImageInfo2-dstOffset-01784
ThedstOffsetandextentmembers of each element ofpRegionsmust respect the image transfer granularity requirements ofcommandBuffer’s command pool’s queue family, as described in VkQueueFamilyProperties -
VUID-VkCopyImageInfo2-srcImage-01551
If neithersrcImagenordstImagehas a multi-planar image format then for each element ofpRegions,srcSubresource.aspectMaskanddstSubresource.aspectMaskmust match -
VUID-VkCopyImageInfo2-srcImage-08713
IfsrcImagehas a multi-planar image format, then for each element ofpRegions,srcSubresource.aspectMaskmust be a single valid multi-planar aspect mask bit -
VUID-VkCopyImageInfo2-dstImage-08714
IfdstImagehas a multi-planar image format, then for each element ofpRegions,dstSubresource.aspectMaskmust be a single valid multi-planar aspect mask bit -
VUID-VkCopyImageInfo2-srcImage-01556
IfsrcImagehas a multi-planar image format and thedstImagedoes not have a multi-planar image format, then for each element ofpRegions,dstSubresource.aspectMaskmust beVK_IMAGE_ASPECT_COLOR_BIT -
VUID-VkCopyImageInfo2-dstImage-01557
IfdstImagehas a multi-planar image format and thesrcImagedoes not have a multi-planar image format, then for each element ofpRegions,srcSubresource.aspectMaskmust beVK_IMAGE_ASPECT_COLOR_BIT -
VUID-VkCopyImageInfo2-apiVersion-07932
If the VK_KHR_maintenance1 extension is not enabled, or VkPhysicalDeviceProperties::apiVersionis less than Vulkan 1.1, and eithersrcImageordstImageis of typeVK_IMAGE_TYPE_3D, then for each element ofpRegions,srcSubresource.baseArrayLayeranddstSubresource.baseArrayLayermust both be0, andsrcSubresource.layerCountanddstSubresource.layerCountmust both be1 -
VUID-VkCopyImageInfo2-srcImage-04443
IfsrcImageis of typeVK_IMAGE_TYPE_3D, then for each element ofpRegions,srcSubresource.baseArrayLayermust be0andsrcSubresource.layerCountmust be1 -
VUID-VkCopyImageInfo2-dstImage-04444
IfdstImageis of typeVK_IMAGE_TYPE_3D, then for each element ofpRegions,dstSubresource.baseArrayLayermust be0anddstSubresource.layerCountmust be1 -
VUID-VkCopyImageInfo2-aspectMask-00142
For each element ofpRegions,srcSubresource.aspectMaskmust specify aspects present insrcImage -
VUID-VkCopyImageInfo2-aspectMask-00143
For each element ofpRegions,dstSubresource.aspectMaskmust specify aspects present indstImage -
VUID-VkCopyImageInfo2-srcOffset-00144
For each element ofpRegions,srcOffset.xand (extent.width+srcOffset.x) must both be greater than or equal to0and less than or equal to the width of the specifiedsrcSubresourceofsrcImage -
VUID-VkCopyImageInfo2-srcOffset-00145
For each element ofpRegions,srcOffset.yand (extent.height+srcOffset.y) must both be greater than or equal to0and less than or equal to the height of the specifiedsrcSubresourceofsrcImage -
VUID-VkCopyImageInfo2-srcImage-00146
IfsrcImageis of typeVK_IMAGE_TYPE_1D, then for each element ofpRegions,srcOffset.ymust be0andextent.heightmust be1 -
VUID-VkCopyImageInfo2-srcOffset-00147
IfsrcImageis of typeVK_IMAGE_TYPE_3D, then for each element ofpRegions,srcOffset.zand (extent.depth+srcOffset.z) must both be greater than or equal to0and less than or equal to the depth of the specifiedsrcSubresourceofsrcImage -
VUID-VkCopyImageInfo2-srcImage-01785
IfsrcImageis of typeVK_IMAGE_TYPE_1D, then for each element ofpRegions,srcOffset.zmust be0andextent.depthmust be1 -
VUID-VkCopyImageInfo2-dstImage-01786
IfdstImageis of typeVK_IMAGE_TYPE_1D, then for each element ofpRegions,dstOffset.zmust be0andextent.depthmust be1 -
VUID-VkCopyImageInfo2-srcImage-01787
IfsrcImageis of typeVK_IMAGE_TYPE_2D, then for each element ofpRegions,srcOffset.zmust be0 -
VUID-VkCopyImageInfo2-dstImage-01788
IfdstImageis of typeVK_IMAGE_TYPE_2D, then for each element ofpRegions,dstOffset.zmust be0 -
VUID-VkCopyImageInfo2-apiVersion-07933
If the VK_KHR_maintenance1 extension is not enabled, and VkPhysicalDeviceProperties::apiVersionis less than Vulkan 1.1,srcImageanddstImagemust have the same VkImageType -
VUID-VkCopyImageInfo2-apiVersion-08969
If the VK_KHR_maintenance1 extension is not enabled, and VkPhysicalDeviceProperties::apiVersionis less than Vulkan 1.1,srcImageordstImageis of typeVK_IMAGE_TYPE_2D, then for each element ofpRegions,extent.depthmust be1 -
VUID-VkCopyImageInfo2-srcImage-07743
IfsrcImageanddstImagehave a different VkImageType, andmaintenance5is not enabled, one must beVK_IMAGE_TYPE_3Dand the other must beVK_IMAGE_TYPE_2D -
VUID-VkCopyImageInfo2-srcImage-08793
IfsrcImageanddstImagehave the same VkImageType, for each element ofpRegions, if neither of thelayerCountmembers ofsrcSubresourceordstSubresourceareVK_REMAINING_ARRAY_LAYERS, thelayerCountmembers ofsrcSubresourceordstSubresourcemust match -
VUID-VkCopyImageInfo2-srcImage-08794
IfsrcImageanddstImagehave the same VkImageType, and one of thelayerCountmembers ofsrcSubresourceordstSubresourceisVK_REMAINING_ARRAY_LAYERS, the other member must be eitherVK_REMAINING_ARRAY_LAYERSor equal to thearrayLayersmember of the VkImageCreateInfo used to create the image minusbaseArrayLayer -
VUID-VkCopyImageInfo2-srcImage-01790
IfsrcImageanddstImageare both of typeVK_IMAGE_TYPE_2D, then for each element ofpRegions,extent.depthmust be1 -
VUID-VkCopyImageInfo2-srcImage-01791
IfsrcImageis of typeVK_IMAGE_TYPE_2D, anddstImageis of typeVK_IMAGE_TYPE_3D, then for each element ofpRegions,extent.depthmust equalsrcSubresource.layerCount -
VUID-VkCopyImageInfo2-dstImage-01792
IfdstImageis of typeVK_IMAGE_TYPE_2D, andsrcImageis of typeVK_IMAGE_TYPE_3D, then for each element ofpRegions,extent.depthmust equaldstSubresource.layerCount -
VUID-VkCopyImageInfo2-dstOffset-00150
For each element ofpRegions,dstOffset.xand (extent.width+dstOffset.x) must both be greater than or equal to0and less than or equal to the width of the specifieddstSubresourceofdstImage -
VUID-VkCopyImageInfo2-dstOffset-00151
For each element ofpRegions,dstOffset.yand (extent.height+dstOffset.y) must both be greater than or equal to0and less than or equal to the height of the specifieddstSubresourceofdstImage -
VUID-VkCopyImageInfo2-dstImage-00152
IfdstImageis of typeVK_IMAGE_TYPE_1D, then for each element ofpRegions,dstOffset.ymust be0andextent.heightmust be1 -
VUID-VkCopyImageInfo2-dstOffset-00153
IfdstImageis of typeVK_IMAGE_TYPE_3D, then for each element ofpRegions,dstOffset.zand (extent.depth+dstOffset.z) must both be greater than or equal to0and less than or equal to the depth of the specifieddstSubresourceofdstImage -
VUID-VkCopyImageInfo2-pRegions-07278
For each element ofpRegions,srcOffset.xmust be a multiple of the texel block extent width of the VkFormat ofsrcImage -
VUID-VkCopyImageInfo2-pRegions-07279
For each element ofpRegions,srcOffset.ymust be a multiple of the texel block extent height of the VkFormat ofsrcImage -
VUID-VkCopyImageInfo2-pRegions-07280
For each element ofpRegions,srcOffset.zmust be a multiple of the texel block extent depth of the VkFormat ofsrcImage -
VUID-VkCopyImageInfo2-pRegions-07281
For each element ofpRegions,dstOffset.xmust be a multiple of the texel block extent width of the VkFormat ofdstImage -
VUID-VkCopyImageInfo2-pRegions-07282
For each element ofpRegions,dstOffset.ymust be a multiple of the texel block extent height of the VkFormat ofdstImage -
VUID-VkCopyImageInfo2-pRegions-07283
For each element ofpRegions,dstOffset.zmust be a multiple of the texel block extent depth of the VkFormat ofdstImage -
VUID-VkCopyImageInfo2-srcImage-01728
For each element ofpRegions, if the sum ofsrcOffset.xandextent.widthdoes not equal the width of the subresource specified bysrcSubresource,extent.widthmust be a multiple of the texel block extent width of the VkFormat ofsrcImage -
VUID-VkCopyImageInfo2-srcImage-01729
For each element ofpRegions, if the sum ofsrcOffset.yandextent.heightdoes not equal the height of the subresource specified bysrcSubresource,extent.heightmust be a multiple of the texel block extent height of the VkFormat ofsrcImage -
VUID-VkCopyImageInfo2-srcImage-01730
For each element ofpRegions, if the sum ofsrcOffset.zandextent.depthdoes not equal the depth of the subresource specified bysrcSubresource,extent.depthmust be a multiple of the texel block extent depth of the VkFormat ofsrcImage -
VUID-VkCopyImageInfo2-dstImage-01732
For each element ofpRegions, if the sum ofdstOffset.xandextent.widthdoes not equal the width of the subresource specified bydstSubresource,extent.widthmust be a multiple of the texel block extent width of the VkFormat ofdstImage -
VUID-VkCopyImageInfo2-dstImage-01733
For each element ofpRegions, if the sum ofdstOffset.yandextent.heightdoes not equal the height of the subresource specified bydstSubresource,extent.heightmust be a multiple of the texel block extent height of the VkFormat ofdstImage -
VUID-VkCopyImageInfo2-dstImage-01734
For each element ofpRegions, if the sum ofdstOffset.zandextent.depthdoes not equal the depth of the subresource specified bydstSubresource,extent.depthmust be a multiple of the texel block extent depth of the VkFormat ofdstImage -
VUID-VkCopyImageInfo2-aspect-06662
If theaspectmember of any element ofpRegionsincludes any flag other thanVK_IMAGE_ASPECT_STENCIL_BITorsrcImagewas not created with separate stencil usage,VK_IMAGE_USAGE_TRANSFER_SRC_BITmust have been included in the VkImageCreateInfo::usageused to createsrcImage -
VUID-VkCopyImageInfo2-aspect-06663
If theaspectmember of any element ofpRegionsincludes any flag other thanVK_IMAGE_ASPECT_STENCIL_BITordstImagewas not created with separate stencil usage,VK_IMAGE_USAGE_TRANSFER_DST_BITmust have been included in the VkImageCreateInfo::usageused to createdstImage -
VUID-VkCopyImageInfo2-aspect-06664
If theaspectmember of any element ofpRegionsincludesVK_IMAGE_ASPECT_STENCIL_BIT, andsrcImagewas created with separate stencil usage,VK_IMAGE_USAGE_TRANSFER_SRC_BITmust have been included in the VkImageStencilUsageCreateInfo::stencilUsageused to createsrcImage -
VUID-VkCopyImageInfo2-aspect-06665
If theaspectmember of any element ofpRegionsincludesVK_IMAGE_ASPECT_STENCIL_BIT, anddstImagewas created with separate stencil usage,VK_IMAGE_USAGE_TRANSFER_DST_BITmust have been included in the VkImageStencilUsageCreateInfo::stencilUsageused to createdstImage
-
VUID-VkCopyImageInfo2-srcImage-07966
IfsrcImageis non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-VkCopyImageInfo2-srcSubresource-07967
ThesrcSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified in VkImageCreateInfo whensrcImagewas created -
VUID-VkCopyImageInfo2-srcSubresource-07968
IfsrcSubresource.layerCountis notVK_REMAINING_ARRAY_LAYERS,srcSubresource.baseArrayLayer+srcSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified in VkImageCreateInfo whensrcImagewas created -
VUID-VkCopyImageInfo2-srcImage-07969
srcImagemust not have been created withflagscontainingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
-
VUID-VkCopyImageInfo2-dstImage-07966
IfdstImageis non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-VkCopyImageInfo2-dstSubresource-07967
ThedstSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified in VkImageCreateInfo whendstImagewas created -
VUID-VkCopyImageInfo2-dstSubresource-07968
IfdstSubresource.layerCountis notVK_REMAINING_ARRAY_LAYERS,dstSubresource.baseArrayLayer+dstSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified in VkImageCreateInfo whendstImagewas created -
VUID-VkCopyImageInfo2-dstImage-07969
dstImagemust not have been created withflagscontainingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
-
VUID-VkCopyImageInfo2-sType-sType
sTypemust beVK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2 -
VUID-VkCopyImageInfo2-srcImage-parameter
srcImagemust be a valid VkImage handle -
VUID-VkCopyImageInfo2-srcImageLayout-parameter
srcImageLayoutmust be a valid VkImageLayout value -
VUID-VkCopyImageInfo2-dstImage-parameter
dstImagemust be a valid VkImage handle -
VUID-VkCopyImageInfo2-dstImageLayout-parameter
dstImageLayoutmust be a valid VkImageLayout value -
VUID-VkCopyImageInfo2-pRegions-parameter
pRegionsmust be a valid pointer to an array ofregionCountvalid VkImageCopy2 structures -
VUID-VkCopyImageInfo2-regionCount-arraylength
regionCountmust be greater than0 -
VUID-VkCopyImageInfo2-commonparent
Both ofdstImage, andsrcImagemust have been created, allocated, or retrieved from the same VkDevice
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.