C Specification
The VkCopyBufferToImageInfo2 structure is defined as:
// Provided by VK_VERSION_1_3
typedef struct VkCopyBufferToImageInfo2 {
VkStructureType sType;
const void* pNext;
VkBuffer srcBuffer;
VkImage dstImage;
VkImageLayout dstImageLayout;
uint32_t regionCount;
const VkBufferImageCopy2* pRegions;
} VkCopyBufferToImageInfo2;
or the equivalent
// Provided by VK_KHR_copy_commands2
typedef VkCopyBufferToImageInfo2 VkCopyBufferToImageInfo2KHR;
Members
-
sTypeis the type of this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
srcBufferis the source buffer. -
dstImageis the destination image. -
dstImageLayoutis the layout of the destination image subresources for the copy. -
regionCountis the number of regions to copy. -
pRegionsis a pointer to an array of VkBufferImageCopy2 structures specifying the regions to copy.
Description
-
VUID-VkCopyBufferToImageInfo2-pRegions-04565
If the image region specified by each element ofpRegionsdoes not contain VkCopyCommandTransformInfoQCOM in itspNextchain, it must be a region that is contained within the specifiedimageSubresourceofdstImage -
VUID-VkCopyBufferToImageInfo2KHR-pRegions-04554
If the image region specified by each element ofpRegionscontains VkCopyCommandTransformInfoQCOM in itspNextchain, the rotated destination region as described in https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#copies-buffers-images-rotation-addressing must be contained withindstImage -
VUID-VkCopyBufferToImageInfo2KHR-pRegions-04555
If any element ofpRegionscontains VkCopyCommandTransformInfoQCOM in itspNextchain, thendstImagemust not be a blocked image -
VUID-VkCopyBufferToImageInfo2KHR-pRegions-06203
If any element ofpRegionscontains VkCopyCommandTransformInfoQCOM in itspNextchain, thendstImagemust be of typeVK_IMAGE_TYPE_2D -
VUID-VkCopyBufferToImageInfo2KHR-pRegions-06204
If any element ofpRegionscontains VkCopyCommandTransformInfoQCOM in itspNextchain, thendstImagemust not have a multi-planar format
-
VUID-VkCopyBufferToImageInfo2-pRegions-00171
srcBuffermust be large enough to contain all buffer locations that are accessed according to Buffer and Image Addressing, for each element ofpRegions -
VUID-VkCopyBufferToImageInfo2-pRegions-00173
The union of all source regions, and the union of all destination regions, specified by the elements ofpRegions, must not overlap in memory -
VUID-VkCopyBufferToImageInfo2-srcBuffer-00174
srcBuffermust have been created withVK_BUFFER_USAGE_TRANSFER_SRC_BITusage flag -
VUID-VkCopyBufferToImageInfo2-dstImage-01997
The format features ofdstImagemust containVK_FORMAT_FEATURE_TRANSFER_DST_BIT -
VUID-VkCopyBufferToImageInfo2-srcBuffer-00176
IfsrcBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-VkCopyBufferToImageInfo2-dstImage-00177
dstImagemust have been created withVK_IMAGE_USAGE_TRANSFER_DST_BITusage flag -
VUID-VkCopyBufferToImageInfo2-dstImage-00178
IfdstImageis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject -
VUID-VkCopyBufferToImageInfo2-dstImage-00179
dstImagemust have a sample count equal toVK_SAMPLE_COUNT_1_BIT -
VUID-VkCopyBufferToImageInfo2-dstImageLayout-00180
dstImageLayoutmust specify the layout of the image subresources ofdstImagespecified inpRegionsat the time this command is executed on aVkDevice -
VUID-VkCopyBufferToImageInfo2-dstImageLayout-01396
dstImageLayoutmust beVK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,VK_IMAGE_LAYOUT_GENERAL, orVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR -
VUID-VkCopyBufferToImageInfo2-imageSubresource-01701
TheimageSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified in VkImageCreateInfo whendstImagewas created -
VUID-VkCopyBufferToImageInfo2-imageSubresource-01702
TheimageSubresource.baseArrayLayer+imageSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified in VkImageCreateInfo whendstImagewas created -
VUID-VkCopyBufferToImageInfo2-imageOffset-01793
TheimageOffsetandimageExtentmembers of each element ofpRegionsmust respect the image transfer granularity requirements ofcommandBuffer’s command pool’s queue family, as described in VkQueueFamilyProperties -
VUID-VkCopyBufferToImageInfo2-dstImage-02543
dstImagemust not have been created withflagscontainingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT -
VUID-VkCopyBufferToImageInfo2-commandBuffer-04477
If the queue family used to create the VkCommandPool whichcommandBufferwas allocated from does not supportVK_QUEUE_GRAPHICS_BIT, for each element ofpRegions, theaspectMaskmember ofimageSubresourcemust not beVK_IMAGE_ASPECT_DEPTH_BITorVK_IMAGE_ASPECT_STENCIL_BIT -
VUID-VkCopyBufferToImageInfo2-pRegions-06223
For each element ofpRegionsnot containingVkCopyCommandTransformInfoQCOMin itspNextchain,imageOffset.xand (imageExtent.width+imageOffset.x) must both be greater than or equal to0and less than or equal to the width of the specifiedimageSubresourceofdstImage -
VUID-VkCopyBufferToImageInfo2-pRegions-06224
For each element ofpRegionsnot containingVkCopyCommandTransformInfoQCOMin itspNextchain,imageOffset.yand (imageExtent.height+imageOffset.y) must both be greater than or equal to0and less than or equal to the height of the specifiedimageSubresourceofdstImage
-
VUID-VkCopyBufferToImageInfo2-bufferOffset-01558
IfdstImagedoes not have either a depth/stencil or a multi-planar format, then for each element ofpRegions,bufferOffsetmust be a multiple of the format’s texel block size -
VUID-VkCopyBufferToImageInfo2-bufferOffset-01559
IfdstImagehas a multi-planar format, then for each element ofpRegions,bufferOffsetmust be a multiple of the element size of the compatible format for the format and theaspectMaskof theimageSubresourceas defined in [formats-compatible-planes] -
VUID-VkCopyBufferToImageInfo2-srcImage-00199
IfdstImageis of typeVK_IMAGE_TYPE_1D, then for each element ofpRegions,imageOffset.ymust be0andimageExtent.heightmust be1 -
VUID-VkCopyBufferToImageInfo2-imageOffset-00200
For each element ofpRegions,imageOffset.zand (imageExtent.depth+imageOffset.z) must both be greater than or equal to0and less than or equal to the depth of the specifiedimageSubresourceofdstImage -
VUID-VkCopyBufferToImageInfo2-srcImage-00201
IfdstImageis of typeVK_IMAGE_TYPE_1DorVK_IMAGE_TYPE_2D, then for each element ofpRegions,imageOffset.zmust be0andimageExtent.depthmust be1 -
VUID-VkCopyBufferToImageInfo2-bufferRowLength-00203
IfdstImageis a blocked image, for each element ofpRegions,bufferRowLengthmust be a multiple of the compressed texel block width -
VUID-VkCopyBufferToImageInfo2-bufferImageHeight-00204
IfdstImageis a blocked image, for each element ofpRegions,bufferImageHeightmust be a multiple of the compressed texel block height -
VUID-VkCopyBufferToImageInfo2-imageOffset-00205
IfdstImageis a blocked image, for each element ofpRegions, all members ofimageOffsetmust be a multiple of the corresponding dimensions of the compressed texel block -
VUID-VkCopyBufferToImageInfo2-bufferOffset-00206
IfdstImageis a blocked image, for each element ofpRegions,bufferOffsetmust be a multiple of the compressed texel block size in bytes -
VUID-VkCopyBufferToImageInfo2-imageExtent-00207
IfdstImageis a blocked image, for each element ofpRegions,imageExtent.widthmust be a multiple of the compressed texel block width or (imageExtent.width+imageOffset.x) must equal the width of the specifiedimageSubresourceofdstImage -
VUID-VkCopyBufferToImageInfo2-imageExtent-00208
IfdstImageis a blocked image, for each element ofpRegions,imageExtent.heightmust be a multiple of the compressed texel block height or (imageExtent.height+imageOffset.y) must equal the height of the specifiedimageSubresourceofdstImage -
VUID-VkCopyBufferToImageInfo2-imageExtent-00209
IfdstImageis a blocked image, for each element ofpRegions,imageExtent.depthmust be a multiple of the compressed texel block depth or (imageExtent.depth+imageOffset.z) must equal the depth of the specifiedimageSubresourceofdstImage -
VUID-VkCopyBufferToImageInfo2-aspectMask-00211
For each element ofpRegions,imageSubresource.aspectMaskmust specify aspects present indstImage -
VUID-VkCopyBufferToImageInfo2-aspectMask-01560
IfdstImagehas a multi-planar format, then for each element ofpRegions,imageSubresource.aspectMaskmust beVK_IMAGE_ASPECT_PLANE_0_BIT,VK_IMAGE_ASPECT_PLANE_1_BIT, orVK_IMAGE_ASPECT_PLANE_2_BIT(withVK_IMAGE_ASPECT_PLANE_2_BITvalid only for image formats with three planes) -
VUID-VkCopyBufferToImageInfo2-baseArrayLayer-00213
IfdstImageis of typeVK_IMAGE_TYPE_3D, for each element ofpRegions,imageSubresource.baseArrayLayermust be0andimageSubresource.layerCountmust be1 -
VUID-VkCopyBufferToImageInfo2-pRegions-04725
IfdstImageis not a blocked image, for each element ofpRegions,bufferRowLengthmultiplied by the texel block size ofdstImagemust be less than or equal to 231-1 -
VUID-VkCopyBufferToImageInfo2-pRegions-04726
IfdstImageis a blocked image, for each element ofpRegions,bufferRowLengthdivided by the compressed texel block width and then multiplied by the texel block size ofdstImagemust be less than or equal to 231-1 -
VUID-VkCopyBufferToImageInfo2-commandBuffer-04052
If the queue family used to create the VkCommandPool whichcommandBufferwas allocated from does not supportVK_QUEUE_GRAPHICS_BITorVK_QUEUE_COMPUTE_BIT, thebufferOffsetmember of any element ofpRegionsmust be a multiple of4 -
VUID-VkCopyBufferToImageInfo2-srcImage-04053
IfdstImagehas a depth/stencil format, thebufferOffsetmember of any element ofpRegionsmust be a multiple of4
-
VUID-VkCopyBufferToImageInfo2-sType-sType
sTypemust beVK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2 -
VUID-VkCopyBufferToImageInfo2-pNext-pNext
pNextmust beNULL -
VUID-VkCopyBufferToImageInfo2-srcBuffer-parameter
srcBuffermust be a valid VkBuffer handle -
VUID-VkCopyBufferToImageInfo2-dstImage-parameter
dstImagemust be a valid VkImage handle -
VUID-VkCopyBufferToImageInfo2-dstImageLayout-parameter
dstImageLayoutmust be a valid VkImageLayout value -
VUID-VkCopyBufferToImageInfo2-pRegions-parameter
pRegionsmust be a valid pointer to an array ofregionCountvalid VkBufferImageCopy2 structures -
VUID-VkCopyBufferToImageInfo2-regionCount-arraylength
regionCountmust be greater than0 -
VUID-VkCopyBufferToImageInfo2-commonparent
Both ofdstImage, andsrcBuffermust 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.