vkCmdCopyMemoryToImageKHR
To copy data from an image to memory ranges, call:
void vkCmdCopyMemoryToImageKHR(
VkCommandBuffer commandBuffer,
const VkCopyDeviceMemoryImageInfoKHR* pCopyMemoryInfo);
pub fn cmd_copy_memory_to_image_khr(
command_buffer: vk::CommandBuffer,
p_copy_memory_info: *const vk::CopyDeviceMemoryImageInfoKHR,
);
commandBufferis the command buffer into which the command will be recorded.pCopyMemoryInfoa pointer to a VkCopyDeviceMemoryImageInfoKHR structure describing the copies to perform.
Valid Usage
VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-13102
If commandBuffer is an unprotected command buffer and
protectedNoFault is not supported,
the addressCopyFlags member of all elements of
pCopyMemoryInfo→pRegions must not include
VK_ADDRESS_COMMAND_PROTECTED_BIT_KHR
VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-13103
If commandBuffer is an unprotected command buffer and
protectedNoFault is not supported,
pCopyMemoryInfo→image must not have been created with
VK_IMAGE_CREATE_PROTECTED_BIT
VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-13104
If the queue family used to create the VkCommandPool which
commandBuffer was allocated from does not support
VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT, the
addressRange.pname:address member of any element of
pCopyMemoryInfo→pRegions must be a multiple of 4
VUID-vkCmdCopyMemoryToImageKHR-imageOffset-13105
The imageOffset and imageExtent members of each element of
pCopyMemoryInfo→pRegions must respect the image transfer
granularity requirements of commandBuffer’s command pool’s queue
family, as described in VkQueueFamilyProperties
VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-13106
If the queue family used to create the VkCommandPool which
commandBuffer was allocated from does not support
VK_QUEUE_GRAPHICS_BIT, for each element of
pCopyMemoryInfo→pRegions, the aspectMask member of
imageSubresource must not be VK_IMAGE_ASPECT_DEPTH_BIT or
VK_IMAGE_ASPECT_STENCIL_BIT
VUID-vkCmdCopyMemoryToImageKHR-imageLayout-13019
The imageLayout member of each element of
pCopyMemoryInfo→pRegions must be VK_IMAGE_LAYOUT_GENERAL,
VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,
or VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
VUID-vkCmdCopyMemoryToImageKHR-pCopyMemoryInfo-13020
pCopyMemoryInfo→image must have been created with
VK_IMAGE_USAGE_TRANSFER_DST_BIT
VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-13021
If commandBuffer is a protected command buffer and
protectedNoFault is not supported,
pCopyMemoryInfo→image must have been created with
VK_IMAGE_CREATE_PROTECTED_BIT
VUID-vkCmdCopyMemoryToImageKHR-None-13022
If VK_EXT_depth_range_unrestricted is not enabled, for
each element of pCopyMemoryInfo→pRegions whose
imageSubresource contains a depth aspect, each data element in its
addressRange must be in the range [0,1]
VUID-vkCmdCopyMemoryToImageKHR-addressRange-13128
At least one buffer containing the total address range specified by the
addressRange member of each element of
pCopyMemoryInfo→pRegions must have been created with
VK_BUFFER_USAGE_TRANSFER_SRC_BIT
Valid Usage (Implicit)
VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-parameter
commandBuffer must be a valid VkCommandBuffer handle
VUID-vkCmdCopyMemoryToImageKHR-pCopyMemoryInfo-parameter
If pCopyMemoryInfo is not NULL, pCopyMemoryInfo must be a valid pointer to a valid VkCopyDeviceMemoryImageInfoKHR structure
VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-recording
commandBuffer must be in the recording state
VUID-vkCmdCopyMemoryToImageKHR-commandBuffer-cmdpool
The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_TRANSFER_BIT operations
VUID-vkCmdCopyMemoryToImageKHR-renderpass
This command must only be called outside of a render pass instance
VUID-vkCmdCopyMemoryToImageKHR-suspended
This command must not be called between suspended render pass instances
VUID-vkCmdCopyMemoryToImageKHR-videocoding
This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized