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 memorymask occupies the 8 most significant bits of that memoryinstanceShaderBindingTableRecordOffset 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 memoryflags occupies the 8 most significant bits of that memoryIf a compiler produces code that diverges from that pattern, applications must employ another method to set values according to the correct bit pattern.
flags must be a valid combination of VkGeometryInstanceFlagBitsKHR valuesVkAccelerationStructureMotionInstanceDataNV, VkTransformMatrixKHR
struct VkAccelerationStructureInstanceKHR {
VkTransformMatrixKHR transform;
uint32_t instanceCustomIndex : 24;
uint32_t mask : 8;
uint32_t instanceShaderBindingTableRecordOffset : 24;
VkGeometryInstanceFlagsKHR flags : 8;
uint64_t accelerationStructureReference;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkAccelerationStructureInstanceKHR.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ACCELERATIONSTRUCTUREREFERENCE
The struct member offsets. |
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | BITFIELD0
The struct member offsets. |
| public static final int | BITFIELD1
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | TRANSFORM
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkAccelerationStructureInstanceKHR(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public long | accelerationStructureReference()
either:
|
| public VkAccelerationStructureInstanceKHR | accelerationStructureReference(long value)
Sets the specified value to the |
| public static VkAccelerationStructureInstanceKHR | |
| public static VkAccelerationStructureInstanceKHR. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkAccelerationStructureInstanceKHR | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkAccelerationStructureInstanceKHR. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected VkAccelerationStructureInstanceKHR | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkAccelerationStructureInstanceKHR | |
| public static VkAccelerationStructureInstanceKHR | create(long address)
Returns a new |
| public static VkAccelerationStructureInstanceKHR. | create(int
the buffer capacity capacity)Returns a new |
| public static VkAccelerationStructureInstanceKHR. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkAccelerationStructureInstanceKHR | |
| public static VkAccelerationStructureInstanceKHR. | |
| public int | |
| public VkAccelerationStructureInstanceKHR | |
| public int | instanceCustomIndex()
a 24-bit user-specified index value accessible to ray shaders in the |
| public VkAccelerationStructureInstanceKHR | |
| public int | instanceShaderBindingTableRecordOffset()
a 24-bit offset used in calculating the hit shader binding table index. |
| public VkAccelerationStructureInstanceKHR | instanceShaderBindingTableRecordOffset(int value)
Sets the specified value to the |
| public static VkAccelerationStructureInstanceKHR | |
| public static VkAccelerationStructureInstanceKHR. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkAccelerationStructureInstanceKHR | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkAccelerationStructureInstanceKHR. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public int | |
| public VkAccelerationStructureInstanceKHR | |
| public static long | |
| public static void | naccelerationStructureReference(long struct, long value)
Unsafe version of |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | ninstanceShaderBindingTableRecordOffset(long struct)
Unsafe version of |
| public static void | ninstanceShaderBindingTableRecordOffset(long struct, int value)
Unsafe version of |
| public static int | |
| public static void | |
| public static VkTransformMatrixKHR | |
| public static void | |
| public VkAccelerationStructureInstanceKHR | set(VkTransformMatrixKHR transform, int instanceCustomIndex, int mask, int instanceShaderBindingTableRecordOffset, int flags, long accelerationStructureReference)
Initializes this struct with the specified values. |
| public VkAccelerationStructureInstanceKHR | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public VkTransformMatrixKHR | transform()
a |
| public VkAccelerationStructureInstanceKHR | transform(VkTransformMatrixKHR value)
Copies the specified |
| public VkAccelerationStructureInstanceKHR | transform(Consumer<VkTransformMatrixKHR> consumer)
|
| ACCELERATIONSTRUCTUREREFERENCE | back to summary |
|---|---|
| public static final int ACCELERATIONSTRUCTUREREFERENCE The struct member offsets. | |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| BITFIELD0 | back to summary |
|---|---|
| public static final int BITFIELD0 The struct member offsets. | |
| BITFIELD1 | back to summary |
|---|---|
| public static final int BITFIELD1 The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| TRANSFORM | back to summary |
|---|---|
| public static final int TRANSFORM The struct member offsets. | |
| VkAccelerationStructureInstanceKHR | back to summary |
|---|---|
| protected VkAccelerationStructureInstanceKHR(long address, ByteBuffer container) | |
| VkAccelerationStructureInstanceKHR | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| accelerationStructureReference | back to summary |
|---|---|
| public long accelerationStructureReference() either:
| |
| accelerationStructureReference | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR accelerationStructureReference(long value) Sets the specified value to the | |
| calloc | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR. Returns a new
| |
| create | back to summary |
|---|---|
| protected VkAccelerationStructureInstanceKHR create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR create() Returns a new | |
| create | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR. Returns a new
| |
| create | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR. Create a
| |
| createSafe | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR. Like
| |
| flags | back to summary |
|---|---|
| public int flags() an 8-bit mask of
| |
| flags | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR flags(int value) Sets the specified value to the | |
| instanceCustomIndex | back to summary |
|---|---|
| public int instanceCustomIndex() a 24-bit user-specified index value accessible to ray shaders in the
| |
| instanceCustomIndex | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR instanceCustomIndex(int value) Sets the specified value to the | |
| instanceShaderBindingTableRecordOffset | back to summary |
|---|---|
| public int instanceShaderBindingTableRecordOffset() a 24-bit offset used in calculating the hit shader binding table index.
| |
| instanceShaderBindingTableRecordOffset | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR instanceShaderBindingTableRecordOffset(int value) Sets the specified value to the | |
| malloc | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkAccelerationStructureInstanceKHR. Returns a new
| |
| mask | back to summary |
|---|---|
| public int mask() an 8-bit visibility mask for the geometry. The instance may only be hit if
| |
| mask | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR mask(int value) Sets the specified value to the | |
| naccelerationStructureReference | back to summary |
|---|---|
| public static long naccelerationStructureReference(long struct) Unsafe version of | |
| naccelerationStructureReference | back to summary |
|---|---|
| public static void naccelerationStructureReference(long struct, long value) Unsafe version of | |
| nbitfield0 | back to summary |
|---|---|
| public static int nbitfield0(long struct) | |
| nbitfield0 | back to summary |
|---|---|
| public static void nbitfield0(long struct, int value) | |
| nbitfield1 | back to summary |
|---|---|
| public static int nbitfield1(long struct) | |
| nbitfield1 | back to summary |
|---|---|
| public static void nbitfield1(long struct, int value) | |
| nflags | back to summary |
|---|---|
| public static int nflags(long struct) Unsafe version of | |
| nflags | back to summary |
|---|---|
| public static void nflags(long struct, int value) Unsafe version of | |
| ninstanceCustomIndex | back to summary |
|---|---|
| public static int ninstanceCustomIndex(long struct) Unsafe version of | |
| ninstanceCustomIndex | back to summary |
|---|---|
| public static void ninstanceCustomIndex(long struct, int value) Unsafe version of | |
| ninstanceShaderBindingTableRecordOffset | back to summary |
|---|---|
| public static int ninstanceShaderBindingTableRecordOffset(long struct) Unsafe version of | |
| ninstanceShaderBindingTableRecordOffset | back to summary |
|---|---|
| public static void ninstanceShaderBindingTableRecordOffset(long struct, int value) Unsafe version of | |
| nmask | back to summary |
|---|---|
| public static int nmask(long struct) Unsafe version of | |
| nmask | back to summary |
|---|---|
| public static void nmask(long struct, int value) Unsafe version of | |
| ntransform | back to summary |
|---|---|
| public static VkTransformMatrixKHR ntransform(long struct) Unsafe version of | |
| ntransform | back to summary |
|---|---|
| public static void ntransform(long struct, VkTransformMatrixKHR value) Unsafe version of | |
| set | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR set(VkTransformMatrixKHR transform, int instanceCustomIndex, int mask, int instanceShaderBindingTableRecordOffset, int flags, long accelerationStructureReference) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR set(VkAccelerationStructureInstanceKHR src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| transform | back to summary |
|---|---|
| public VkTransformMatrixKHR transform() a | |
| transform | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR transform(VkTransformMatrixKHR value) Copies the specified | |
| transform | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR transform(Consumer<VkTransformMatrixKHR> consumer) | |
VkAccelerationStructureInstanceKHR structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final VkAccelerationStructureInstanceKHR |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final VkAccelerationStructureInstanceKHR ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| accelerationStructureReference | back to summary |
|---|---|
public long accelerationStructureReference()
| |
| accelerationStructureReference | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR. Sets the specified value to the | |
| flags | back to summary |
|---|---|
public int flags()
| |
| flags | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR. Sets the specified value to the | |
| getElementFactory | back to summary |
|---|---|
| protected VkAccelerationStructureInstanceKHR getElementFactory() Implements abstract org.
| |
| instanceCustomIndex | back to summary |
|---|---|
public int instanceCustomIndex()
| |
| instanceCustomIndex | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR. Sets the specified value to the | |
| instanceShaderBindingTableRecordOffset | back to summary |
|---|---|
public int instanceShaderBindingTableRecordOffset()
| |
| instanceShaderBindingTableRecordOffset | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR. Sets the specified value to the | |
| mask | back to summary |
|---|---|
public int mask()
| |
| mask | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR. Sets the specified value to the | |
| self | back to summary |
|---|---|
| protected VkAccelerationStructureInstanceKHR. Implements abstract org.
| |
| transform | back to summary |
|---|---|
public VkTransformMatrixKHR transform()
| |
| transform | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR. Copies the specified | |
| transform | back to summary |
|---|---|
| public VkAccelerationStructureInstanceKHR. Passes the | |