To copy data from a buffer object to an image object, call:
void vkCmdCopyBufferToImage( VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
commandBufferis the command buffer into which the command will be recorded.
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 VkBufferImageCopy structures specifying the regions to copy.
Each region in
pRegions is copied from the specified region of the
source buffer to the specified region of the destination image.
If the format of
dstImage is a
multi-planar image format),
regions of each plane to be a target of a copy must be specified separately
pRegions member of the VkBufferImageCopy structure.
In this case, the
imageSubresource must be
For the purposes of
vkCmdCopyBufferToImage, each plane of a
multi-planar image is treated as having the format listed in
https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#formats-compatible-planes for the plane identified by the
aspectMask of the corresponding subresource.
This applies both to VkFormat and to coordinates used in the copy,
which correspond to texels in the plane rather than how these texels map
to coordinates in the image as a whole.
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.
Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.