VkBufferImageCopy2
For both vkCmdCopyBufferToImage2 and vkCmdCopyImageToBuffer2,
each element of pRegions
is a structure defined as:
typedef struct VkBufferImageCopy2 {
VkStructureType sType;
const void* pNext;
VkDeviceSize bufferOffset;
uint32_t bufferRowLength;
uint32_t bufferImageHeight;
VkImageSubresourceLayers imageSubresource;
VkOffset3D imageOffset;
VkExtent3D imageExtent;
} VkBufferImageCopy2;
or the equivalent
typedef VkBufferImageCopy2 VkBufferImageCopy2KHR;
sType
is a VkStructureType value identifying this structure.pNext
isNULL
or a pointer to a structure extending this structure.bufferOffset
is the offset in bytes from the start of the buffer object where the image data is copied from or to.bufferRowLength
andbufferImageHeight
specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to theimageExtent
.imageSubresource
is a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data.imageOffset
selects the initialx
,y
,z
offsets in texels of the sub-region of the source or destination image data.imageExtent
is the size in texels of the image to copy inwidth
,height
anddepth
.
This structure is functionally identical to VkBufferImageCopy, but
adds sType
and pNext
parameters, allowing it to be more easily
extended.
Valid Usage
VUID-VkBufferImageCopy2-bufferRowLength-09101
bufferRowLength
must be 0
, or greater than or equal to the
width
member of imageExtent
VUID-VkBufferImageCopy2-bufferImageHeight-09102
bufferImageHeight
must be 0
, or greater than or equal to the
height
member of imageExtent
VUID-VkBufferImageCopy2-aspectMask-09103
The aspectMask
member of imageSubresource
must only have a
single bit set
VUID-VkBufferImageCopy2-imageExtent-06659
imageExtent.width
must not be 0
VUID-VkBufferImageCopy2-imageExtent-06660
imageExtent.height
must not be 0
VUID-VkBufferImageCopy2-imageExtent-06661
imageExtent.depth
must not be 0
Valid Usage (Implicit)
VUID-VkBufferImageCopy2-sType-sType
sType
must be VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2
VUID-VkBufferImageCopy2-pNext-pNext
pNext
must be NULL
or a pointer to a valid instance of VkCopyCommandTransformInfoQCOM
VUID-VkBufferImageCopy2-sType-unique
The sType
value of each struct in the pNext
chain must be unique
VUID-VkBufferImageCopy2-imageSubresource-parameter
imageSubresource
must be a valid VkImageSubresourceLayers structure