vkCmdCopyMemoryToImageKHR(3)

Name

vkCmdCopyMemoryToImageKHR - Copy data from memory ranges to an image

C Specification

To copy data from an image to memory ranges, call:

// Provided by VK_KHR_device_address_commands
void vkCmdCopyMemoryToImageKHR(
    VkCommandBuffer                             commandBuffer,
    const VkCopyDeviceMemoryImageInfoKHR*       pCopyMemoryInfo);

Parameters

  • commandBuffer is the command buffer into which the command will be recorded.

  • pCopyMemoryInfo a pointer to a VkCopyDeviceMemoryImageInfoKHR structure describing the copies to perform.

Description

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

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 commandBuffer must be externally synchronized

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

Command Properties
Command Buffer Levels Render Pass Scope Video Coding Scope Supported Queue Types Command Type

Primary
Secondary

Outside

Outside

VK_QUEUE_TRANSFER_BIT

Action

Conditional Rendering

vkCmdCopyMemoryToImageKHR is not affected by conditional rendering

Document Notes

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.