VkBuildAccelerationStructureFlagBitsKHR(3)

# VkBuildAccelerationStructureFlagBitsKHR(3) Manual Page

## Name

VkBuildAccelerationStructureFlagBitsKHR - Bitmask specifying additional parameters for acceleration structure builds

Loading… please wait.

## C Specification

Bits which can be set in VkAccelerationStructureBuildGeometryInfoKHR::`flags` or VkAccelerationStructureInfoNV::`flags` specifying additional parameters for acceleration structure builds, are:

    // Provided by VK_KHR_acceleration_structure
    typedef enum VkBuildAccelerationStructureFlagBitsKHR {
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR = 0x00000001,
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR = 0x00000002,
        VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR = 0x00000004,
        VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR = 0x00000008,
        VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR = 0x00000010,
      // Provided by VK_NV_ray_tracing_motion_blur
        VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV = 0x00000020,
      // Provided by VK_EXT_opacity_micromap
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT = 0x00000040,
      // Provided by VK_EXT_opacity_micromap
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT = 0x00000080,
      // Provided by VK_EXT_opacity_micromap
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT = 0x00000100,
    #ifdef VK_ENABLE_BETA_EXTENSIONS
      // Provided by VK_NV_displacement_micromap
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV = 0x00000200,
    #endif
      // Provided by VK_KHR_ray_tracing_position_fetch
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR = 0x00000800,
      // Provided by VK_NV_ray_tracing
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR,
      // Provided by VK_NV_ray_tracing
        VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR,
    } VkBuildAccelerationStructureFlagBitsKHR;

or the equivalent

    // Provided by VK_NV_ray_tracing
    typedef VkBuildAccelerationStructureFlagBitsKHR VkBuildAccelerationStructureFlagBitsNV;

## Description

- `VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR` indicates that the specified acceleration structure can be updated with a `mode` of `VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR` in VkAccelerationStructureBuildGeometryInfoKHR or an `update` of `VK_TRUE` in vkCmdBuildAccelerationStructureNV .

- `VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR` indicates that the specified acceleration structure can act as the source for a copy acceleration structure command with `mode` of `VK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR` to produce a compacted acceleration structure.

- `VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR` indicates that the given acceleration structure build should prioritize trace performance over build time.

- `VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR` indicates that the given acceleration structure build should prioritize build time over trace performance.

- `VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR` indicates that this acceleration structure should minimize the size of the scratch memory and the final result acceleration structure, potentially at the expense of build time or trace performance.

- `VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT` indicates that the opacity micromaps associated with the specified acceleration structure may change with an acceleration structure update.

- `VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT` indicates that the data of the opacity micromaps associated with the specified acceleration structure may change with an acceleration structure update.

- `VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT` indicates that the specified acceleration structure may be referenced in an instance with `VK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT` set.

- `VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR` indicates that the specified acceleration structure can be used when fetching the vertex positions of a hit triangle.

- `VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV` indicates that the displacement micromaps associated with the specified acceleration structure may change with an acceleration structure update.

| Note `VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR` and `VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR` may take more time and memory than a normal build, and so should only be used when those features are needed.

## See Also

VK_KHR_acceleration_structure, VK_NV_ray_tracing, VkBuildAccelerationStructureFlagsKHR

## 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.

## Copyright

Copyright 2014-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0