Function Prototype

vkCopyAccelerationStructureToMemoryKHR

Serialize an acceleration structure on the host

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

VkResult vkCopyAccelerationStructureToMemoryKHR(
    VkDevice device,
    VkDeferredOperationKHR deferredOperation,
    const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);

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

This command produces the same results as vkCmdCopyAccelerationStructureToMemoryKHR, but writes its result directly to a host pointer, and is executed on the host rather than the device. The output may not necessarily be bit-for-bit identical, but it can be equally used by either vkCmdCopyMemoryToAccelerationStructureKHR or vkCopyMemoryToAccelerationStructureKHR.

Valid Usage

VUID-vkCopyAccelerationStructureToMemoryKHR-deferredOperation-03678

Any previous deferred operation that was associated with deferredOperation must be complete

VUID-vkCopyAccelerationStructureToMemoryKHR-buffer-03731

The buffer used to create pInfo→src must be bound to host-visible device memory

VUID-vkCopyAccelerationStructureToMemoryKHR-pInfo-03732

pInfo→dst.hostAddress must be a valid host pointer

VUID-vkCopyAccelerationStructureToMemoryKHR-pInfo-03751

pInfo→dst.hostAddress must be aligned to 16 bytes

VUID-vkCopyAccelerationStructureToMemoryKHR-buffer-03783

The buffer used to create pInfo→src must be bound to memory that was not allocated with multiple instances

Valid Usage (Implicit)

VUID-vkCopyAccelerationStructureToMemoryKHR-deferredOperation-parent

If deferredOperation is a valid handle, it must have been created, allocated, or retrieved from device