To build acceleration structures call:
// Provided by VK_KHR_ray_tracing void vkCmdBuildAccelerationStructureKHR( VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildOffsetInfoKHR* const* ppOffsetInfos);
commandBufferis the command buffer into which the command will be recorded.
infoCountis the number of acceleration structures to build. It specifies the number of the
ppOffsetInfospointers that must be provided.
pInfosis an array of
infoCountVkAccelerationStructureBuildGeometryInfoKHR structures defining the geometry used to build each acceleration structure.
ppOffsetInfosis an array of
infoCountpointers to arrays of VkAccelerationStructureBuildOffsetInfoKHR structures. Each
ppOffsetInfos[i] is an array of
geometryCountVkAccelerationStructureBuildOffsetInfoKHR structures defining dynamic offsets to the addresses where geometry data is stored, as defined by
vkCmdBuildAccelerationStructureKHR command provides the ability to
initiate multiple acceleration structures builds, however there is no
ordering or synchronization implied between any of the individual
acceleration structure builds.
This means that an application cannot build a top-level acceleration structure in the same vkCmdBuildAccelerationStructureKHR call as the associated bottom-level or instance acceleration structures are being built. There also cannot be any memory aliasing between any acceleration structure memories or scratch memories being used by any of the builds.
Accesses to the acceleration structure scratch buffers as identified by the
device addresses must be synchronized with
pipeline stage and an
access type of
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.