## C Specification

The VkImageCopy structure is defined as:

// Provided by VK_VERSION_1_0
typedef struct VkImageCopy {
VkImageSubresourceLayers    srcSubresource;
VkOffset3D                  srcOffset;
VkImageSubresourceLayers    dstSubresource;
VkOffset3D                  dstOffset;
VkExtent3D                  extent;
} VkImageCopy;

## Members

• srcSubresource and dstSubresource are VkImageSubresourceLayers structures specifying the image subresources of the images used for the source and destination image data, respectively.

• srcOffset and dstOffset select the initial x, y, and z offsets in texels of the sub-regions of the source and destination image data.

• extent is the size in texels of the image to copy in width, height and depth.

## Description

For VK_IMAGE_TYPE_3D images, copies are performed slice by slice starting with the z member of the srcOffset or dstOffset, and copying depth slices. For images with multiple layers, copies are performed layer by layer starting with the baseArrayLayer member of the srcSubresource or dstSubresource and copying layerCount layers. 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.

Copies involving a multi-planar image format specify the region to be copied in terms of the plane to be copied, not the coordinates of the multi-planar image. This means that copies accessing the R/B planes of “_422” format images must fit the copied region within half the width of the parent image, and that copies accessing the R/B planes of “_420” format images must fit the copied region within half the width and height of the parent image.

Valid Usage
• VUID-VkImageCopy-extent-00140
The number of slices of the extent (for 3D) or layers of the srcSubresource (for non-3D) must match the number of slices of the extent (for 3D) or layers of the dstSubresource (for non-3D)

• VUID-VkImageCopy-extent-06668
extent.width must not be 0

• VUID-VkImageCopy-extent-06669
extent.height must not be 0

• VUID-VkImageCopy-extent-06670
extent.depth must not be 0

Valid Usage (Implicit)
• VUID-VkImageCopy-srcSubresource-parameter
srcSubresource must be a valid VkImageSubresourceLayers structure

• VUID-VkImageCopy-dstSubresource-parameter
dstSubresource must be a valid VkImageSubresourceLayers structure