Function Prototype

vkCmdCopyMemoryIndirectNV

Copy data between memory regions

To copy data between two memory regions by specifying copy parameters indirectly in memory, call:

void vkCmdCopyMemoryIndirectNV(
    VkCommandBuffer commandBuffer,
    VkDeviceAddress copyBufferAddress,
    uint32_t copyCount,
    uint32_t stride);
  • commandBuffer is the command buffer into which the command will be recorded.
  • copyBufferAddress is the memory address specifying the copy parameters. It is laid out as an array of VkCopyMemoryIndirectCommandNV structures.
  • copyCount is the number of copies to execute, and can be zero.
  • stride is the stride in bytes between successive sets of copy parameters.

Each region read from copyBufferAddress is copied from the source region to the specified destination region. The results are undefined if any of the source and destination regions overlap in memory.

Valid Usage

VUID-vkCmdCopyMemoryIndirectNV-copyBufferAddress-07654

copyBufferAddress must be 4 byte aligned

VUID-vkCmdCopyMemoryIndirectNV-stride-07655

stride must be a multiple of 4 and must be greater than or equal to sizeof(VkCopyMemoryIndirectCommandNV)

VUID-vkCmdCopyMemoryIndirectNV-commandBuffer-07656

The VkCommandPool that commandBuffer was allocated from must support at least one of the queue types specified in VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR::supportedQueues

VUID-vkCmdCopyMemoryIndirectNV-copyBufferAddress-10946

Any of the source or destination memory regions specified in copyBufferAddress must not overlap with any of the specified destination memory regions

Valid Usage (Implicit)

VUID-vkCmdCopyMemoryIndirectNV-commandBuffer-cmdpool

The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, or VK_QUEUE_TRANSFER_BIT operations

VUID-vkCmdCopyMemoryIndirectNV-renderpass

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

VUID-vkCmdCopyMemoryIndirectNV-suspended

This command must not be called between suspended render pass instances

VUID-vkCmdCopyMemoryIndirectNV-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