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
-
sType
is the type of this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
srcImage
is the source image. -
srcImageLayout
is the current layout of the source image subresource. -
dstImage
is the destination image. -
dstImageLayout
is the current layout of the destination image subresource. -
regionCount
is the number of regions to copy. -
pRegions
is 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 ofsrcImage
must containVK_FORMAT_FEATURE_TRANSFER_SRC_BIT
-
VUID-VkCopyImageInfo2-srcImage-01546
IfsrcImage
is non-sparse then the image or disjoint plane to be copied must be bound completely and contiguously to a singleVkDeviceMemory
object -
VUID-VkCopyImageInfo2-srcImageLayout-00128
srcImageLayout
must specify the layout of the image subresources ofsrcImage
specified inpRegions
at the time this command is executed on aVkDevice
-
VUID-VkCopyImageInfo2-srcImageLayout-01917
srcImageLayout
must beVK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
,VK_IMAGE_LAYOUT_GENERAL
, orVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
-
VUID-VkCopyImageInfo2-dstImage-01996
The format features ofdstImage
must containVK_FORMAT_FEATURE_TRANSFER_DST_BIT
-
VUID-VkCopyImageInfo2-dstImage-01547
IfdstImage
is non-sparse then the image or disjoint plane that is the destination of the copy must be bound completely and contiguously to a singleVkDeviceMemory
object -
VUID-VkCopyImageInfo2-dstImageLayout-00133
dstImageLayout
must specify the layout of the image subresources ofdstImage
specified inpRegions
at the time this command is executed on aVkDevice
-
VUID-VkCopyImageInfo2-dstImageLayout-01395
dstImageLayout
must beVK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
,VK_IMAGE_LAYOUT_GENERAL
, orVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
-
VUID-VkCopyImageInfo2-srcImage-01548
If the VkFormat of each ofsrcImage
anddstImage
is not a multi-planar format, the VkFormat of each ofsrcImage
anddstImage
must be compatible, as defined above -
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-00136
The sample count ofsrcImage
anddstImage
must match -
VUID-VkCopyImageInfo2-srcSubresource-01696
ThesrcSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified in VkImageCreateInfo whensrcImage
was created -
VUID-VkCopyImageInfo2-dstSubresource-01697
ThedstSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified in VkImageCreateInfo whendstImage
was created -
VUID-VkCopyImageInfo2-srcSubresource-01698
ThesrcSubresource.baseArrayLayer
+srcSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified in VkImageCreateInfo whensrcImage
was created -
VUID-VkCopyImageInfo2-dstSubresource-01699
ThedstSubresource.baseArrayLayer
+dstSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified in VkImageCreateInfo whendstImage
was created -
VUID-VkCopyImageInfo2-srcOffset-01783
ThesrcOffset
andextent
members of each element ofpRegions
must respect the image transfer granularity requirements ofcommandBuffer
’s command pool’s queue family, as described in VkQueueFamilyProperties -
VUID-VkCopyImageInfo2-dstOffset-01784
ThedstOffset
andextent
members of each element ofpRegions
must respect the image transfer granularity requirements ofcommandBuffer
’s command pool’s queue family, as described in VkQueueFamilyProperties -
VUID-VkCopyImageInfo2-dstImage-02542
dstImage
andsrcImage
must not have been created withflags
containingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
-
VUID-VkCopyImageInfo2-srcImage-01551
If neithersrcImage
nordstImage
has a multi-planar image format then for each element ofpRegions
,srcSubresource.aspectMask
anddstSubresource.aspectMask
must match -
VUID-VkCopyImageInfo2-srcImage-01552
IfsrcImage
has a VkFormat with two planes then for each element ofpRegions
,srcSubresource.aspectMask
must beVK_IMAGE_ASPECT_PLANE_0_BIT
orVK_IMAGE_ASPECT_PLANE_1_BIT
-
VUID-VkCopyImageInfo2-srcImage-01553
IfsrcImage
has a VkFormat with three planes then for each element ofpRegions
,srcSubresource.aspectMask
must beVK_IMAGE_ASPECT_PLANE_0_BIT
,VK_IMAGE_ASPECT_PLANE_1_BIT
, orVK_IMAGE_ASPECT_PLANE_2_BIT
-
VUID-VkCopyImageInfo2-dstImage-01554
IfdstImage
has a VkFormat with two planes then for each element ofpRegions
,dstSubresource.aspectMask
must beVK_IMAGE_ASPECT_PLANE_0_BIT
orVK_IMAGE_ASPECT_PLANE_1_BIT
-
VUID-VkCopyImageInfo2-dstImage-01555
IfdstImage
has a VkFormat with three planes then for each element ofpRegions
,dstSubresource.aspectMask
must beVK_IMAGE_ASPECT_PLANE_0_BIT
,VK_IMAGE_ASPECT_PLANE_1_BIT
, orVK_IMAGE_ASPECT_PLANE_2_BIT
-
VUID-VkCopyImageInfo2-srcImage-01556
IfsrcImage
has a multi-planar image format and thedstImage
does not have a multi-planar image format, then for each element ofpRegions
,dstSubresource.aspectMask
must beVK_IMAGE_ASPECT_COLOR_BIT
-
VUID-VkCopyImageInfo2-dstImage-01557
IfdstImage
has a multi-planar image format and thesrcImage
does not have a multi-planar image format, then for each element ofpRegions
,srcSubresource.aspectMask
must beVK_IMAGE_ASPECT_COLOR_BIT
-
VUID-VkCopyImageInfo2-srcImage-04443
IfsrcImage
is of typeVK_IMAGE_TYPE_3D
, then for each element ofpRegions
,srcSubresource.baseArrayLayer
must be0
andsrcSubresource.layerCount
must be1
-
VUID-VkCopyImageInfo2-dstImage-04444
IfdstImage
is of typeVK_IMAGE_TYPE_3D
, then for each element ofpRegions
,dstSubresource.baseArrayLayer
must be0
anddstSubresource.layerCount
must be1
-
VUID-VkCopyImageInfo2-aspectMask-00142
For each element ofpRegions
,srcSubresource.aspectMask
must specify aspects present insrcImage
-
VUID-VkCopyImageInfo2-aspectMask-00143
For each element ofpRegions
,dstSubresource.aspectMask
must specify aspects present indstImage
-
VUID-VkCopyImageInfo2-srcOffset-00144
For each element ofpRegions
,srcOffset.x
and (extent.width
+srcOffset.x
) must both be greater than or equal to0
and less than or equal to the width of the specifiedsrcSubresource
ofsrcImage
-
VUID-VkCopyImageInfo2-srcOffset-00145
For each element ofpRegions
,srcOffset.y
and (extent.height
+srcOffset.y
) must both be greater than or equal to0
and less than or equal to the height of the specifiedsrcSubresource
ofsrcImage
-
VUID-VkCopyImageInfo2-srcImage-00146
IfsrcImage
is of typeVK_IMAGE_TYPE_1D
, then for each element ofpRegions
,srcOffset.y
must be0
andextent.height
must be1
-
VUID-VkCopyImageInfo2-srcOffset-00147
IfsrcImage
is of typeVK_IMAGE_TYPE_3D
, then for each element ofpRegions
,srcOffset.z
and (extent.depth
+srcOffset.z
) must both be greater than or equal to0
and less than or equal to the depth of the specifiedsrcSubresource
ofsrcImage
-
VUID-VkCopyImageInfo2-srcImage-01785
IfsrcImage
is of typeVK_IMAGE_TYPE_1D
, then for each element ofpRegions
,srcOffset.z
must be0
andextent.depth
must be1
-
VUID-VkCopyImageInfo2-dstImage-01786
IfdstImage
is of typeVK_IMAGE_TYPE_1D
, then for each element ofpRegions
,dstOffset.z
must be0
andextent.depth
must be1
-
VUID-VkCopyImageInfo2-srcImage-01787
IfsrcImage
is of typeVK_IMAGE_TYPE_2D
, then for each element ofpRegions
,srcOffset.z
must be0
-
VUID-VkCopyImageInfo2-dstImage-01788
IfdstImage
is of typeVK_IMAGE_TYPE_2D
, then for each element ofpRegions
,dstOffset.z
must be0
-
VUID-VkCopyImageInfo2-srcImage-01790
IfsrcImage
anddstImage
are both of typeVK_IMAGE_TYPE_2D
, then for each element ofpRegions
,extent.depth
must be1
-
VUID-VkCopyImageInfo2-srcImage-01791
IfsrcImage
is of typeVK_IMAGE_TYPE_2D
, anddstImage
is of typeVK_IMAGE_TYPE_3D
, then for each element ofpRegions
,extent.depth
must equalsrcSubresource.layerCount
-
VUID-VkCopyImageInfo2-dstImage-01792
IfdstImage
is of typeVK_IMAGE_TYPE_2D
, andsrcImage
is of typeVK_IMAGE_TYPE_3D
, then for each element ofpRegions
,extent.depth
must equaldstSubresource.layerCount
-
VUID-VkCopyImageInfo2-dstOffset-00150
For each element ofpRegions
,dstOffset.x
and (extent.width
+dstOffset.x
) must both be greater than or equal to0
and less than or equal to the width of the specifieddstSubresource
ofdstImage
-
VUID-VkCopyImageInfo2-dstOffset-00151
For each element ofpRegions
,dstOffset.y
and (extent.height
+dstOffset.y
) must both be greater than or equal to0
and less than or equal to the height of the specifieddstSubresource
ofdstImage
-
VUID-VkCopyImageInfo2-dstImage-00152
IfdstImage
is of typeVK_IMAGE_TYPE_1D
, then for each element ofpRegions
,dstOffset.y
must be0
andextent.height
must be1
-
VUID-VkCopyImageInfo2-dstOffset-00153
IfdstImage
is of typeVK_IMAGE_TYPE_3D
, then for each element ofpRegions
,dstOffset.z
and (extent.depth
+dstOffset.z
) must both be greater than or equal to0
and less than or equal to the depth of the specifieddstSubresource
ofdstImage
-
VUID-VkCopyImageInfo2-srcImage-01727
IfsrcImage
is a blocked image, then for each element ofpRegions
, all members ofsrcOffset
must be a multiple of the corresponding dimensions of the compressed texel block -
VUID-VkCopyImageInfo2-srcImage-01728
IfsrcImage
is a blocked image, then for each element ofpRegions
,extent.width
must be a multiple of the compressed texel block width or (extent.width
+srcOffset.x
) must equal the width of the specifiedsrcSubresource
ofsrcImage
-
VUID-VkCopyImageInfo2-srcImage-01729
IfsrcImage
is a blocked image, then for each element ofpRegions
,extent.height
must be a multiple of the compressed texel block height or (extent.height
+srcOffset.y
) must equal the height of the specifiedsrcSubresource
ofsrcImage
-
VUID-VkCopyImageInfo2-srcImage-01730
IfsrcImage
is a blocked image, then for each element ofpRegions
,extent.depth
must be a multiple of the compressed texel block depth or (extent.depth
+srcOffset.z
) must equal the depth of the specifiedsrcSubresource
ofsrcImage
-
VUID-VkCopyImageInfo2-dstImage-01731
IfdstImage
is a blocked image, then for each element ofpRegions
, all members ofdstOffset
must be a multiple of the corresponding dimensions of the compressed texel block -
VUID-VkCopyImageInfo2-dstImage-01732
IfdstImage
is a blocked image, then for each element ofpRegions
,extent.width
must be a multiple of the compressed texel block width or (extent.width
+dstOffset.x
) must equal the width of the specifieddstSubresource
ofdstImage
-
VUID-VkCopyImageInfo2-dstImage-01733
IfdstImage
is a blocked image, then for each element ofpRegions
,extent.height
must be a multiple of the compressed texel block height or (extent.height
+dstOffset.y
) must equal the height of the specifieddstSubresource
ofdstImage
-
VUID-VkCopyImageInfo2-dstImage-01734
IfdstImage
is a blocked image, then for each element ofpRegions
,extent.depth
must be a multiple of the compressed texel block depth or (extent.depth
+dstOffset.z
) must equal the depth of the specifieddstSubresource
ofdstImage
-
VUID-VkCopyImageInfo2-aspect-06662
If theaspect
member of any element ofpRegions
includes any flag other thanVK_IMAGE_ASPECT_STENCIL_BIT
orsrcImage
was not created with separate stencil usage,VK_IMAGE_USAGE_TRANSFER_SRC_BIT
must have been included in the VkImageCreateInfo::usage
used to createsrcImage
-
VUID-VkCopyImageInfo2-aspect-06663
If theaspect
member of any element ofpRegions
includes any flag other thanVK_IMAGE_ASPECT_STENCIL_BIT
ordstImage
was not created with separate stencil usage,VK_IMAGE_USAGE_TRANSFER_DST_BIT
must have been included in the VkImageCreateInfo::usage
used to createdstImage
-
VUID-VkCopyImageInfo2-aspect-06664
If theaspect
member of any element ofpRegions
includesVK_IMAGE_ASPECT_STENCIL_BIT
, andsrcImage
was created with separate stencil usage,VK_IMAGE_USAGE_TRANSFER_SRC_BIT
must have been included in the VkImageStencilUsageCreateInfo::stencilUsage
used to createsrcImage
-
VUID-VkCopyImageInfo2-aspect-06665
If theaspect
member of any element ofpRegions
includesVK_IMAGE_ASPECT_STENCIL_BIT
, anddstImage
was created with separate stencil usage,VK_IMAGE_USAGE_TRANSFER_DST_BIT
must have been included in the VkImageStencilUsageCreateInfo::stencilUsage
used to createdstImage
-
VUID-VkCopyImageInfo2-sType-sType
sType
must beVK_STRUCTURE_TYPE_COPY_IMAGE_INFO_2
-
VUID-VkCopyImageInfo2-srcImage-parameter
srcImage
must be a valid VkImage handle -
VUID-VkCopyImageInfo2-srcImageLayout-parameter
srcImageLayout
must be a valid VkImageLayout value -
VUID-VkCopyImageInfo2-dstImage-parameter
dstImage
must be a valid VkImage handle -
VUID-VkCopyImageInfo2-dstImageLayout-parameter
dstImageLayout
must be a valid VkImageLayout value -
VUID-VkCopyImageInfo2-pRegions-parameter
pRegions
must be a valid pointer to an array ofregionCount
valid VkImageCopy2 structures -
VUID-VkCopyImageInfo2-regionCount-arraylength
regionCount
must be greater than0
-
VUID-VkCopyImageInfo2-commonparent
Both ofdstImage
, andsrcImage
must 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.