VkCopyImageToBufferInfo2(3)
C Specification
TheVkCopyImageToBufferInfo2 structure is defined as:
// Provided by VK_VERSION_1_3typedef struct VkCopyImageToBufferInfo2 { VkStructureType sType; const void* pNext; VkImage srcImage; VkImageLayout srcImageLayout; VkBuffer dstBuffer; uint32_t regionCount; const VkBufferImageCopy2* pRegions;} VkCopyImageToBufferInfo2;// Provided by VK_KHR_copy_commands2// Equivalent to VkCopyImageToBufferInfo2typedef VkCopyImageToBufferInfo2 VkCopyImageToBufferInfo2KHR;Members
sTypeis aVkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending thisstructure.srcImageis the source image.srcImageLayoutis the layout of the source image subresources forthe copy.dstBufferis the destination buffer.regionCountis the number of regions to copy.pRegionsis a pointer to an array ofVkBufferImageCopy2structures specifying the regions to copy.
Description
VUID-VkCopyImageToBufferInfo2-pRegions-04566
The image region specified by each element ofpRegionsthat does not containVkCopyCommandTransformInfoQCOM in itspNextchainmust be contained within the specifiedimageSubresourceofsrcImageVUID-VkCopyImageToBufferInfo2KHR-pRegions-04557
If the image region specified by each element ofpRegionscontainsVkCopyCommandTransformInfoQCOM in itspNextchain, therotated source regionmust be contained withinsrcImageVUID-VkCopyImageToBufferInfo2KHR-pRegions-04558
If any element ofpRegionscontainsVkCopyCommandTransformInfoQCOM in itspNextchain, thensrcImagemust have a 1x1x1texel block extentVUID-VkCopyImageToBufferInfo2KHR-pRegions-06205
If any element ofpRegionscontainsVkCopyCommandTransformInfoQCOM in itspNextchain, thensrcImagemust be of typeVK_IMAGE_TYPE_2DVUID-VkCopyImageToBufferInfo2KHR-pRegions-06206
If any element ofpRegionscontainsVkCopyCommandTransformInfoQCOM in itspNextchain, thensrcImagemust not have amulti-planar format
VUID-VkCopyImageToBufferInfo2-pRegions-00183
dstBuffermust be large enough to contain all buffer locationsthat are accessed according toBuffer and Image Addressing, for each element ofpRegionsVUID-VkCopyImageToBufferInfo2-pRegions-00184
The union of all source regions, and the union of all destinationregions, specified by the elements ofpRegions,must not overlapin memoryVUID-VkCopyImageToBufferInfo2-srcImage-00186
srcImagemust have been created with theVK_IMAGE_USAGE_TRANSFER_SRC_BIT usage flag setVUID-VkCopyImageToBufferInfo2-srcImage-01998
Theformat features ofsrcImagemust containVK_FORMAT_FEATURE_TRANSFER_SRC_BITVUID-VkCopyImageToBufferInfo2-dstBuffer-00191
dstBuffermust have been created with theVK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag setVUID-VkCopyImageToBufferInfo2-dstBuffer-00192
IfdstBufferis non-sparse then itmust be bound completely andcontiguously to a singleVkDeviceMemoryobjectVUID-VkCopyImageToBufferInfo2-srcImageLayout-00189
srcImageLayoutmust specify the layout of the image subresourcesofsrcImagespecified inpRegionsat the time this commandis executed on aVkDeviceVUID-VkCopyImageToBufferInfo2-srcImageLayout-01397
srcImageLayoutmust beVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, orVK_IMAGE_LAYOUT_GENERAL
VUID-VkCopyImageToBufferInfo2-srcImage-07966
IfsrcImageis non-sparse then the imageor each specifieddisjoint planemust be bound completely and contiguously to a singleVkDeviceMemoryobjectVUID-VkCopyImageToBufferInfo2-imageSubresource-07967
TheimageSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified inVkImageCreateInfo whensrcImagewas createdVUID-VkCopyImageToBufferInfo2-imageSubresource-07968
IfimageSubresource.layerCountis notVK_REMAINING_ARRAY_LAYERS,imageSubresource.baseArrayLayer+imageSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified inVkImageCreateInfo whensrcImagewas createdVUID-VkCopyImageToBufferInfo2-srcImage-07969
srcImagemust not have been created withflagscontainingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
VUID-VkCopyImageToBufferInfo2-srcImage-07973
srcImagemust have a sample count equal toVK_SAMPLE_COUNT_1_BIT
VUID-VkCopyImageToBufferInfo2-srcImage-07979
IfsrcImageis of typeVK_IMAGE_TYPE_1D, then for eachelement ofpRegions,imageOffset.ymust be0andimageExtent.heightmust be1VUID-VkCopyImageToBufferInfo2-imageOffset-09104
For each element ofpRegions,imageOffset.zand(imageExtent.depth+imageOffset.z)mustboth be greater than or equal to0and less than or equal to the depthof the specifiedimageSubresourceofsrcImageVUID-VkCopyImageToBufferInfo2-srcImage-07980
IfsrcImageis of typeVK_IMAGE_TYPE_1D orVK_IMAGE_TYPE_2D, then for each element ofpRegions,imageOffset.zmust be0andimageExtent.depthmustbe1VUID-VkCopyImageToBufferInfo2-srcImage-07274
For each element ofpRegions,ifVkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR orVK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR,imageOffset.xmust be a multiple of thetexel block extent width of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-imageOffset-10051
For each element ofpRegions, ifVkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR orVK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, andimageOffset.xdoes not equal the width of the subresource specified byimageSubresource,imageOffset.xmust be a multiple ofthetexel block extent width of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-srcImage-07275
For each element ofpRegions,ifVkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR orVK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR,imageOffset.ymust be a multiple of thetexel block extent height of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-imageOffset-10052
For each element ofpRegions, ifVkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR orVK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, andimageOffset.ydoes not equal the height of the subresource specified byimageSubresource,imageOffset.ymust be a multiple ofthetexel block extent height of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-srcImage-07276
For each element ofpRegions,imageOffset.zmust be amultiple of thetexel block extent depth of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-srcImage-00207
For each element ofpRegions, ifVkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR,the sum ofimageOffset.xandextent.widthdoes not equalthe width of the subresource specified byimageSubresource,extent.widthmust be a multiple of thetexel block extent width of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-imageOffset-10053
For each element ofpRegions, ifVkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the difference ofimageOffset.xandextent.heightmust be a multiple of thetexel block extent width of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-imageOffset-10054
For each element ofpRegions, ifVkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference ofimageOffset.xandextent.widthmust be a multiple of thetexel block extent width of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-imageOffset-10055
For each element ofpRegions, ifVkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the sum ofimageOffset.xandextent.heightdoes not equal the widthof the subresource specified byimageSubresource,extent.heightmust be a multiple of thetexel block extent width of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-srcImage-00208
For each element ofpRegions, ifVkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR, andthe sum ofimageOffset.yandextent.heightdoes not equalthe height of the subresource specified byimageSubresource,extent.heightmust be a multiple of thetexel block extent height of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-imageOffset-10056
For each element ofpRegions, ifVkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR, the sum ofimageOffset.yandextent.widthdoes not equal the heightof the subresource specified byimageSubresource,extent.widthmust be a multiple of thetexel block extent height of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-imageOffset-10057
For each element ofpRegions, ifVkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR, the difference ofimageOffset.yandextent.heightmust be a multiple of thetexel block extent height of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-imageOffset-10058
For each element ofpRegions, ifVkCopyCommandTransformInfoQCOM::transformis equal toVK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR, the difference ofimageOffset.yandextent.widthmust be a multiple of thetexel block extent height of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-srcImage-00209
For each element ofpRegions, if the sum ofimageOffset.zandextent.depthdoes not equal the depth of the subresourcespecified bysrcSubresource,extent.depthmust be amultiple of thetexel block extent depth of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-imageSubresource-09105
For each element ofpRegions,imageSubresource.aspectMaskmust specify aspects present insrcImageVUID-VkCopyImageToBufferInfo2-srcImage-07981
IfsrcImagehas amulti-planar format, then for each element ofpRegions,imageSubresource.aspectMaskmust be a single validmulti-planar aspect mask bitVUID-VkCopyImageToBufferInfo2-srcImage-07983
IfsrcImageis of typeVK_IMAGE_TYPE_3D, for eachelement ofpRegions,imageSubresource.baseArrayLayermustbe0andimageSubresource.layerCountmust be1
VUID-VkCopyImageToBufferInfo2-bufferRowLength-09106
For each element ofpRegions,bufferRowLengthmust be amultiple of thetexel block extent width of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-bufferImageHeight-09107
For each element ofpRegions,bufferImageHeightmust be amultiple of thetexel block extent height of theVkFormat ofsrcImageVUID-VkCopyImageToBufferInfo2-bufferRowLength-09108
For each element ofpRegions,bufferRowLengthdivided bythetexel block extent width and thenmultiplied by the texel block size ofsrcImagemust be lessthan or equal to231-1
VUID-VkCopyImageToBufferInfo2-srcImage-07975
IfsrcImagedoes not have either a depth/stencil formator amulti-planar format,then for each element ofpRegions,bufferOffsetmust be amultiple of thetexel block sizeVUID-VkCopyImageToBufferInfo2-srcImage-07976
IfsrcImagehas amulti-planar format, then for each element ofpRegions,bufferOffsetmust be a multiple of the element size of the compatible format for theformat and theaspectMaskof theimageSubresourceas definedinCompatible Formats of Planes of Multi-Planar FormatsVUID-VkCopyImageToBufferInfo2-srcImage-07978
IfsrcImagehas a depth/stencil format, thebufferOffsetmember of any element ofpRegionsmust be a multiple of4VUID-VkCopyImageToBufferInfo2-imageOffset-00197
For each element ofpRegionsnot containingVkCopyCommandTransformInfoQCOMin itspNextchain,imageOffset.xand(imageExtent.width+imageOffset.x)must both be greater than or equal to0andless than or equal to the width of the specifiedimageSubresourceofsrcImageVUID-VkCopyImageToBufferInfo2-imageOffset-00198
For each element ofpRegionsnot containingVkCopyCommandTransformInfoQCOMin itspNextchain,imageOffset.yand(imageExtent.height+imageOffset.y)must both be greater than or equal to0andless than or equal to the height of the specifiedimageSubresourceofsrcImage
VUID-VkCopyImageToBufferInfo2-sType-sType
sTypemust beVK_STRUCTURE_TYPE_COPY_IMAGE_TO_BUFFER_INFO_2VUID-VkCopyImageToBufferInfo2-srcImage-parameter
srcImagemust be a validVkImage handleVUID-VkCopyImageToBufferInfo2-srcImageLayout-parameter
srcImageLayoutmust be a validVkImageLayout valueVUID-VkCopyImageToBufferInfo2-dstBuffer-parameter
dstBuffermust be a validVkBuffer handleVUID-VkCopyImageToBufferInfo2-pRegions-parameter
pRegionsmust be a valid pointer to an array ofregionCountvalidVkBufferImageCopy2 structuresVUID-VkCopyImageToBufferInfo2-regionCount-arraylength
regionCountmust be greater than0VUID-VkCopyImageToBufferInfo2-commonparent
Both ofdstBuffer, andsrcImagemust have been created, allocated, or retrieved from the sameVkDevice
Document Notes
For more information, see theVulkan Specification.
This page is extracted from the Vulkan Specification.Fixes and changes should be made to the Specification, not directly.