Function Prototype

vkCopyImageToMemoryEXT

Copy image data into host memory

To copy data from an image object to host memory, call:

VkResult vkCopyImageToMemoryEXT(
    VkDevice device,
    const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo);
  • device is the device which owns pCopyImageToMemoryInfo→srcImage.
  • pCopyImageToMemoryInfo is a pointer to a VkCopyImageToMemoryInfoEXT structure describing the copy parameters.

This command is functionally similar to vkCmdCopyImageToBuffer2, except it is executed on the host and writes to host memory instead of a buffer. The memory of pCopyImageToMemoryInfo→srcImage is accessed by the host as if coherent.

If the device has written to the image memory, 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.

Valid Usage (Implicit)

VUID-vkCopyImageToMemoryEXT-pCopyImageToMemoryInfo-parameter

pCopyImageToMemoryInfo must be a valid pointer to a valid VkCopyImageToMemoryInfoEXT structure