C Specification
The VkCopyImageInfo2KHR structure is defined as:
// Provided by VK_KHR_copy_commands2
typedef struct VkCopyImageInfo2KHR {
VkStructureType sType;
const void* pNext;
VkImage srcImage;
VkImageLayout srcImageLayout;
VkImage dstImage;
VkImageLayout dstImageLayout;
uint32_t regionCount;
const VkImageCopy2KHR* pRegions;
} VkCopyImageInfo2KHR;
Members
-
sTypeis the type of 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 VkImageCopy2KHR structures specifying the regions to copy.
Description
-
VUID-VkCopyImageInfo2KHR-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-VkCopyImageInfo2KHR-srcImage-01995
The format features ofsrcImagemust containVK_FORMAT_FEATURE_TRANSFER_SRC_BIT -
VUID-VkCopyImageInfo2KHR-srcImage-00126
srcImagemust have been created withVK_IMAGE_USAGE_TRANSFER_SRC_BITusage flag -
VUID-VkCopyImageInfo2KHR-srcImage-01546
IfsrcImageis non-sparse then the image or disjoint plane to be copied must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-VkCopyImageInfo2KHR-srcImageLayout-00128
srcImageLayoutmust specify the layout of the image subresources ofsrcImagespecified inpRegionsat the time this command is executed on aVkDevice -
VUID-VkCopyImageInfo2KHR-srcImageLayout-01917
srcImageLayoutmust beVK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,VK_IMAGE_LAYOUT_GENERAL, orVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR -
VUID-VkCopyImageInfo2KHR-dstImage-01996
The format features ofdstImagemust containVK_FORMAT_FEATURE_TRANSFER_DST_BIT -
VUID-VkCopyImageInfo2KHR-dstImage-00131
dstImagemust have been created withVK_IMAGE_USAGE_TRANSFER_DST_BITusage flag -
VUID-VkCopyImageInfo2KHR-dstImage-01547
IfdstImageis non-sparse then the image or disjoint plane that is the destination of the copy must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-VkCopyImageInfo2KHR-dstImageLayout-00133
dstImageLayoutmust specify the layout of the image subresources ofdstImagespecified inpRegionsat the time this command is executed on aVkDevice -
VUID-VkCopyImageInfo2KHR-dstImageLayout-01395
dstImageLayoutmust beVK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,VK_IMAGE_LAYOUT_GENERAL, orVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR -
VUID-VkCopyImageInfo2KHR-srcImage-01548
If the VkFormat of each ofsrcImageanddstImageis not a multi-planar format, the VkFormat of each ofsrcImageanddstImagemust be compatible, as defined above -
VUID-VkCopyImageInfo2KHR-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-VkCopyImageInfo2KHR-srcImage-00136
The sample count ofsrcImageanddstImagemust match -
VUID-VkCopyImageInfo2KHR-srcSubresource-01696
ThesrcSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified in VkImageCreateInfo whensrcImagewas created -
VUID-VkCopyImageInfo2KHR-dstSubresource-01697
ThedstSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified in VkImageCreateInfo whendstImagewas created -
VUID-VkCopyImageInfo2KHR-srcSubresource-01698
ThesrcSubresource.baseArrayLayer+srcSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified in VkImageCreateInfo whensrcImagewas created -
VUID-VkCopyImageInfo2KHR-dstSubresource-01699
ThedstSubresource.baseArrayLayer+dstSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified in VkImageCreateInfo whendstImagewas created -
VUID-VkCopyImageInfo2KHR-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-VkCopyImageInfo2KHR-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-VkCopyImageInfo2KHR-dstImage-02542
dstImageandsrcImagemust not have been created withflagscontainingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT -
VUID-VkCopyImageInfo2KHR-srcImage-01551
If neithersrcImagenordstImagehas a multi-planar image format then for each element ofpRegions,srcSubresource.aspectMaskanddstSubresource.aspectMaskmust match -
VUID-VkCopyImageInfo2KHR-srcImage-01552
IfsrcImagehas a VkFormat with two planes then for each element ofpRegions,srcSubresource.aspectMaskmust beVK_IMAGE_ASPECT_PLANE_0_BITorVK_IMAGE_ASPECT_PLANE_1_BIT -
VUID-VkCopyImageInfo2KHR-srcImage-01553
IfsrcImagehas a VkFormat with three planes then for each element ofpRegions,srcSubresource.aspectMaskmust beVK_IMAGE_ASPECT_PLANE_0_BIT,VK_IMAGE_ASPECT_PLANE_1_BIT, orVK_IMAGE_ASPECT_PLANE_2_BIT -
VUID-VkCopyImageInfo2KHR-dstImage-01554
IfdstImagehas a VkFormat with two planes then for each element ofpRegions,dstSubresource.aspectMaskmust beVK_IMAGE_ASPECT_PLANE_0_BITorVK_IMAGE_ASPECT_PLANE_1_BIT -
VUID-VkCopyImageInfo2KHR-dstImage-01555
IfdstImagehas a VkFormat with three planes then for each element ofpRegions,dstSubresource.aspectMaskmust beVK_IMAGE_ASPECT_PLANE_0_BIT,VK_IMAGE_ASPECT_PLANE_1_BIT, orVK_IMAGE_ASPECT_PLANE_2_BIT -
VUID-VkCopyImageInfo2KHR-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-VkCopyImageInfo2KHR-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-VkCopyImageInfo2KHR-srcImage-04443
IfsrcImageis of typeVK_IMAGE_TYPE_3D, then for each element ofpRegions,srcSubresource.baseArrayLayermust be0and andsrcSubresource.layerCountmust be1 -
VUID-VkCopyImageInfo2KHR-dstImage-04444
IfdstImageis of typeVK_IMAGE_TYPE_3D, then for each element ofpRegions,dstSubresource.baseArrayLayermust be0and anddstSubresource.layerCountmust be1 -
VUID-VkCopyImageInfo2KHR-aspectMask-00142
For each element ofpRegions,srcSubresource.aspectMaskmust specify aspects present insrcImage -
VUID-VkCopyImageInfo2KHR-aspectMask-00143
For each element ofpRegions,dstSubresource.aspectMaskmust specify aspects present indstImage -
VUID-VkCopyImageInfo2KHR-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-VkCopyImageInfo2KHR-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-VkCopyImageInfo2KHR-srcImage-00146
IfsrcImageis of typeVK_IMAGE_TYPE_1D, then for each element ofpRegions,srcOffset.ymust be0andextent.heightmust be1 -
VUID-VkCopyImageInfo2KHR-srcOffset-00147
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-VkCopyImageInfo2KHR-srcImage-01785
IfsrcImageis of typeVK_IMAGE_TYPE_1D, then for each element ofpRegions,srcOffset.zmust be0andextent.depthmust be1 -
VUID-VkCopyImageInfo2KHR-dstImage-01786
IfdstImageis of typeVK_IMAGE_TYPE_1D, then for each element ofpRegions,dstOffset.zmust be0andextent.depthmust be1 -
VUID-VkCopyImageInfo2KHR-srcImage-01787
IfsrcImageis of typeVK_IMAGE_TYPE_2D, then for each element ofpRegions,srcOffset.zmust be0 -
VUID-VkCopyImageInfo2KHR-dstImage-01788
IfdstImageis of typeVK_IMAGE_TYPE_2D, then for each element ofpRegions,dstOffset.zmust be0 -
VUID-VkCopyImageInfo2KHR-srcImage-01790
IfsrcImageanddstImageare both of typeVK_IMAGE_TYPE_2D, then for each element ofpRegions,extent.depthmust be1 -
VUID-VkCopyImageInfo2KHR-srcImage-01791
IfsrcImageis of typeVK_IMAGE_TYPE_2D, anddstImageis of typeVK_IMAGE_TYPE_3D, then for each element ofpRegions,extent.depthmust equalsrcSubresource.layerCount -
VUID-VkCopyImageInfo2KHR-dstImage-01792
IfdstImageis of typeVK_IMAGE_TYPE_2D, andsrcImageis of typeVK_IMAGE_TYPE_3D, then for each element ofpRegions,extent.depthmust equaldstSubresource.layerCount -
VUID-VkCopyImageInfo2KHR-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-VkCopyImageInfo2KHR-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-VkCopyImageInfo2KHR-dstImage-00152
IfdstImageis of typeVK_IMAGE_TYPE_1D, then for each element ofpRegions,dstOffset.ymust be0andextent.heightmust be1 -
VUID-VkCopyImageInfo2KHR-dstOffset-00153
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-VkCopyImageInfo2KHR-srcImage-01727
IfsrcImageis a blocked image, then for each element ofpRegions, all members ofsrcOffsetmust be a multiple of the corresponding dimensions of the compressed texel block -
VUID-VkCopyImageInfo2KHR-srcImage-01728
IfsrcImageis a blocked image, then for each element ofpRegions,extent.widthmust be a multiple of the compressed texel block width or (extent.width+srcOffset.x) must equal the width of the specifiedsrcSubresourceofsrcImage -
VUID-VkCopyImageInfo2KHR-srcImage-01729
IfsrcImageis a blocked image, then for each element ofpRegions,extent.heightmust be a multiple of the compressed texel block height or (extent.height+srcOffset.y) must equal the height of the specifiedsrcSubresourceofsrcImage -
VUID-VkCopyImageInfo2KHR-srcImage-01730
IfsrcImageis a blocked image, then for each element ofpRegions,extent.depthmust be a multiple of the compressed texel block depth or (extent.depth+srcOffset.z) must equal the depth of the specifiedsrcSubresourceofsrcImage -
VUID-VkCopyImageInfo2KHR-dstImage-01731
IfdstImageis a blocked image, then for each element ofpRegions, all members ofdstOffsetmust be a multiple of the corresponding dimensions of the compressed texel block -
VUID-VkCopyImageInfo2KHR-dstImage-01732
IfdstImageis a blocked image, then for each element ofpRegions,extent.widthmust be a multiple of the compressed texel block width or (extent.width+dstOffset.x) must equal the width of the specifieddstSubresourceofdstImage -
VUID-VkCopyImageInfo2KHR-dstImage-01733
IfdstImageis a blocked image, then for each element ofpRegions,extent.heightmust be a multiple of the compressed texel block height or (extent.height+dstOffset.y) must equal the height of the specifieddstSubresourceofdstImage -
VUID-VkCopyImageInfo2KHR-dstImage-01734
IfdstImageis a blocked image, then for each element ofpRegions,extent.depthmust be a multiple of the compressed texel block depth or (extent.depth+dstOffset.z) must equal the depth of the specifieddstSubresourceofdstImage
-
VUID-VkCopyImageInfo2KHR-sType-sType
sTypemust beVK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2_KHR -
VUID-VkCopyImageInfo2KHR-srcImage-parameter
srcImagemust be a valid VkImage handle -
VUID-VkCopyImageInfo2KHR-srcImageLayout-parameter
srcImageLayoutmust be a valid VkImageLayout value -
VUID-VkCopyImageInfo2KHR-dstImage-parameter
dstImagemust be a valid VkImage handle -
VUID-VkCopyImageInfo2KHR-dstImageLayout-parameter
dstImageLayoutmust be a valid VkImageLayout value -
VUID-VkCopyImageInfo2KHR-pRegions-parameter
pRegionsmust be a valid pointer to an array ofregionCountvalid VkImageCopy2KHR structures -
VUID-VkCopyImageInfo2KHR-regionCount-arraylength
regionCountmust be greater than0 -
VUID-VkCopyImageInfo2KHR-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.