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
-
sType
is the type of this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
srcBuffer
is the source buffer. -
dstImage
is the destination image. -
dstImageLayout
is the layout of the destination image subresources for the copy. -
regionCount
is the number of regions to copy. -
pRegions
is 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 ofpRegions
does not contain VkCopyCommandTransformInfoQCOM in itspNext
chain, it must be a region that is contained within the specifiedimageSubresource
ofdstImage
-
VUID-VkCopyBufferToImageInfo2KHR-pRegions-04554
If the image region specified by each element ofpRegions
contains VkCopyCommandTransformInfoQCOM in itspNext
chain, the rotated destination region as described in https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#copies-buffers-images-rotation-addressing must be contained withindstImage
-
VUID-VkCopyBufferToImageInfo2KHR-pRegions-04555
If any element ofpRegions
contains VkCopyCommandTransformInfoQCOM in itspNext
chain, thendstImage
must have a 1x1x1 texel block extent -
VUID-VkCopyBufferToImageInfo2KHR-pRegions-06203
If any element ofpRegions
contains VkCopyCommandTransformInfoQCOM in itspNext
chain, thendstImage
must be of typeVK_IMAGE_TYPE_2D
-
VUID-VkCopyBufferToImageInfo2KHR-pRegions-06204
If any element ofpRegions
contains VkCopyCommandTransformInfoQCOM in itspNext
chain, thendstImage
must not have a multi-planar format
-
VUID-VkCopyBufferToImageInfo2-pRegions-00171
srcBuffer
must 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
srcBuffer
must have been created withVK_BUFFER_USAGE_TRANSFER_SRC_BIT
usage flag -
VUID-VkCopyBufferToImageInfo2-dstImage-01997
The format features ofdstImage
must containVK_FORMAT_FEATURE_TRANSFER_DST_BIT
-
VUID-VkCopyBufferToImageInfo2-srcBuffer-00176
IfsrcBuffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object -
VUID-VkCopyBufferToImageInfo2-dstImage-00177
dstImage
must have been created withVK_IMAGE_USAGE_TRANSFER_DST_BIT
usage flag -
VUID-VkCopyBufferToImageInfo2-dstImageLayout-00180
dstImageLayout
must specify the layout of the image subresources ofdstImage
specified inpRegions
at the time this command is executed on aVkDevice
-
VUID-VkCopyBufferToImageInfo2-dstImageLayout-01396
dstImageLayout
must beVK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
,VK_IMAGE_LAYOUT_GENERAL
, orVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
-
VUID-VkCopyBufferToImageInfo2-pRegions-07931
If VK_EXT_depth_range_unrestricted is not enabled, for each element ofpRegions
whoseimageSubresource
contains a depth aspect, the data insrcBuffer
must be in the range [0,1]
-
VUID-VkCopyBufferToImageInfo2-dstImage-07966
IfdstImage
is non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a singleVkDeviceMemory
object -
VUID-VkCopyBufferToImageInfo2-imageSubresource-07967
TheimageSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified in VkImageCreateInfo whendstImage
was created -
VUID-VkCopyBufferToImageInfo2-imageSubresource-07968
TheimageSubresource.baseArrayLayer
+imageSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified in VkImageCreateInfo whendstImage
was created -
VUID-VkCopyBufferToImageInfo2-dstImage-07969
dstImage
must not have been created withflags
containingVK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT
-
VUID-VkCopyBufferToImageInfo2-dstImage-07979
IfdstImage
is of typeVK_IMAGE_TYPE_1D
, then for each element ofpRegions
,imageOffset.y
must be0
andimageExtent.height
must be1
-
VUID-VkCopyBufferToImageInfo2-imageOffset-00200
For each element ofpRegions
,imageOffset.z
and (imageExtent.depth
+imageOffset.z
) must both be greater than or equal to0
and less than or equal to the depth of the specifiedimageSubresource
ofdstImage
-
VUID-VkCopyBufferToImageInfo2-dstImage-07980
IfdstImage
is of typeVK_IMAGE_TYPE_1D
orVK_IMAGE_TYPE_2D
, then for each element ofpRegions
,imageOffset.z
must be0
andimageExtent.depth
must be1
-
VUID-VkCopyBufferToImageInfo2-bufferRowLength-00203
For each element ofpRegions
,bufferRowLength
must be a multiple of the texel block extent width of the VkFormat ofdstImage
-
VUID-VkCopyBufferToImageInfo2-bufferImageHeight-00204
For each element ofpRegions
,bufferImageHeight
must be a multiple of the texel block extent height of the VkFormat ofdstImage
-
VUID-VkCopyBufferToImageInfo2-pRegions-07274
For each element ofpRegions
,imageOffset.x
must be a multiple of the texel block extent width of the VkFormat ofdstImage
-
VUID-VkCopyBufferToImageInfo2-pRegions-07275
For each element ofpRegions
,imageOffset.y
must be a multiple of the texel block extent height of the VkFormat ofdstImage
-
VUID-VkCopyBufferToImageInfo2-pRegions-07276
For each element ofpRegions
,imageOffset.z
must be a multiple of the texel block extent depth of the VkFormat ofdstImage
-
VUID-VkCopyBufferToImageInfo2-imageExtent-00207
For each element ofpRegions
, if the sum ofimageOffset.x
andextent.width
does not equal the width of the subresource specified bysrcSubresource
,extent.width
must be a multiple of the texel block extent width of the VkFormat ofdstImage
-
VUID-VkCopyBufferToImageInfo2-imageExtent-00208
For each element ofpRegions
, if the sum ofimageOffset.y
andextent.height
does not equal the height of the subresource specified bysrcSubresource
,extent.height
must be a multiple of the texel block extent height of the VkFormat ofdstImage
-
VUID-VkCopyBufferToImageInfo2-imageExtent-00209
For each element ofpRegions
, if the sum ofimageOffset.z
andextent.depth
does not equal the depth of the subresource specified bysrcSubresource
,extent.depth
must be a multiple of the texel block extent depth of the VkFormat ofdstImage
-
VUID-VkCopyBufferToImageInfo2-aspectMask-00211
For each element ofpRegions
,imageSubresource.aspectMask
must specify aspects present indstImage
-
VUID-VkCopyBufferToImageInfo2-dstImage-07981
IfdstImage
has a VkFormat with two planes then for each element ofpRegions
,imageSubresource.aspectMask
must beVK_IMAGE_ASPECT_PLANE_0_BIT
orVK_IMAGE_ASPECT_PLANE_1_BIT
-
VUID-VkCopyBufferToImageInfo2-dstImage-07982
IfdstImage
has a VkFormat with three planes then for each element ofpRegions
,imageSubresource.aspectMask
must beVK_IMAGE_ASPECT_PLANE_0_BIT
,VK_IMAGE_ASPECT_PLANE_1_BIT
, orVK_IMAGE_ASPECT_PLANE_2_BIT
-
VUID-VkCopyBufferToImageInfo2-dstImage-07983
IfdstImage
is of typeVK_IMAGE_TYPE_3D
, for each element ofpRegions
,imageSubresource.baseArrayLayer
must be0
andimageSubresource.layerCount
must be1
-
VUID-VkCopyBufferToImageInfo2-pRegions-07277
For each element ofpRegions
,bufferRowLength
divided by the texel block extent width and then multiplied by the texel block size ofdstImage
must be less than or equal to 231-1
-
VUID-VkCopyBufferToImageInfo2-dstImage-07975
IfdstImage
does not have either a depth/stencil or a multi-planar format, then for each element ofpRegions
,bufferOffset
must be a multiple of the texel block size -
VUID-VkCopyBufferToImageInfo2-dstImage-07976
IfdstImage
has a multi-planar format, then for each element ofpRegions
,bufferOffset
must be a multiple of the element size of the compatible format for the format and theaspectMask
of theimageSubresource
as defined in [formats-compatible-planes] -
VUID-VkCopyBufferToImageInfo2-dstImage-07978
IfdstImage
has a depth/stencil format, thebufferOffset
member of any element ofpRegions
must be a multiple of4
-
VUID-VkCopyBufferToImageInfo2-pRegions-06223
For each element ofpRegions
not containingVkCopyCommandTransformInfoQCOM
in itspNext
chain,imageOffset.x
and (imageExtent.width
+imageOffset.x
) must both be greater than or equal to0
and less than or equal to the width of the specifiedimageSubresource
ofdstImage
-
VUID-VkCopyBufferToImageInfo2-pRegions-06224
For each element ofpRegions
not containingVkCopyCommandTransformInfoQCOM
in itspNext
chain,imageOffset.y
and (imageExtent.height
+imageOffset.y
) must both be greater than or equal to0
and less than or equal to the height of the specifiedimageSubresource
ofdstImage
-
VUID-VkCopyBufferToImageInfo2-sType-sType
sType
must beVK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2
-
VUID-VkCopyBufferToImageInfo2-pNext-pNext
pNext
must beNULL
-
VUID-VkCopyBufferToImageInfo2-srcBuffer-parameter
srcBuffer
must be a valid VkBuffer handle -
VUID-VkCopyBufferToImageInfo2-dstImage-parameter
dstImage
must be a valid VkImage handle -
VUID-VkCopyBufferToImageInfo2-dstImageLayout-parameter
dstImageLayout
must be a valid VkImageLayout value -
VUID-VkCopyBufferToImageInfo2-pRegions-parameter
pRegions
must be a valid pointer to an array ofregionCount
valid VkBufferImageCopy2 structures -
VUID-VkCopyBufferToImageInfo2-regionCount-arraylength
regionCount
must be greater than0
-
VUID-VkCopyBufferToImageInfo2-commonparent
Both ofdstImage
, andsrcBuffer
must 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.