vkCmdCopyImage(3)
C Specification
To copy data between image objects, call:
// Provided by VK_VERSION_1_0
void vkCmdCopyImage(
VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
VkImage dstImage,
VkImageLayout dstImageLayout,
uint32_t regionCount,
const VkImageCopy* pRegions);
Parameters
-
commandBufferis the command buffer into which the command will be recorded. -
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 VkImageCopy structures specifying the regions to copy.
Description
Each source region specified by pRegions is copied from the source
image to the destination region of the destination image.
If any of the specified regions in srcImage overlaps in memory with
any of the specified regions in dstImage, values read from those
overlapping regions are undefined.
If any region accesses a depth aspect in dstImage
and the VK_EXT_depth_range_unrestricted extension is not enabled,
values copied from srcBuffer outside of the range [0,1] will be
written as undefined values to the destination image.
Multi-planar images can only be copied on a per-plane basis, and the subresources used in each region when copying to or from such images must specify only one plane, though different regions can specify different planes. When copying planes of multi-planar images, the format considered is the compatible format for that plane, rather than the format of the multi-planar image.
If the format of the destination image has a different block extent than the source image (e.g. one is a compressed format), the offset and extent for each of the regions specified is scaled according to the block extents of each format to match in size. Copy regions for each image must be aligned to a multiple of the texel block extent in each dimension, except at the edges of the image, where region extents must match the edge of the image.
Image data can be copied between images with different image types.
If one image is VK_IMAGE_TYPE_3D and the other image is
VK_IMAGE_TYPE_2D with multiple layers, then each slice is copied to or
from a different layer; depth slices in the 3D image correspond to
layerCount layers in the 2D image, with an effective depth of
1 used for the 2D image.
If the maintenance5 feature is enabled, all
other combinations are allowed and function as if 1D images are 2D images
with a height of 1.
Otherwise, other combinations of image types are disallowed.
-
VUID-vkCmdCopyImage-commandBuffer-01825
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported,srcImagemust not be a protected image -
VUID-vkCmdCopyImage-commandBuffer-01826
IfcommandBufferis an unprotected command buffer andprotectedNoFaultis not supported,dstImagemust not be a protected image -
VUID-vkCmdCopyImage-commandBuffer-01827
IfcommandBufferis a protected command buffer andprotectedNoFaultis not supported,dstImagemust not be an unprotected image -
VUID-vkCmdCopyImage-commandBuffer-10217
If the queue family used to create the VkCommandPool whichcommandBufferwas allocated from does not support VK_QUEUE_GRAPHICS_BIT, and themaintenance10feature is not enabled, for each element ofpRegions, where theaspectMaskmember ofsrcSubresourceis VK_IMAGE_ASPECT_COLOR_BIT, theaspectMaskofdstSubresourcemust not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT -
VUID-vkCmdCopyImage-commandBuffer-11782
If the queue family used to create the VkCommandPool whichcommandBufferwas allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element ofpRegionstheaspectMaskmember ofsrcSubresourceis VK_IMAGE_ASPECT_COLOR_BIT and theaspectMaskofdstSubresourceis VK_IMAGE_ASPECT_DEPTH_BIT, then the format features ofdstImagemust contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_COMPUTE_QUEUE_BIT_KHR -
VUID-vkCmdCopyImage-commandBuffer-11783
If the queue family used to create the VkCommandPool whichcommandBufferwas allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element ofpRegionstheaspectMaskmember ofsrcSubresourceis VK_IMAGE_ASPECT_COLOR_BIT and theaspectMaskofdstSubresourceis VK_IMAGE_ASPECT_DEPTH_BIT, then the format features ofdstImagemust contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_TRANSFER_QUEUE_BIT_KHR -
VUID-vkCmdCopyImage-commandBuffer-11784
If the queue family used to create the VkCommandPool whichcommandBufferwas allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element ofpRegionstheaspectMaskmember ofsrcSubresourceis VK_IMAGE_ASPECT_COLOR_BIT and theaspectMaskofdstSubresourceis VK_IMAGE_ASPECT_STENCIL_BIT, then the format features ofdstImagemust contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_COMPUTE_QUEUE_BIT_KHR -
VUID-vkCmdCopyImage-commandBuffer-11785
If the queue family used to create the VkCommandPool whichcommandBufferwas allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element ofpRegionstheaspectMaskmember ofsrcSubresourceis VK_IMAGE_ASPECT_COLOR_BIT and theaspectMaskofdstSubresourceis VK_IMAGE_ASPECT_STENCIL_BIT, then the format features ofdstImagemust contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_TRANSFER_QUEUE_BIT_KHR -
VUID-vkCmdCopyImage-commandBuffer-10218
If the queue family used to create the VkCommandPool whichcommandBufferwas allocated from does not support VK_QUEUE_GRAPHICS_BIT, and themaintenance10feature is not enabled, for each element ofpRegions, where theaspectMaskmember ofdstSubresourceis VK_IMAGE_ASPECT_COLOR_BIT then theaspectMaskofsrcSubresourcemust not be VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT -
VUID-vkCmdCopyImage-commandBuffer-11786
If the queue family used to create the VkCommandPool whichcommandBufferwas allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element ofpRegionstheaspectMaskmember ofdstSubresourceis VK_IMAGE_ASPECT_COLOR_BIT and theaspectMaskofsrcSubresourceis VK_IMAGE_ASPECT_DEPTH_BIT, then the format features ofsrcImagemust contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_COMPUTE_QUEUE_BIT_KHR -
VUID-vkCmdCopyImage-commandBuffer-11787
If the queue family used to create the VkCommandPool whichcommandBufferwas allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element ofpRegionstheaspectMaskmember ofdstSubresourceis VK_IMAGE_ASPECT_COLOR_BIT and theaspectMaskofsrcSubresourceis VK_IMAGE_ASPECT_DEPTH_BIT, then the format features ofsrcImagemust contain VK_FORMAT_FEATURE_2_DEPTH_COPY_ON_TRANSFER_QUEUE_BIT_KHR -
VUID-vkCmdCopyImage-commandBuffer-11788
If the queue family used to create the VkCommandPool whichcommandBufferwas allocated from does not support VK_QUEUE_GRAPHICS_BIT but does support VK_QUEUE_COMPUTE_BIT, and in any element ofpRegionstheaspectMaskmember ofdstSubresourceis VK_IMAGE_ASPECT_COLOR_BIT and theaspectMaskofsrcSubresourceis VK_IMAGE_ASPECT_STENCIL_BIT, then the format features ofsrcImagemust contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_COMPUTE_QUEUE_BIT_KHR -
VUID-vkCmdCopyImage-commandBuffer-11789
If the queue family used to create the VkCommandPool whichcommandBufferwas allocated from does not support VK_QUEUE_GRAPHICS_BIT and VK_QUEUE_COMPUTE_BIT, but does support VK_QUEUE_TRANSFER_BIT, and in any element ofpRegionstheaspectMaskmember ofdstSubresourceis VK_IMAGE_ASPECT_COLOR_BIT and theaspectMaskofsrcSubresourceis VK_IMAGE_ASPECT_STENCIL_BIT, then the format features ofsrcImagemust contain VK_FORMAT_FEATURE_2_STENCIL_COPY_ON_TRANSFER_QUEUE_BIT_KHR
-
VUID-vkCmdCopyImage-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-vkCmdCopyImage-srcImage-01995
The format features ofsrcImagemust contain VK_FORMAT_FEATURE_TRANSFER_SRC_BIT -
VUID-vkCmdCopyImage-srcImageLayout-00128
srcImageLayoutmust specify the layout of the image subresources ofsrcImagespecified inpRegionsat the time this command is executed on aVkDevice -
VUID-vkCmdCopyImage-srcImageLayout-01917
srcImageLayoutmust be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, or VK_IMAGE_LAYOUT_GENERAL -
VUID-vkCmdCopyImage-srcImage-09460
IfsrcImageanddstImageare the same, and any elements ofpRegionscontains thesrcSubresourceanddstSubresourcewith matchingmipLeveland overlapping array layers, then thesrcImageLayoutanddstImageLayoutmust be VK_IMAGE_LAYOUT_GENERAL or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR -
VUID-vkCmdCopyImage-dstImage-01996
The format features ofdstImagemust contain VK_FORMAT_FEATURE_TRANSFER_DST_BIT -
VUID-vkCmdCopyImage-dstImageLayout-00133
dstImageLayoutmust specify the layout of the image subresources ofdstImagespecified inpRegionsat the time this command is executed on aVkDevice -
VUID-vkCmdCopyImage-dstImageLayout-01395
dstImageLayoutmust be VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, or VK_IMAGE_LAYOUT_GENERAL -
VUID-vkCmdCopyImage-srcImage-01548
If the VkFormat of each ofsrcImageanddstImageis not a multi-planar format, the VkFormat of each ofsrcImageanddstImagemust be size-compatible -
VUID-vkCmdCopyImage-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-vkCmdCopyImage-srcImage-09247
If the VkFormat of each ofsrcImageanddstImageis a compressed image format, the formats must have the same texel block extent -
VUID-vkCmdCopyImage-srcImage-00136
The sample count ofsrcImageanddstImagemust match -
VUID-vkCmdCopyImage-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-vkCmdCopyImage-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-vkCmdCopyImage-srcImage-01551
If neithersrcImagenordstImagehas a multi-planar format and themaintenance8feature is not enabled then for each element ofpRegions,srcSubresource.aspectMaskanddstSubresource.aspectMaskmust match -
VUID-vkCmdCopyImage-pRegions-12201
For each element ofpRegionswheresrcSubresource.aspectMaskanddstSubresource.aspectMaskeach contain at least one of VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT,srcSubresource.aspectMaskanddstSubresource.aspectMaskmust match -
VUID-vkCmdCopyImage-srcSubresource-10214
IfsrcSubresource.aspectMaskis VK_IMAGE_ASPECT_COLOR_BIT, thendstSubresource.aspectMaskmust not contain both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT -
VUID-vkCmdCopyImage-dstSubresource-10215
IfdstSubresource.aspectMaskis VK_IMAGE_ASPECT_COLOR_BIT, thensrcSubresource.aspectMaskmust not contain both VK_IMAGE_ASPECT_DEPTH_BIT and VK_IMAGE_ASPECT_STENCIL_BIT -
VUID-vkCmdCopyImage-srcImage-08713
IfsrcImagehas a multi-planar format, then for each element ofpRegions,srcSubresource.aspectMaskmust be a single valid multi-planar aspect mask bit -
VUID-vkCmdCopyImage-dstImage-08714
IfdstImagehas a multi-planar format, then for each element ofpRegions,dstSubresource.aspectMaskmust be a single valid multi-planar aspect mask bit -
VUID-vkCmdCopyImage-srcImage-01556
IfsrcImagehas a multi-planar format and thedstImagedoes not have a multi-planar image format, then for each element ofpRegions,dstSubresource.aspectMaskmust be VK_IMAGE_ASPECT_COLOR_BIT -
VUID-vkCmdCopyImage-dstImage-01557
IfdstImagehas a multi-planar format and thesrcImagedoes not have a multi-planar image format, then for each element ofpRegions,srcSubresource.aspectMaskmust be VK_IMAGE_ASPECT_COLOR_BIT -
VUID-vkCmdCopyImage-srcSubresource-10211
IfsrcSubresource.aspectMaskis VK_IMAGE_ASPECT_COLOR_BIT anddstSubresource.aspectMaskis VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT, then the VkFormat values ofsrcImageanddstImagemust be compatible according to the list of compatible depth-stencil and color formats -
VUID-vkCmdCopyImage-srcSubresource-10212
IfsrcSubresource.aspectMaskis VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT anddstSubresource.aspectMaskis VK_IMAGE_ASPECT_COLOR_BIT, then the VkFormat values ofsrcImageanddstImagemust be compatible according to the list of compatible depth-stencil and color formats -
VUID-vkCmdCopyImage-apiVersion-07932
If the VK_KHR_maintenance1 extension is not enabled, or VkPhysicalDeviceProperties::apiVersionis less than Vulkan 1.1, and eithersrcImageordstImageis of type VK_IMAGE_TYPE_3D, then for each element ofpRegions,srcSubresource.baseArrayLayeranddstSubresource.baseArrayLayermust both be0, andsrcSubresource.layerCountanddstSubresource.layerCountmust both be1 -
VUID-vkCmdCopyImage-srcImage-04443
IfsrcImageis of type VK_IMAGE_TYPE_3D, then for each element ofpRegions,srcSubresource.baseArrayLayermust be0andsrcSubresource.layerCountmust be1 -
VUID-vkCmdCopyImage-dstImage-04444
IfdstImageis of type VK_IMAGE_TYPE_3D, then for each element ofpRegions,dstSubresource.baseArrayLayermust be0anddstSubresource.layerCountmust be1 -
VUID-vkCmdCopyImage-aspectMask-00142
For each element ofpRegions,srcSubresource.aspectMaskmust specify aspects present insrcImage -
VUID-vkCmdCopyImage-aspectMask-00143
For each element ofpRegions,dstSubresource.aspectMaskmust specify aspects present indstImage -
VUID-vkCmdCopyImage-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-vkCmdCopyImage-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-vkCmdCopyImage-srcImage-00146
IfsrcImageis of type VK_IMAGE_TYPE_1D, then for each element ofpRegions,srcOffset.ymust be0andextent.heightmust be1 -
VUID-vkCmdCopyImage-srcOffset-00147
IfsrcImageis of type VK_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-vkCmdCopyImage-srcImage-01785
IfsrcImageis of type VK_IMAGE_TYPE_1D, then for each element ofpRegions,srcOffset.zmust be0andextent.depthmust be1 -
VUID-vkCmdCopyImage-dstImage-01786
IfdstImageis of type VK_IMAGE_TYPE_1D, then for each element ofpRegions,dstOffset.zmust be0 -
VUID-vkCmdCopyImage-srcImage-10907
If either the VkFormat of each ofsrcImageanddstImageis not a compressed image format, anddstImageis of type VK_IMAGE_TYPE_1D, then for each element ofpRegions,extent.depthmust be1 -
VUID-vkCmdCopyImage-srcImage-01787
IfsrcImageis of type VK_IMAGE_TYPE_2D, then for each element ofpRegions,srcOffset.zmust be0 -
VUID-vkCmdCopyImage-dstImage-01788
IfdstImageis of type VK_IMAGE_TYPE_2D, then for each element ofpRegions,dstOffset.zmust be0 -
VUID-vkCmdCopyImage-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-vkCmdCopyImage-apiVersion-08969
If the VK_KHR_maintenance1 extension is not enabled, and VkPhysicalDeviceProperties::apiVersionis less than Vulkan 1.1,srcImageordstImageis of type VK_IMAGE_TYPE_2D, then for each element ofpRegions,extent.depthmust be1 -
VUID-vkCmdCopyImage-srcImage-07743
IfsrcImageanddstImagehave a different VkImageType, and themaintenance5feature is not enabled, one must be VK_IMAGE_TYPE_3D and the other must be VK_IMAGE_TYPE_2D -
VUID-vkCmdCopyImage-srcImage-08793
IfsrcImageanddstImagehave the same VkImageType, for each element ofpRegions, if neither of thelayerCountmembers ofsrcSubresourceordstSubresourceare VK_REMAINING_ARRAY_LAYERS, thelayerCountmembers ofsrcSubresourceordstSubresourcemust match -
VUID-vkCmdCopyImage-srcImage-08794
IfsrcImageanddstImagehave the same VkImageType, and one of thelayerCountmembers ofsrcSubresourceordstSubresourceis VK_REMAINING_ARRAY_LAYERS, the other member must be either VK_REMAINING_ARRAY_LAYERS or equal to thearrayLayersmember of the VkImageCreateInfo used to create the image minusbaseArrayLayer -
VUID-vkCmdCopyImage-srcImage-01790
IfsrcImageanddstImageare both of type VK_IMAGE_TYPE_2D, then for each element ofpRegions,extent.depthmust be1 -
VUID-vkCmdCopyImage-srcImage-01791
IfsrcImageis of type VK_IMAGE_TYPE_2D, anddstImageis of type VK_IMAGE_TYPE_3D, then for each element ofpRegions,extent.depthmust equalsrcSubresource.layerCount -
VUID-vkCmdCopyImage-dstImage-01792
IfdstImageis of type VK_IMAGE_TYPE_2D, andsrcImageis of type VK_IMAGE_TYPE_3D, then for each element ofpRegions,extent.depthmust equaldstSubresource.layerCount -
VUID-vkCmdCopyImage-dstOffset-00150
For each element ofpRegions,dstOffset.xand (extent.width+dstOffset.x), whereextentis adjusted for size-compatibility, must both be greater than or equal to0and less than or equal to the width of the specifieddstSubresourceofdstImage -
VUID-vkCmdCopyImage-dstOffset-00151
For each element ofpRegions,dstOffset.yand (extent.height+dstOffset.y), whereextentis adjusted for size-compatibility, must both be greater than or equal to0and less than or equal to the height of the specifieddstSubresourceofdstImage -
VUID-vkCmdCopyImage-dstImage-00152
IfdstImageis of type VK_IMAGE_TYPE_1D, then for each element ofpRegions,dstOffset.ymust be0 -
VUID-vkCmdCopyImage-srcImage-10908
If either the VkFormat of each ofsrcImageanddstImageis not a compressed image format, anddstImageis of type VK_IMAGE_TYPE_1D, then for each element ofpRegions,extent.heightmust be1, whereextentis adjusted for size-compatibility -
VUID-vkCmdCopyImage-dstOffset-00153
IfdstImageis of type VK_IMAGE_TYPE_3D, then for each element ofpRegions,dstOffset.zand (extent.depth+dstOffset.z), whereextentis adjusted for size-compatibility, must both be greater than or equal to0and less than or equal to the depth of the specifieddstSubresourceofdstImage -
VUID-vkCmdCopyImage-pRegions-07278
For each element ofpRegions,srcOffset.xmust be a multiple of the texel block extent width of the VkFormat ofsrcImage -
VUID-vkCmdCopyImage-pRegions-07279
For each element ofpRegions,srcOffset.ymust be a multiple of the texel block extent height of the VkFormat ofsrcImage -
VUID-vkCmdCopyImage-pRegions-07280
For each element ofpRegions,srcOffset.zmust be a multiple of the texel block extent depth of the VkFormat ofsrcImage -
VUID-vkCmdCopyImage-pRegions-07281
For each element ofpRegions,dstOffset.xmust be a multiple of the texel block extent width of the VkFormat ofdstImage -
VUID-vkCmdCopyImage-pRegions-07282
For each element ofpRegions,dstOffset.ymust be a multiple of the texel block extent height of the VkFormat ofdstImage -
VUID-vkCmdCopyImage-pRegions-07283
For each element ofpRegions,dstOffset.zmust be a multiple of the texel block extent depth of the VkFormat ofdstImage -
VUID-vkCmdCopyImage-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-vkCmdCopyImage-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-vkCmdCopyImage-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-vkCmdCopyImage-aspect-06662
If theaspectmember of any element ofpRegionsincludes any flag other than VK_IMAGE_ASPECT_STENCIL_BIT orsrcImagewas not created with separate stencil usage,srcImagemust have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set -
VUID-vkCmdCopyImage-aspect-06663
If theaspectmember of any element ofpRegionsincludes any flag other than VK_IMAGE_ASPECT_STENCIL_BIT ordstImagewas not created with separate stencil usage,dstImagemust have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set -
VUID-vkCmdCopyImage-aspect-06664
If theaspectmember of any element ofpRegionsincludes VK_IMAGE_ASPECT_STENCIL_BIT, andsrcImagewas created with separate stencil usage,srcImagemust have been created with the VK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag set -
VUID-vkCmdCopyImage-aspect-06665
If theaspectmember of any element ofpRegionsincludes VK_IMAGE_ASPECT_STENCIL_BIT, anddstImagewas created with separate stencil usage,srcImagemust have been created with the VK_IMAGE_USAGE_TRANSFER_DST_BIT usage flag set
-
VUID-vkCmdCopyImage-srcImage-07966
IfsrcImageis non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdCopyImage-srcSubresource-07967
ThesrcSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified in VkImageCreateInfo whensrcImagewas created -
VUID-vkCmdCopyImage-srcSubresource-07968
IfsrcSubresource.layerCountis not VK_REMAINING_ARRAY_LAYERS,srcSubresource.baseArrayLayer+srcSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified in VkImageCreateInfo whensrcImagewas created -
VUID-vkCmdCopyImage-srcImage-07969
srcImagemust not have been created withflagscontaining VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
-
VUID-vkCmdCopyImage-dstImage-07966
IfdstImageis non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-vkCmdCopyImage-dstSubresource-07967
ThedstSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified in VkImageCreateInfo whendstImagewas created -
VUID-vkCmdCopyImage-dstSubresource-07968
IfdstSubresource.layerCountis not VK_REMAINING_ARRAY_LAYERS,dstSubresource.baseArrayLayer+dstSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified in VkImageCreateInfo whendstImagewas created -
VUID-vkCmdCopyImage-dstImage-07969
dstImagemust not have been created withflagscontaining VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
-
VUID-vkCmdCopyImage-commandBuffer-parameter
commandBuffermust be a valid VkCommandBuffer handle -
VUID-vkCmdCopyImage-srcImage-parameter
srcImagemust be a valid VkImage handle -
VUID-vkCmdCopyImage-srcImageLayout-parameter
srcImageLayoutmust be a valid VkImageLayout value -
VUID-vkCmdCopyImage-dstImage-parameter
dstImagemust be a valid VkImage handle -
VUID-vkCmdCopyImage-dstImageLayout-parameter
dstImageLayoutmust be a valid VkImageLayout value -
VUID-vkCmdCopyImage-pRegions-parameter
pRegionsmust be a valid pointer to an array ofregionCountvalid VkImageCopy structures -
VUID-vkCmdCopyImage-commandBuffer-recording
commandBuffermust be in the recording state -
VUID-vkCmdCopyImage-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations -
VUID-vkCmdCopyImage-renderpass
This command must only be called outside of a render pass instance -
VUID-vkCmdCopyImage-suspended
This command must not be called between suspended render pass instances -
VUID-vkCmdCopyImage-videocoding
This command must only be called outside of a video coding scope -
VUID-vkCmdCopyImage-regionCount-arraylength
regionCountmust be greater than0 -
VUID-vkCmdCopyImage-commonparent
Each ofcommandBuffer,dstImage, andsrcImagemust have been created, allocated, or retrieved from the same VkDevice
-
Host access to
commandBuffermust be externally synchronized -
Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
Primary |
Outside |
Outside |
VK_QUEUE_COMPUTE_BIT |
Action |
vkCmdCopyImage is not affected by conditional rendering
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.