C Specification

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

// Provided by VK_NV_copy_memory_indirect
void vkCmdCopyMemoryIndirectNV(
    VkCommandBuffer                             commandBuffer,
    VkDeviceAddress                             copyBufferAddress,
    uint32_t                                    copyCount,
    uint32_t                                    stride);

Parameters

  • 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.

Description

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-None-07653
    The indirectCopy feature must be enabled

  • 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-parameter
    commandBuffer must be a valid VkCommandBuffer handle

  • VUID-vkCmdCopyMemoryIndirectNV-copyBufferAddress-parameter
    copyBufferAddress must be a valid VkDeviceAddress value

  • VUID-vkCmdCopyMemoryIndirectNV-commandBuffer-recording
    commandBuffer must be in the recording state

  • 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-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_COMPUTE_BIT
VK_QUEUE_GRAPHICS_BIT
VK_QUEUE_TRANSFER_BIT

Action

Conditional Rendering

vkCmdCopyMemoryIndirectNV is not affected by conditional rendering

See Also

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.

Copyright 2014-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0