C Specification
To create an acceleration structure using a device address, call:
// Provided by VK_KHR_acceleration_structure with VK_KHR_device_address_commands
VkResult vkCreateAccelerationStructure2KHR(
VkDevice device,
const VkAccelerationStructureCreateInfo2KHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkAccelerationStructureKHR* pAccelerationStructure);
Parameters
-
deviceis the logical device that creates the acceleration structure object. -
pCreateInfois a pointer to a VkAccelerationStructureCreateInfo2KHR structure containing parameters affecting creation of the acceleration structure. -
pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter. -
pAccelerationStructureis a pointer to aVkAccelerationStructureKHRhandle in which the resulting acceleration structure object is returned.
Description
Similar to other objects in Vulkan, the acceleration structure creation merely creates an object with a specific “shape”. The type and quantity of geometry that can be built into an acceleration structure is determined by the parameters of VkAccelerationStructureCreateInfo2KHR.
The acceleration structure data is stored in the object referred to by
VkAccelerationStructureCreateInfo2KHR::addressRange.address.
Once the VkAccelerationStructureKHR object has been created, it must
be populated by acceleration structure build or acceleration structure copy
commands such as vkCmdBuildAccelerationStructuresKHR and
vkCmdCopyAccelerationStructureKHR.
Acceleration structures created with this command must not be used by host
commands.
|
Note
|
The expected usage for a trace capture/replay tool is that it will serialize
and later deserialize the acceleration structure data using acceleration
structure copy commands.
During capture the tool will use
vkCmdCopyAccelerationStructureToMemoryKHR with a |
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.