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
-
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
andmask
occupy the same memory as if a singleuint32_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.
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.