vkCmdCopyAccelerationStructureKHR
To copy an acceleration structure call:
void vkCmdCopyAccelerationStructureKHR(
VkCommandBuffer commandBuffer,
const VkCopyAccelerationStructureInfoKHR* pInfo);
commandBufferis the command buffer into which the command will be recorded.pInfois a pointer to a VkCopyAccelerationStructureInfoKHR structure defining the copy operation.
This command copies the pInfo→src acceleration structure to the
pInfo→dst acceleration structure in the manner specified by
pInfo→mode.
Accesses to pInfo→src and pInfo→dst must be
synchronized with the
VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_COPY_BIT_KHR
pipeline stage or the
VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR
pipeline stage, and an
access type of
VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR or
VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR as appropriate.
Valid Usage
VUID-vkCmdCopyAccelerationStructureKHR-accelerationStructure-08925
The VkPhysicalDeviceAccelerationStructureFeaturesKHR::accelerationStructure
feature must be enabled
VUID-vkCmdCopyAccelerationStructureKHR-buffer-03737
The buffer used to create pInfo→src must be bound to
device memory
VUID-vkCmdCopyAccelerationStructureKHR-buffer-03738
The buffer used to create pInfo→dst must be bound to
device memory
Valid Usage (Implicit)
VUID-vkCmdCopyAccelerationStructureKHR-commandBuffer-parameter
commandBuffer must be a valid VkCommandBuffer handle
VUID-vkCmdCopyAccelerationStructureKHR-pInfo-parameter
pInfo must be a valid pointer to a valid VkCopyAccelerationStructureInfoKHR structure
VUID-vkCmdCopyAccelerationStructureKHR-commandBuffer-recording
commandBuffer must be in the recording state
VUID-vkCmdCopyAccelerationStructureKHR-commandBuffer-cmdpool
The VkCommandPool that commandBuffer was allocated from must support compute operations
VUID-vkCmdCopyAccelerationStructureKHR-renderpass
This command must only be called outside of a render pass instance
VUID-vkCmdCopyAccelerationStructureKHR-videocoding
This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized ::