C Specification
To get the build sizes for a micromap, call:
// Provided by VK_EXT_opacity_micromap
void vkGetMicromapBuildSizesEXT(
VkDevice device,
VkAccelerationStructureBuildTypeKHR buildType,
const VkMicromapBuildInfoEXT* pBuildInfo,
VkMicromapBuildSizesInfoEXT* pSizeInfo);
Parameters
-
deviceis the logical device that will be used for creating the micromap. -
buildTypedefines whether host or device operations (or both) are being queried for. -
pBuildInfois a pointer to a VkMicromapBuildInfoEXT structure describing parameters of a build operation. -
pSizeInfois a pointer to a VkMicromapBuildSizesInfoEXT structure which returns the size required for a micromap and the sizes required for the scratch buffers, given the build parameters.
Description
The dstMicromap and mode members of pBuildInfo are
ignored.
Any VkDeviceOrHostAddressKHR members of pBuildInfo are ignored
by this command.
A micromap created with the micromapSize returned by this command
supports any build with a VkMicromapBuildInfoEXT structure subject to
the following properties:
-
The build command is a host build command, and
buildTypeisVK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHRorVK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR -
The build command is a device build command, and
buildTypeisVK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHRorVK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR -
-
Its
type, andflagsmembers are equal topBuildInfo->typeandpBuildInfo->flags, respectively. -
The sum of usage information in either
pUsageCountsorppUsageCountsis equal to the sum of usage information in eitherpBuildInfo->pUsageCountsorpBuildInfo->ppUsageCounts.
-
Similarly, the buildScratchSize value will support any build command
specifying the VK_BUILD_MICROMAP_MODE_BUILD_EXT mode under the
above conditions.
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.