Enum
VkBuildAccelerationStructureFlagBitsKHR
Bitmask specifying additional parameters for acceleration structure builds
Bits which can be set in
VkAccelerationStructureBuildGeometryInfoKHR::flags
or
VkAccelerationStructureInfoNV::flags
specifying additional parameters for acceleration structure builds, are:
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 extensions
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR,
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR,
VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR,
VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR,
VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_NV = VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR,
VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV = 0x00000020,
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXT = 0x00000040,
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_BIT_EXT,
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXT = 0x00000080,
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_BIT_EXT,
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT = 0x00000100,
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_BIT_EXT,
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NV = 0x00000200,
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NV,
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHR = 0x00000800,
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR = VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHR,
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_CLUSTER_OPACITY_MICROMAPS_BIT_NV = 0x00001000,
VK_BUILD_ACCELERATION_STRUCTURE_RESERVED_10_BIT_KHR = 0x00000400,
} VkBuildAccelerationStructureFlagBitsKHR;
pub struct BuildAccelerationStructureFlagBitsKHR(u32);
impl BuildAccelerationStructureFlagBitsKHR {
pub const ALLOW_UPDATE: Self = 0x00000001;
pub const ALLOW_COMPACTION: Self = 0x00000002;
pub const PREFER_FAST_TRACE: Self = 0x00000004;
pub const PREFER_FAST_BUILD: Self = 0x00000008;
pub const LOW_MEMORY: Self = 0x00000010;
pub const ALLOW_UPDATE_NV: Self = Self::ALLOW_UPDATE;
pub const ALLOW_COMPACTION_NV: Self = Self::ALLOW_COMPACTION;
pub const PREFER_FAST_TRACE_NV: Self = Self::PREFER_FAST_TRACE;
pub const PREFER_FAST_BUILD_NV: Self = Self::PREFER_FAST_BUILD;
pub const LOW_MEMORY_NV: Self = Self::LOW_MEMORY;
pub const MOTION_NV: Self = 0x00000020;
pub const ALLOW_OPACITY_MICROMAP_UPDATE_EXT: Self = 0x00000040;
pub const ALLOW_DISABLE_OPACITY_MICROMAPS_EXT: Self = 0x00000080;
pub const ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT: Self = 0x00000100;
pub const ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV: Self = 0x00000200;
pub const ALLOW_DATA_ACCESS: Self = 0x00000800;
pub const ALLOW_CLUSTER_OPACITY_MICROMAPS_NV: Self = 0x00001000;
pub const RESERVED_10: Self = 0x00000400;
}
#define VkBuildAccelerationStructureFlagBitsNV VkBuildAccelerationStructureFlagBitsKHR
const BuildAccelerationStructureFlagBitsNV: _ = vk::BuildAccelerationStructureFlagBitsKHR;
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHRspecifies that the specified acceleration structure can be updated with amodeofVK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHRin VkAccelerationStructureBuildGeometryInfoKHR or anupdateofVK_TRUEin vkCmdBuildAccelerationStructureNV . For sphere and LSS primitives, only positions and radii may be updated, the provided index buffers and flags must remain unchanged from the initial build.VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHRspecifies that the specified acceleration structure can act as the source for a copy acceleration structure command withmodeofVK_COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHRto produce a compacted acceleration structure.VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHRspecifies that the given acceleration structure build should prioritize trace performance over build time.VK_BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHRspecifies that the given acceleration structure build should prioritize build time over trace performance.VK_BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHRspecifies 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_BIT_EXTspecifies 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_BIT_EXTspecifies 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_BIT_EXTspecifies that the specified acceleration structure may be referenced in an instance withVK_GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_BIT_EXTset.VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_CLUSTER_OPACITY_MICROMAPS_BIT_NVspecifies that opacity micromaps may be associated with the given cluster acceleration structure.VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_BIT_KHRspecifies that the specified acceleration structure can be used when fetching the vertex and radius positions of a hit LSS or sphere primitive, or vertex positions of a hit triangle.VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_BIT_NVspecifies that the displacement micromaps associated with the specified acceleration structure may change with an acceleration structure update.
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR and
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHRmay take
more time and memory than a normal build, and so should only be used when
those features are needed.VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR and
VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR are allowed
to be used together.
In that case, the result of the compaction copy is used as the source of a
build with mode of
VK_BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR to perform the
compacted update.Type
Enum