C Specification
To create a micromap, call:
// Provided by VK_EXT_opacity_micromap
VkResult vkCreateMicromapEXT(
VkDevice device,
const VkMicromapCreateInfoEXT* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkMicromapEXT* pMicromap);
Parameters
-
device
is the logical device that creates the acceleration structure object. -
pCreateInfo
is a pointer to a VkMicromapCreateInfoEXT structure containing parameters affecting creation of the micromap. -
pAllocator
controls host memory allocation as described in the Memory Allocation chapter. -
pMicromap
is a pointer to aVkMicromapEXT
handle in which the resulting micromap object is returned.
Description
Similar to other objects in Vulkan, the micromap creation merely creates an object with a specific “shape”. The type and quantity of geometry that can be built into a micromap is determined by the parameters of VkMicromapCreateInfoEXT.
Populating the data in the object after allocating and binding memory is done with commands such as vkCmdBuildMicromapsEXT, vkBuildMicromapsEXT, vkCmdCopyMicromapEXT, and vkCopyMicromapEXT.
The input buffers passed to micromap build commands will be referenced by the implementation for the duration of the command. Micromaps must be fully self-contained. The application may re-use or free any memory which was used by the command as an input or as scratch without affecting the results of a subsequent acceleration structure build using the micromap or traversal of that acceleration structure.
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.