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-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-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 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-00136
The sample count ofsrcImage
anddstImage
must match -
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-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-08713
IfsrcImage
has a multi-planar image format, then for each element ofpRegions
,srcSubresource.aspectMask
must be a single valid multi-planar aspect mask -
VUID-VkCopyImageInfo2-dstImage-08714
IfdstImage
has a multi-planar image format, then for each element ofpRegions
,dstSubresource.aspectMask
must be a single valid multi-planar aspect mask -
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-apiVersion-07932
If the VK_KHR_maintenance1 extension is not enabled, VkPhysicalDeviceProperties::apiVersion
is less than Vulkan 1.1, and eithersrcImage
ordstImage
is of typeVK_IMAGE_TYPE_3D
, then for each element ofpRegions
,srcSubresource.baseArrayLayer
anddstSubresource.baseArrayLayer
must each be0
, andsrcSubresource.layerCount
anddstSubresource.layerCount
must each be1
-
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-apiVersion-07933
If the VK_KHR_maintenance1 extension is not enabled, VkPhysicalDeviceProperties::apiVersion
is less than Vulkan 1.1,srcImage
anddstImage
must have the same VkImageType -
VUID-VkCopyImageInfo2-srcImage-07743
IfsrcImage
anddstImage
have a different VkImageType, one must beVK_IMAGE_TYPE_3D
and the other must beVK_IMAGE_TYPE_2D
-
VUID-VkCopyImageInfo2-srcImage-07744
IfsrcImage
anddstImage
have the same VkImageType, thelayerCount
member ofsrcSubresource
anddstSubresource
in each element ofpRegions
must match -
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-pRegions-07278
For each element ofpRegions
,srcOffset.x
must be a multiple of the texel block extent width of the VkFormat ofsrcImage
-
VUID-VkCopyImageInfo2-pRegions-07279
For each element ofpRegions
,srcOffset.y
must be a multiple of the texel block extent height of the VkFormat ofsrcImage
-
VUID-VkCopyImageInfo2-pRegions-07280
For each element ofpRegions
,srcOffset.z
must be a multiple of the texel block extent depth of the VkFormat ofsrcImage
-
VUID-VkCopyImageInfo2-pRegions-07281
For each element ofpRegions
,dstOffset.x
must be a multiple of the texel block extent width of the VkFormat ofdstImage
-
VUID-VkCopyImageInfo2-pRegions-07282
For each element ofpRegions
,dstOffset.y
must be a multiple of the texel block extent height of the VkFormat ofdstImage
-
VUID-VkCopyImageInfo2-pRegions-07283
For each element ofpRegions
,dstOffset.z
must 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.x
andextent.width
does not equal the width of the subresource specified bysrcSubresource
,extent.width
must 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.y
andextent.height
does not equal the height of the subresource specified bysrcSubresource
,extent.height
must 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.z
andextent.depth
does not equal the depth of the subresource specified bysrcSubresource
,extent.depth
must 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.x
andextent.width
does not equal the width of the subresource specified bydstSubresource
,extent.width
must 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.y
andextent.height
does not equal the height of the subresource specified bydstSubresource
,extent.height
must 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.z
andextent.depth
does not equal the depth of the subresource specified bydstSubresource
,extent.depth
must be a multiple of the texel block extent depth of the VkFormat 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-srcImage-07966
IfsrcImage
is non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a singleVkDeviceMemory
object -
VUID-VkCopyImageInfo2-srcSubresource-07967
ThesrcSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified in VkImageCreateInfo whensrcImage
was created -
VUID-VkCopyImageInfo2-srcSubresource-07968
ThesrcSubresource.baseArrayLayer
+srcSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified in VkImageCreateInfo whensrcImage
was created -
VUID-VkCopyImageInfo2-srcImage-07969
srcImage
must not have been created withflags
containingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
-
VUID-VkCopyImageInfo2-dstImage-07966
IfdstImage
is non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a singleVkDeviceMemory
object -
VUID-VkCopyImageInfo2-dstSubresource-07967
ThedstSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified in VkImageCreateInfo whendstImage
was created -
VUID-VkCopyImageInfo2-dstSubresource-07968
ThedstSubresource.baseArrayLayer
+dstSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified in VkImageCreateInfo whendstImage
was created -
VUID-VkCopyImageInfo2-dstImage-07969
dstImage
must not have been created withflags
containingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
-
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.