C Specification

To copy or compact an acceleration structure on the host, call:

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

Parameters

Description

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

Valid Usage
  • VUID-vkCopyAccelerationStructureKHR-deferredOperation-03677
    If deferredOperation is not VK_NULL_HANDLE, it must be a valid VkDeferredOperationKHR object

  • VUID-vkCopyAccelerationStructureKHR-deferredOperation-03678
    Any previous deferred operation that was associated with deferredOperation must be complete

  • VUID-vkCopyAccelerationStructureKHR-buffer-03727
    The buffer used to create pInfo->src must be bound to host-visible device memory

  • VUID-vkCopyAccelerationStructureKHR-buffer-03728
    The buffer used to create pInfo->dst must be bound to host-visible device memory

  • VUID-vkCopyAccelerationStructureKHR-accelerationStructureHostCommands-03582
    The VkPhysicalDeviceAccelerationStructureFeaturesKHR::accelerationStructureHostCommands feature must be enabled

  • VUID-vkCopyAccelerationStructureKHR-buffer-03780
    The buffer used to create pInfo->src must be bound to memory that was not allocated with multiple instances

  • VUID-vkCopyAccelerationStructureKHR-buffer-03781
    The buffer used to create pInfo->dst must be bound to memory that was not allocated with multiple instances

Valid Usage (Implicit)
  • VUID-vkCopyAccelerationStructureKHR-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkCopyAccelerationStructureKHR-deferredOperation-parameter
    If deferredOperation is not VK_NULL_HANDLE, deferredOperation must be a valid VkDeferredOperationKHR handle

  • VUID-vkCopyAccelerationStructureKHR-pInfo-parameter
    pInfo must be a valid pointer to a valid VkCopyAccelerationStructureInfoKHR structure

  • VUID-vkCopyAccelerationStructureKHR-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

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 (c) 2014-2020 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0