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
anddstSubresource
are VkImageSubresourceLayers structures specifying the image subresources of the images used for the source and destination image data, respectively. -
srcOffset
anddstOffset
select the initialx
,y
, andz
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 inwidth
,height
anddepth
.
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.
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.