Class VkAccelerationStructureInstanceKHR

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
    Direct Known Subclasses:
    VkAccelerationStructureInstanceNV

    public class VkAccelerationStructureInstanceKHR
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying a single acceleration structure instance for building into an acceleration structure geometry.
    Description

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

    • instanceCustomIndex and mask occupy the same memory as if a single uint32_t was specified in their place
      • instanceCustomIndex occupies the 24 least significant bits of that memory
      • mask occupies the 8 most significant bits of that memory
    • instanceShaderBindingTableRecordOffset and flags occupy the same memory as if a single uint32_t was specified in their place
      • instanceShaderBindingTableRecordOffset occupies the 24 least significant bits of that memory
      • flags occupies the 8 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 (Implicit)
    • flags must be a valid combination of VkGeometryInstanceFlagBitsKHR values
    See Also

    VkAccelerationStructureMotionInstanceDataNV, VkTransformMatrixKHR

    Layout

    
     struct VkAccelerationStructureInstanceKHR {
         VkTransformMatrixKHR transform();
         uint32_t instanceCustomIndex() : 24;
         uint32_t mask() : 8;
         uint32_t instanceShaderBindingTableRecordOffset() : 24;
         VkGeometryInstanceFlagsKHR flags() : 8;
         uint64_t accelerationStructureReference();
     }