# vkCmdCopyAccelerationStructureNV(3) Manual Page

## Name

vkCmdCopyAccelerationStructureNV - Copy an acceleration structure

## C Specification

To copy an acceleration structure call:

    void vkCmdCopyAccelerationStructureNV(
        VkCommandBuffer                             commandBuffer,
        VkAccelerationStructureKHR                  dst,
        VkAccelerationStructureKHR                  src,
        VkCopyAccelerationStructureModeKHR          mode);

## Parameters

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

- `dst` is a pointer to the target acceleration structure for the copy.

- `src` is a pointer to the source acceleration structure for the copy.

- `mode` is a VkCopyAccelerationStructureModeKHR value specifying additional operations to perform during the copy.

## Description

Valid Usage

- [[VUID-{refpage}-mode-03410]] `mode` must be `VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR` or `VK_COPY_ACCELERATION_STRUCTURE_MODE_CLONE_KHR`

- [[VUID-{refpage}-src-03411]] `src` must have been built with `VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR` if `mode` is `VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR`

Valid Usage (Implicit)

- `commandBuffer` must be a valid VkCommandBuffer handle

- `dst` must be a valid VkAccelerationStructureKHR handle

- `src` must be a valid VkAccelerationStructureKHR handle

- `mode` must be a valid VkCopyAccelerationStructureModeKHR value

- `commandBuffer` must be in the recording state

- The `VkCommandPool` that `commandBuffer` was allocated from must support compute operations

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

- Each of `commandBuffer`, `dst`, and `src` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type
--- | --- | --- | ---
Primary Secondary | Outside | Compute |

## See Also

VkAccelerationStructureKHR, VkCommandBuffer, VkCopyAccelerationStructureModeKHR

## 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 (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.