vkCmdCopyMemoryToImageIndirectKHR(3)

# vkCmdCopyMemoryToImageIndirectKHR(3) Manual Page

## Name

vkCmdCopyMemoryToImageIndirectKHR - Copy data from a memory region to an image object

## C Specification

To copy data from a memory region to an image object by specifying copy parameters in memory, call:

    // Provided by VK_KHR_copy_memory_indirect
    void vkCmdCopyMemoryToImageIndirectKHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyMemoryToImageIndirectInfoKHR*   pCopyMemoryToImageIndirectInfo);

## Parameters

- `commandBuffer` is the command buffer into which the command will be recorded.

- `pCopyMemoryToImageIndirectInfo` is a pointer to a VkCopyMemoryToImageIndirectInfoKHR structure which contains the copy parameters, including the number of copies to execute and a strided array of VkCopyMemoryToImageIndirectCommandKHR structures.

## Description

Each region specified in the memory referenced by `pCopyMemoryToImageIndirectInfo->copyAddressRange` is copied from the source region to an image region in the destination image. If the destination image is of type VK_IMAGE_TYPE_3D, the starting slice and number of slices to copy are specified in `pImageSubresources->baseArrayLayer` and `pImageSubresources->layerCount` respectively as `imageOffset` and `imageExtent` from VkCopyMemoryToImageIndirectCommandKHR are only available at device execution time. The results are undefined if any of the source and destination regions overlap in memory.

Valid Usage

- VUID-vkCmdCopyMemoryToImageIndirectKHR-indirectMemoryToImageCopy-10947
  The `indirectMemoryToImageCopy` feature must be enabled

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

- VUID-vkCmdCopyMemoryToImageIndirectKHR-commandBuffer-10949
  `commandBuffer` must not be a protected command buffer

Valid Usage (Implicit)

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

- VUID-vkCmdCopyMemoryToImageIndirectKHR-pCopyMemoryToImageIndirectInfo-parameter
  `pCopyMemoryToImageIndirectInfo` must be a valid pointer to a valid VkCopyMemoryToImageIndirectInfoKHR structure

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

- VUID-vkCmdCopyMemoryToImageIndirectKHR-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-vkCmdCopyMemoryToImageIndirectKHR-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdCopyMemoryToImageIndirectKHR-suspended
  This command must not be called between suspended render pass instances

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

vkCmdCopyMemoryToImageIndirectKHR is not affected by conditional rendering

## See Also

VK_KHR_copy_memory_indirect, VkCommandBuffer, VkCopyMemoryToImageIndirectInfoKHR

## 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-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0