Function Prototype

vkCmdCopyImage2

Copy data between images

To copy data between image objects, call:

void vkCmdCopyImage2KHR(
    VkCommandBuffer commandBuffer,
    const VkCopyImageInfo2* pCopyImageInfo);
  • commandBuffer is the command buffer into which the command will be recorded.
  • pCopyImageInfo is a pointer to a VkCopyImageInfo2 structure describing the copy parameters.

This command is functionally identical to vkCmdCopyImage, but includes extensible sub-structures that include sType and pNext parameters, allowing them to be more easily extended.

Valid Usage (Implicit)

VUID-vkCmdCopyImage2-pCopyImageInfo-parameter

pCopyImageInfo must be a valid pointer to a valid VkCopyImageInfo2 structure

VUID-vkCmdCopyImage2-commandBuffer-cmdpool

The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations

VUID-vkCmdCopyImage2-renderpass

This command must only be called outside of a render pass instance

VUID-vkCmdCopyImage2-videocoding

This command must only be called outside of a video coding scope

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized ::