# vkCmdCopyMemoryIndirectNV(3) Manual Page

## Name

vkCmdCopyMemoryIndirectNV - Copy data between memory regions

Loading… please wait.

## C Specification

To copy data between two memory regions by specifying copy parameters indirectly in a buffer, 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 buffer address specifying the copy parameters. This buffer is laid out in memory 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 VkPhysicalDeviceCopyMemoryIndirectPropertiesNV::`supportedQueues`

Valid Usage (Implicit)

- VUID-vkCmdCopyMemoryIndirectNV-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

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

- VUID-vkCmdCopyMemoryIndirectNV-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support transfer, graphics, or compute 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 | Transfer Graphics Compute | Action

## See Also

VK_NV_copy_memory_indirect, VkCommandBuffer, VkDeviceAddress

## 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

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0