Function Prototype

vkCopyImageToImageEXT

Copy image data using the host

To copy data from an image object to another image object using the host, call:

VkResult vkCopyImageToImageEXT(
    VkDevice device,
    const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo);
  • device is the device which owns pCopyImageToImageInfo→srcImage and pCopyImageToImageInfo→dstImage.
  • pCopyImageToImageInfo is a pointer to a VkCopyImageToImageInfoEXT structure describing the copy parameters.

This command is functionally similar to vkCmdCopyImage2, except it is executed on the host. The memory of pCopyImageToImageInfo→srcImage and pCopyImageToImageInfo→dstImage is accessed by the host as if coherent.

If the device has written to the memory of pCopyImageToImageInfo→srcImage, it is not automatically made available to the host. Before this copy command can be called, a memory barrier for this image must have been issued on the device with the second synchronization scope including VK_PIPELINE_STAGE_HOST_BIT and VK_ACCESS_HOST_READ_BIT.

Because queue submissions automatically make host memory visible to the device, there would not be a need for a memory barrier before using the results of this copy operation in pCopyMemoryToImageInfo→dstImage on the device.

Valid Usage (Implicit)

VUID-vkCopyImageToImageEXT-pCopyImageToImageInfo-parameter

pCopyImageToImageInfo must be a valid pointer to a valid VkCopyImageToImageInfoEXT structure