vkCopyAccelerationStructureToMemoryKHR
To copy an acceleration structure to host accessible memory, call:
VkResult vkCopyAccelerationStructureToMemoryKHR(
VkDevice device,
VkDeferredOperationKHR deferredOperation,
const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);
device
is the device which ownspInfo→src
.deferredOperation
is an optional VkDeferredOperationKHR to request deferral for this command.pInfo
is a pointer to a VkCopyAccelerationStructureToMemoryInfoKHR structure defining the copy operation.
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-accelerationStructureHostCommands-03584
The VkPhysicalDeviceAccelerationStructureFeaturesKHR
::accelerationStructureHostCommands
feature must be enabled
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-device-parameter
device
must be a valid VkDevice handle
VUID-vkCopyAccelerationStructureToMemoryKHR-deferredOperation-parameter
If deferredOperation
is not VK_NULL_HANDLE, deferredOperation
must be a valid VkDeferredOperationKHR handle
VUID-vkCopyAccelerationStructureToMemoryKHR-pInfo-parameter
pInfo
must be a valid pointer to a valid VkCopyAccelerationStructureToMemoryInfoKHR structure
VUID-vkCopyAccelerationStructureToMemoryKHR-deferredOperation-parent
If deferredOperation
is a valid handle, it must have been created, allocated, or retrieved from device