vkCopyMemoryToAccelerationStructureKHR(3)

# vkCopyMemoryToAccelerationStructureKHR(3) Manual Page

## Name

vkCopyMemoryToAccelerationStructureKHR - Deserialize an acceleration structure on the host

Loading… please wait.

## C Specification

To copy host accessible memory to an acceleration structure, call:

    // Provided by VK_KHR_acceleration_structure
    VkResult vkCopyMemoryToAccelerationStructureKHR(
        VkDevice                                    device,
        VkDeferredOperationKHR                      deferredOperation,
        const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);

## Parameters

- `device` is the device which owns `pInfo->dst`.

- `deferredOperation` is an optional VkDeferredOperationKHR to request deferral for this command.

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

## Description

This command fulfills the same task as vkCmdCopyMemoryToAccelerationStructureKHR but is executed by the host.

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

Valid Usage

- VUID-vkCopyMemoryToAccelerationStructureKHR-accelerationStructureHostCommands-03583
  The `VkPhysicalDeviceAccelerationStructureFeaturesKHR`::`accelerationStructureHostCommands` feature must be enabled

- VUID-vkCopyMemoryToAccelerationStructureKHR-deferredOperation-03678
  Any previous deferred operation that was associated with `deferredOperation` must be complete

- VUID-vkCopyMemoryToAccelerationStructureKHR-pInfo-03729
  `pInfo->src.hostAddress` must be a valid host pointer

- VUID-vkCopyMemoryToAccelerationStructureKHR-pInfo-03750
  `pInfo->src.hostAddress` must be aligned to 16 bytes

- VUID-vkCopyMemoryToAccelerationStructureKHR-buffer-03730
  The `buffer` used to create `pInfo->dst` must be bound to host-visible device memory

- VUID-vkCopyMemoryToAccelerationStructureKHR-buffer-03782
  The `buffer` used to create `pInfo->dst` must be bound to memory that was not allocated with multiple instances

Valid Usage (Implicit)

- VUID-vkCopyMemoryToAccelerationStructureKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkCopyMemoryToAccelerationStructureKHR-deferredOperation-parameter
  If `deferredOperation` is not VK_NULL_HANDLE, `deferredOperation` must be a valid VkDeferredOperationKHR handle

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

- VUID-vkCopyMemoryToAccelerationStructureKHR-deferredOperation-parent
  If `deferredOperation` is a valid handle, it must have been created, allocated, or retrieved from `device`

Return Codes

On success, this command returns

  - `VK_SUCCESS`

  - `VK_OPERATION_DEFERRED_KHR`

  - `VK_OPERATION_NOT_DEFERRED_KHR`

On failure, this command returns

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

  - `VK_ERROR_OUT_OF_DEVICE_MEMORY`

## See Also

VK_KHR_acceleration_structure, VkCopyMemoryToAccelerationStructureInfoKHR, VkDeferredOperationKHR, VkDevice

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

SPDX-License-Identifier: CC-BY-4.0