VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV(3)

Name

VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV - Parameters describing geometry index and flags values for cluster acceleration structure

C Specification

// Provided by VK_NV_cluster_acceleration_structure
typedef struct VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV {
    uint32_t    geometryIndex:24;
    uint32_t    reserved:5;
    uint32_t    geometryFlags:3;
} VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV;

Members

  • geometryIndex specifies the geometry index for all triangles in the cluster acceleration structure.

  • reserved is reserved for future use.

  • geometryFlags is a bitmask of VkClusterAccelerationStructureGeometryFlagBitsNV values describing geometry flags for the cluster acceleration structure.

Description

The C language specification does not define the ordering of bit-fields, but in practice, this structure produces the correct layout with existing compilers. The intended bit pattern is the following:

  • geometryIndex, reserved and mask occupy the same memory as if a single uint32_t was specified in their place

    • geometryIndex occupies the 24 least significant bits of that memory

    • geometryFlags occupies the 3 most significant bits of that memory

If a compiler produces code that diverges from that pattern, applications must employ another method to set values according to the correct bit pattern.

Valid Usage
  • VUID-VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV-reserved-10487
    reserved must be 0

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.