C Specification
The VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV structure is defined as:
// Provided by VK_NV_cluster_acceleration_structure
typedef struct VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV {
uint32_t geometryIndex:24;
uint32_t reserved:5;
uint32_t geometryFlags:3;
} VkClusterAccelerationStructureGeometryIndexAndGeometryFlagsNV;
Members
-
geometryIndexspecifies the geometry index for all triangles in the cluster acceleration structure. -
reservedis reserved for future use. -
geometryFlagsis 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,reservedandmaskoccupy the same memory as if a singleuint32_twas specified in their place-
geometryIndexoccupies the 24 least significant bits of that memory -
geometryFlagsoccupies 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.
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.