An acceleration structure has memory requirements for the structure object itself, scratch space for the build, and scratch space for the update.
Scratch space is allocated as a
VkBuffer, so for
pMemoryRequirements->memoryTypeBits values returned by this call must
be filled with zero, and should be ignored by the application.
To query the memory requirements, call:
// Provided by VK_NV_ray_tracing void vkGetAccelerationStructureMemoryRequirementsNV( VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements);
deviceis the logical device on which the acceleration structure was created.
pInfois a pointer to a VkAccelerationStructureMemoryRequirementsInfoNV structure specifying the acceleration structure to get memory requirements for.
pMemoryRequirementsis a pointer to a VkMemoryRequirements2KHR structure in which the requested acceleration structure memory requirements are returned.
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.