vkCmdCopyMemoryToAccelerationStructureKHR(3)

# vkCmdCopyMemoryToAccelerationStructureKHR(3) Manual Page

## Name

vkCmdCopyMemoryToAccelerationStructureKHR - Copy device memory to an acceleration structure

## C Specification

To copy device memory to an acceleration structure call:

    // Provided by VK_KHR_acceleration_structure
    void vkCmdCopyMemoryToAccelerationStructureKHR(
        VkCommandBuffer                             commandBuffer,
        const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);

## Parameters

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

- `pInfo` is a pointer to a VkCopyMemoryToAccelerationStructureInfoKHR structure defining the copy operation.

## Description

Accesses to `pInfo->dst` must be synchronized with the VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR pipeline stage or the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage, and an access type of VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR. Accesses to the buffer indicated by `pInfo->src.deviceAddress` must be synchronized with the VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR pipeline stage or the VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR pipeline stage, and an access type of VK_ACCESS_TRANSFER_READ_BIT.

This command can accept acceleration structures produced by either vkCmdCopyAccelerationStructureToMemoryKHR or vkCopyAccelerationStructureToMemoryKHR.

The structure provided as input to deserialize is as described in vkCmdCopyAccelerationStructureToMemoryKHR, with any acceleration structure handles filled in with the newly-queried handles to bottom level acceleration structures created before deserialization. These do not need to be built at deserialize time, but must be created.

The application must also provide any required micromap addresses in the header as described in `vkCmdCopyAccelerationStructureToMemoryKHR`.

Valid Usage

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-accelerationStructure-08927
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructure` feature must be enabled

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-pInfo-03742
  `pInfo->src.deviceAddress` must be a valid VkDeviceAddress

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-pInfo-03743
  `pInfo->src.deviceAddress` must be aligned to `256` bytes

- VUID-vkCmdCopyAccelerationStructureToMemoryKHR-pInfo-11700
  If the serialized acceleration structure in `pInfo->src` was originally built with a `type` of VK_ACCELERATION_STRUCTURE_TYPE_OPACITY_MICROMAP_KHR, `pInfo->src.deviceAddress` must be aligned to `128` bytes

Valid Usage (Implicit)

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

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-pInfo-parameter
  `pInfo` must be a valid pointer to a valid VkCopyMemoryToAccelerationStructureInfoKHR structure

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

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-renderpass
  This command must only be called outside of a render pass instance

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

- VUID-vkCmdCopyMemoryToAccelerationStructureKHR-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 | Action

Conditional Rendering

vkCmdCopyMemoryToAccelerationStructureKHR is not affected by conditional rendering

## See Also

VK_KHR_acceleration_structure, VkCommandBuffer, VkCopyMemoryToAccelerationStructureInfoKHR

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