Structures

VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV

Parameters describing geometry index and flags values for cluster acceleration structure

The VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV structure is defined as:

typedef struct VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV {
    // The bitfields in this structure are non-normative since bitfield ordering is implementation-defined in C. The specification defines the normative layout.;
    uint32_t geometryIndex:24;
    uint32_t reserved:5;
    uint32_t geometryFlags:3;
} VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV;
  • 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.

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.