C Specification
The VkCopyImageToImageInfo structure is defined as:
// Provided by VK_VERSION_1_4
typedef struct VkCopyImageToImageInfo {
    VkStructureType         sType;
    const void*             pNext;
    VkHostImageCopyFlags    flags;
    VkImage                 srcImage;
    VkImageLayout           srcImageLayout;
    VkImage                 dstImage;
    VkImageLayout           dstImageLayout;
    uint32_t                regionCount;
    const VkImageCopy2*     pRegions;
} VkCopyImageToImageInfo;or the equivalent
// Provided by VK_EXT_host_image_copy
typedef VkCopyImageToImageInfo VkCopyImageToImageInfoEXT;Members
- 
sTypeis a VkStructureType value identifying this structure.
- 
pNextisNULLor a pointer to a structure extending this structure.
- 
flagsis a bitmask of VkHostImageCopyFlagBits values describing additional copy parameters.
- 
srcImageis the source image.
- 
srcImageLayoutis the layout of the source image subresources for the copy.
- 
dstImageis the destination image.
- 
dstImageLayoutis the layout of the destination image subresources for the copy.
- 
regionCountis the number of regions to copy.
- 
pRegionsis a pointer to an array of VkImageCopy2 structures specifying the regions to copy.
Description
vkCopyImageToImage does not check whether the device memory associated
with srcImage or dstImage is currently in use before performing
the copy.
The application must guarantee that any previously submitted command that
writes to the copy regions has completed before the host performs the copy.
- 
VUID-VkCopyImageToImageInfo-srcImage-09109 
 IfsrcImageis sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory
- 
VUID-VkCopyImageToImageInfo-srcImage-09111 
 If the stencil aspect ofsrcImageis accessed, andsrcImagewas not created with separate stencil usage,srcImagemust have been created withVK_IMAGE_USAGE_HOST_TRANSFER_BITset in VkImageCreateInfo::usage
- 
VUID-VkCopyImageToImageInfo-srcImage-09112 
 If the stencil aspect ofsrcImageis accessed, andsrcImagewas created with separate stencil usage,srcImagemust have been created withVK_IMAGE_USAGE_HOST_TRANSFER_BITset in VkImageStencilUsageCreateInfo::stencilUsage
- 
VUID-VkCopyImageToImageInfo-srcImage-09113 
 If non-stencil aspects ofsrcImageare accessed,srcImagemust have been created withVK_IMAGE_USAGE_HOST_TRANSFER_BITset in VkImageCreateInfo::usage
- 
VUID-VkCopyImageToImageInfo-srcOffset-09114 
 IfflagscontainsVK_HOST_IMAGE_COPY_MEMCPY_BIT, thex,y, andzmembers of thesrcOffsetmember of each element ofpRegionsmust be0
- 
VUID-VkCopyImageToImageInfo-srcImage-09115 
 IfflagscontainsVK_HOST_IMAGE_COPY_MEMCPY_BIT, theextentmember of each element ofpRegionsmust equal the extents ofsrcImageidentified bysrcSubresource
- 
VUID-VkCopyImageToImageInfo-srcImage-07966 
 IfsrcImageis non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a singleVkDeviceMemoryobject
- 
VUID-VkCopyImageToImageInfo-srcSubresource-07967 
 ThesrcSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified in VkImageCreateInfo whensrcImagewas created
- 
VUID-VkCopyImageToImageInfo-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-VkCopyImageToImageInfo-srcImage-07969 
 srcImagemust not have been created withflagscontainingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
- 
VUID-VkCopyImageToImageInfo-srcSubresource-07971 
 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-VkCopyImageToImageInfo-srcSubresource-07972 
 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-VkCopyImageToImageInfo-srcImage-07979 
 IfsrcImageis of typeVK_IMAGE_TYPE_1D, then for each element ofpRegions,srcOffset.ymust be0andextent.heightmust be1
- 
VUID-VkCopyImageToImageInfo-srcOffset-09104 
 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-VkCopyImageToImageInfo-srcImage-07980 
 IfsrcImageis of typeVK_IMAGE_TYPE_1DorVK_IMAGE_TYPE_2D, then for each element ofpRegions,srcOffset.zmust be0andextent.depthmust be1
- 
VUID-VkCopyImageToImageInfo-srcImage-07274 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_IDENTITY_BIT_KHRorVK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR,srcOffset.xmust be a multiple of the texel block extent width of the VkFormat ofsrcImage
- 
VUID-VkCopyImageToImageInfo-srcOffset-10051 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHRorVK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, andsrcOffset.xdoes not equal the width of the subresource specified bysrcSubresource,srcOffset.xmust be a multiple of the texel block extent width of the VkFormat ofsrcImage
- 
VUID-VkCopyImageToImageInfo-srcImage-07275 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_IDENTITY_BIT_KHRorVK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR,srcOffset.ymust be a multiple of the texel block extent height of the VkFormat ofsrcImage
- 
VUID-VkCopyImageToImageInfo-srcOffset-10052 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHRorVK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, andsrcOffset.ydoes not equal the height of the subresource specified bysrcSubresource,srcOffset.ymust be a multiple of the texel block extent height of the VkFormat ofsrcImage
- 
VUID-VkCopyImageToImageInfo-srcImage-07276 
 For each element ofpRegions,srcOffset.zmust be a multiple of the texel block extent depth of the VkFormat ofsrcImage
- 
VUID-VkCopyImageToImageInfo-srcImage-00207 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, 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-VkCopyImageToImageInfo-srcOffset-10053 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the difference ofsrcOffset.xandextent.heightmust be a multiple of the texel block extent width of the VkFormat ofsrcImage
- 
VUID-VkCopyImageToImageInfo-srcOffset-10054 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference ofsrcOffset.xandextent.widthmust be a multiple of the texel block extent width of the VkFormat ofsrcImage
- 
VUID-VkCopyImageToImageInfo-srcOffset-10055 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the sum ofsrcOffset.xandextent.heightdoes not equal the width of the subresource specified bysrcSubresource,extent.heightmust be a multiple of the texel block extent width of the VkFormat ofsrcImage
- 
VUID-VkCopyImageToImageInfo-srcImage-00208 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, and 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-VkCopyImageToImageInfo-srcOffset-10056 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the sum ofsrcOffset.yandextent.widthdoes not equal the height of the subresource specified bysrcSubresource,extent.widthmust be a multiple of the texel block extent height of the VkFormat ofsrcImage
- 
VUID-VkCopyImageToImageInfo-srcOffset-10057 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference ofsrcOffset.yandextent.heightmust be a multiple of the texel block extent height of the VkFormat ofsrcImage
- 
VUID-VkCopyImageToImageInfo-srcOffset-10058 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the difference ofsrcOffset.yandextent.widthmust be a multiple of the texel block extent height of the VkFormat ofsrcImage
- 
VUID-VkCopyImageToImageInfo-srcImage-00209 
 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-VkCopyImageToImageInfo-srcSubresource-09105 
 For each element ofpRegions,srcSubresource.aspectMaskmust specify aspects present insrcImage
- 
VUID-VkCopyImageToImageInfo-srcImage-07981 
 IfsrcImagehas a multi-planar format, then for each element ofpRegions,srcSubresource.aspectMaskmust be a single valid multi-planar aspect mask bit
- 
VUID-VkCopyImageToImageInfo-srcImage-07983 
 IfsrcImageis of typeVK_IMAGE_TYPE_3D, for each element ofpRegions,srcSubresource.baseArrayLayermust be0andsrcSubresource.layerCountmust be1
- 
VUID-VkCopyImageToImageInfo-dstImage-09109 
 IfdstImageis sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory
- 
VUID-VkCopyImageToImageInfo-dstImage-09111 
 If the stencil aspect ofdstImageis accessed, anddstImagewas not created with separate stencil usage,dstImagemust have been created withVK_IMAGE_USAGE_HOST_TRANSFER_BITset in VkImageCreateInfo::usage
- 
VUID-VkCopyImageToImageInfo-dstImage-09112 
 If the stencil aspect ofdstImageis accessed, anddstImagewas created with separate stencil usage,dstImagemust have been created withVK_IMAGE_USAGE_HOST_TRANSFER_BITset in VkImageStencilUsageCreateInfo::stencilUsage
- 
VUID-VkCopyImageToImageInfo-dstImage-09113 
 If non-stencil aspects ofdstImageare accessed,dstImagemust have been created withVK_IMAGE_USAGE_HOST_TRANSFER_BITset in VkImageCreateInfo::usage
- 
VUID-VkCopyImageToImageInfo-dstOffset-09114 
 IfflagscontainsVK_HOST_IMAGE_COPY_MEMCPY_BIT, thex,y, andzmembers of thedstOffsetmember of each element ofpRegionsmust be0
- 
VUID-VkCopyImageToImageInfo-dstImage-09115 
 IfflagscontainsVK_HOST_IMAGE_COPY_MEMCPY_BIT, theextentmember of each element ofpRegionsmust equal the extents ofdstImageidentified bydstSubresource
- 
VUID-VkCopyImageToImageInfo-dstImage-07966 
 IfdstImageis non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a singleVkDeviceMemoryobject
- 
VUID-VkCopyImageToImageInfo-dstSubresource-07967 
 ThedstSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified in VkImageCreateInfo whendstImagewas created
- 
VUID-VkCopyImageToImageInfo-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-VkCopyImageToImageInfo-dstImage-07969 
 dstImagemust not have been created withflagscontainingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
- 
VUID-VkCopyImageToImageInfo-dstSubresource-07971 
 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-VkCopyImageToImageInfo-dstSubresource-07972 
 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-VkCopyImageToImageInfo-dstImage-07979 
 IfdstImageis of typeVK_IMAGE_TYPE_1D, then for each element ofpRegions,dstOffset.ymust be0andextent.heightmust be1
- 
VUID-VkCopyImageToImageInfo-dstOffset-09104 
 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-VkCopyImageToImageInfo-dstImage-07980 
 IfdstImageis of typeVK_IMAGE_TYPE_1DorVK_IMAGE_TYPE_2D, then for each element ofpRegions,dstOffset.zmust be0andextent.depthmust be1
- 
VUID-VkCopyImageToImageInfo-dstImage-07274 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_IDENTITY_BIT_KHRorVK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR,dstOffset.xmust be a multiple of the texel block extent width of the VkFormat ofdstImage
- 
VUID-VkCopyImageToImageInfo-dstOffset-10051 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHRorVK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, anddstOffset.xdoes not equal the width of the subresource specified bydstSubresource,dstOffset.xmust be a multiple of the texel block extent width of the VkFormat ofdstImage
- 
VUID-VkCopyImageToImageInfo-dstImage-07275 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_IDENTITY_BIT_KHRorVK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR,dstOffset.ymust be a multiple of the texel block extent height of the VkFormat ofdstImage
- 
VUID-VkCopyImageToImageInfo-dstOffset-10052 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHRorVK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, anddstOffset.ydoes not equal the height of the subresource specified bydstSubresource,dstOffset.ymust be a multiple of the texel block extent height of the VkFormat ofdstImage
- 
VUID-VkCopyImageToImageInfo-dstImage-07276 
 For each element ofpRegions,dstOffset.zmust be a multiple of the texel block extent depth of the VkFormat ofdstImage
- 
VUID-VkCopyImageToImageInfo-dstImage-00207 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, 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-VkCopyImageToImageInfo-dstOffset-10053 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the difference ofdstOffset.xandextent.heightmust be a multiple of the texel block extent width of the VkFormat ofdstImage
- 
VUID-VkCopyImageToImageInfo-dstOffset-10054 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference ofdstOffset.xandextent.widthmust be a multiple of the texel block extent width of the VkFormat ofdstImage
- 
VUID-VkCopyImageToImageInfo-dstOffset-10055 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the sum ofdstOffset.xandextent.heightdoes not equal the width of the subresource specified bydstSubresource,extent.heightmust be a multiple of the texel block extent width of the VkFormat ofdstImage
- 
VUID-VkCopyImageToImageInfo-dstImage-00208 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, and 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-VkCopyImageToImageInfo-dstOffset-10056 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the sum ofdstOffset.yandextent.widthdoes not equal the height of the subresource specified bydstSubresource,extent.widthmust be a multiple of the texel block extent height of the VkFormat ofdstImage
- 
VUID-VkCopyImageToImageInfo-dstOffset-10057 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference ofdstOffset.yandextent.heightmust be a multiple of the texel block extent height of the VkFormat ofdstImage
- 
VUID-VkCopyImageToImageInfo-dstOffset-10058 
 For each element ofpRegions, if VkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the difference ofdstOffset.yandextent.widthmust be a multiple of the texel block extent height of the VkFormat ofdstImage
- 
VUID-VkCopyImageToImageInfo-dstImage-00209 
 For each element ofpRegions, if the sum ofdstOffset.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 ofdstImage
- 
VUID-VkCopyImageToImageInfo-dstSubresource-09105 
 For each element ofpRegions,dstSubresource.aspectMaskmust specify aspects present indstImage
- 
VUID-VkCopyImageToImageInfo-dstImage-07981 
 IfdstImagehas a multi-planar format, then for each element ofpRegions,dstSubresource.aspectMaskmust be a single valid multi-planar aspect mask bit
- 
VUID-VkCopyImageToImageInfo-dstImage-07983 
 IfdstImageis of typeVK_IMAGE_TYPE_3D, for each element ofpRegions,dstSubresource.baseArrayLayermust be0anddstSubresource.layerCountmust be1
- 
VUID-VkCopyImageToImageInfo-srcImageLayout-09070 
 srcImageLayoutmust specify the current layout of the image subresources ofsrcImagespecified inpRegions
- 
VUID-VkCopyImageToImageInfo-dstImageLayout-09071 
 dstImageLayoutmust specify the current layout of the image subresources ofdstImagespecified inpRegions
- 
VUID-VkCopyImageToImageInfo-srcImageLayout-09072 
 srcImageLayoutmust be one of the image layouts returned in VkPhysicalDeviceHostImageCopyProperties::pCopySrcLayouts
- 
VUID-VkCopyImageToImageInfo-dstImageLayout-09073 
 dstImageLayoutmust be one of the image layouts returned in VkPhysicalDeviceHostImageCopyProperties::pCopyDstLayouts
- 
VUID-VkCopyImageToImageInfo-sType-sType 
 sTypemust beVK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO
- 
VUID-VkCopyImageToImageInfo-flags-parameter 
 flagsmust be a valid combination of VkHostImageCopyFlagBits values
- 
VUID-VkCopyImageToImageInfo-srcImage-parameter 
 srcImagemust be a valid VkImage handle
- 
VUID-VkCopyImageToImageInfo-srcImageLayout-parameter 
 srcImageLayoutmust be a valid VkImageLayout value
- 
VUID-VkCopyImageToImageInfo-dstImage-parameter 
 dstImagemust be a valid VkImage handle
- 
VUID-VkCopyImageToImageInfo-dstImageLayout-parameter 
 dstImageLayoutmust be a valid VkImageLayout value
- 
VUID-VkCopyImageToImageInfo-pRegions-parameter 
 pRegionsmust be a valid pointer to an array ofregionCountvalid VkImageCopy2 structures
- 
VUID-VkCopyImageToImageInfo-regionCount-arraylength 
 regionCountmust be greater than0
- 
VUID-VkCopyImageToImageInfo-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.