C Specification
To create acceleration structures, call:
// Provided by VK_NV_ray_tracing
VkResult vkCreateAccelerationStructureNV(
VkDevice device,
const VkAccelerationStructureCreateInfoNV* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkAccelerationStructureNV* pAccelerationStructure);
Parameters
-
device
is the logical device that creates the buffer object. -
pCreateInfo
is a pointer to a VkAccelerationStructureCreateInfoNV structure containing parameters affecting creation of the acceleration structure. -
pAllocator
controls host memory allocation as described in the Memory Allocation chapter. -
pAccelerationStructure
is a pointer to a VkAccelerationStructureNV handle in which the resulting acceleration structure object is returned.
Description
Similarly to other objects in Vulkan, the acceleration structure creation
merely creates an object with a specific “shape” as specified by the
information in VkAccelerationStructureInfoNV and compactedSize
in pCreateInfo
.
Populating the data in the object after allocating and binding memory is
done with vkCmdBuildAccelerationStructureNV and
vkCmdCopyAccelerationStructureNV.
Acceleration structure creation uses the count and type information from the geometries, but does not use the data references in the structures.
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.