C Specification

// Provided by VK_KHR_ray_tracing
VkResult vkCopyMemoryToAccelerationStructureKHR(
    VkDevice                                    device,
    const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);

Parameters

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

Description

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

If the VkDeferredOperationInfoKHR structure is included in the pNext chain of the VkCopyMemoryToAccelerationStructureInfoKHR structure, the operation of this command is deferred, as defined in the Deferred Host Operations chapter.

Valid Usage
  • VUID-vkCopyMemoryToAccelerationStructureKHR-None-03442
    All VkAccelerationStructureKHR objects referenced by this command must be bound to host-visible memory

  • VUID-vkCopyMemoryToAccelerationStructureKHR-None-03443
    All VkDeviceOrHostAddressConstKHR referenced by this command must contain valid host pointers

  • VUID-vkCopyMemoryToAccelerationStructureKHR-rayTracingHostAccelerationStructureCommands-03444
    the VkPhysicalDeviceRayTracingFeaturesKHR::rayTracingHostAccelerationStructureCommands feature must be enabled

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

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

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