Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkMicromapBuildInfoEXT

extends Struct<VkMicromapBuildInfoEXT>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure specifying the data used to build a micromap.
Description

Only one of pUsageCounts or ppUsageCounts can be a valid pointer, the other must be NULL. The elements of the non-NULL array describe the total counts used to build each micromap. Each element contains a count which is the number of micromap triangles of that format and subdivisionLevel contained in the micromap. Multiple elements with the same format and subdivisionLevel are allowed and the total count for that format and subdivisionLevel is the sum of the count for each element.

Each micromap triangle refers to one element in triangleArray which contains the format and subdivisionLevel for that particular triangle as well as a dataOffset in bytes which is the location relative to data where that triangle’s micromap data begins. The data at triangleArray is laid out as a 4 byte unsigned integer for the dataOffset followed by a 2 byte unsigned integer for the subdivision level then a 2 byte unsigned integer for the format. In practice, compilers compile VkMicromapTriangleEXT to match this pattern.

For opacity micromaps, the data at data is packed as either one bit per element for OPACITY_MICROMAP_FORMAT_2_STATE_EXT or two bits per element for OPACITY_MICROMAP_FORMAT_4_STATE_EXT and is packed from LSB to MSB in each byte. The data at each index in those bytes is interpreted as discussed in Ray Opacity Micromap.

For displacement micromaps, the data at data is interpreted as discussed in Displacement Micromap Encoding.

Valid Usage
Valid Usage (Implicit)
See Also

VkDeviceOrHostAddressConstKHR, VkDeviceOrHostAddressKHR, VkMicromapUsageEXT, BuildMicromapsEXT, CmdBuildMicromapsEXT, GetMicromapBuildSizesEXT

Layout


struct VkMicromapBuildInfoEXT {
    VkStructureType sType;
    void const * pNext;
    VkMicromapTypeEXT type;
    VkBuildMicromapFlagsEXT flags;
    VkBuildMicromapModeEXT mode;
    VkMicromapEXT dstMicromap;
    uint32_t usageCountsCount;
    VkMicromapUsageEXT const * pUsageCounts;
    VkMicromapUsageEXT const * const * ppUsageCounts;
    VkDeviceOrHostAddressConstKHR data;
    VkDeviceOrHostAddressKHR scratchData;
    VkDeviceOrHostAddressConstKHR triangleArray;
    VkDeviceSize triangleArrayStride;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
DATA

The struct member offsets.

public static final int
DSTMICROMAP

The struct member offsets.

public static final int
FLAGS

The struct member offsets.

public static final int
MODE

The struct member offsets.

public static final int
PNEXT

The struct member offsets.

public static final int
PPUSAGECOUNTS

The struct member offsets.

public static final int
PUSAGECOUNTS

The struct member offsets.

public static final int
SCRATCHDATA

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STYPE

The struct member offsets.

public static final int
TRIANGLEARRAY

The struct member offsets.

public static final int
TRIANGLEARRAYSTRIDE

The struct member offsets.

public static final int
TYPE

The struct member offsets.

public static final int
USAGECOUNTSCOUNT

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
VkMicromapBuildInfoEXT(long address, ByteBuffer container)

public
VkMicromapBuildInfoEXT(ByteBuffer container)

Creates a VkMicromapBuildInfoEXT instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static VkMicromapBuildInfoEXT
calloc()

Returns a new VkMicromapBuildInfoEXT instance allocated with memCalloc.

public static VkMicromapBuildInfoEXT.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkMicromapBuildInfoEXT.Buffer instance allocated with memCalloc.

public static VkMicromapBuildInfoEXT
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkMicromapBuildInfoEXT instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkMicromapBuildInfoEXT.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkMicromapBuildInfoEXT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected VkMicromapBuildInfoEXT
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkMicromapBuildInfoEXT
create()

Returns a new VkMicromapBuildInfoEXT instance allocated with BufferUtils.

public static VkMicromapBuildInfoEXT
create(long address)

Returns a new VkMicromapBuildInfoEXT instance for the specified memory address.

public static VkMicromapBuildInfoEXT.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkMicromapBuildInfoEXT.Buffer instance allocated with BufferUtils.

public static VkMicromapBuildInfoEXT.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkMicromapBuildInfoEXT.Buffer instance at the specified memory.

public static VkMicromapBuildInfoEXT
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkMicromapBuildInfoEXT.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public VkDeviceOrHostAddressConstKHR
data()

the device or host address to memory which contains the data for the micromap.

public VkMicromapBuildInfoEXT
data(VkDeviceOrHostAddressConstKHR value)

Copies the specified VkDeviceOrHostAddressConstKHR to the data field.

public VkMicromapBuildInfoEXT
data(Consumer<VkDeviceOrHostAddressConstKHR> consumer)

Passes the data field to the specified Consumer.

public long
dstMicromap()

a pointer to the target micromap for the build.

public VkMicromapBuildInfoEXT
dstMicromap(long value)

Sets the specified value to the dstMicromap field.

public int
flags()

a bitmask of VkBuildMicromapFlagBitsEXT specifying additional parameters of the micromap.

public VkMicromapBuildInfoEXT
flags(int value)

Sets the specified value to the flags field.

public static VkMicromapBuildInfoEXT
malloc()

Returns a new VkMicromapBuildInfoEXT instance allocated with memAlloc.

public static VkMicromapBuildInfoEXT.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkMicromapBuildInfoEXT.Buffer instance allocated with memAlloc.

public static VkMicromapBuildInfoEXT
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkMicromapBuildInfoEXT instance allocated on the specified MemoryStack.

public static VkMicromapBuildInfoEXT.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkMicromapBuildInfoEXT.Buffer instance allocated on the specified MemoryStack.

public int
mode()

a VkBuildMicromapModeEXT value specifying the type of operation to perform.

public VkMicromapBuildInfoEXT
mode(int value)

Sets the specified value to the mode field.

public static VkDeviceOrHostAddressConstKHR
ndata(long struct)

Unsafe version of data.

public static void
ndata(long struct, VkDeviceOrHostAddressConstKHR value)

Unsafe version of data.

public static long
ndstMicromap(long struct)

Unsafe version of dstMicromap.

public static void
ndstMicromap(long struct, long value)

Unsafe version of dstMicromap.

public static int
nflags(long struct)

Unsafe version of flags.

public static void
nflags(long struct, int value)

Unsafe version of flags.

public static int
nmode(long struct)

Unsafe version of mode.

public static void
nmode(long struct, int value)

Unsafe version of mode.

public static long
npNext(long struct)

Unsafe version of pNext.

public static void
npNext(long struct, long value)

Unsafe version of pNext.

public static PointerBuffer
nppUsageCounts(long struct)

Unsafe version of ppUsageCounts.

public static void
nppUsageCounts(long struct, PointerBuffer value)

Unsafe version of ppUsageCounts.

public static VkMicromapUsageEXT.Buffer
npUsageCounts(long struct)

Unsafe version of pUsageCounts.

public static void
npUsageCounts(long struct, VkMicromapUsageEXT.Buffer value)

Unsafe version of pUsageCounts.

public static VkDeviceOrHostAddressKHR
nscratchData(long struct)

Unsafe version of scratchData.

public static void
nscratchData(long struct, VkDeviceOrHostAddressKHR value)

Unsafe version of scratchData.

public static int
nsType(long struct)

Unsafe version of sType.

public static void
nsType(long struct, int value)

Unsafe version of sType.

public static VkDeviceOrHostAddressConstKHR
ntriangleArray(long struct)

Unsafe version of triangleArray.

public static void
ntriangleArray(long struct, VkDeviceOrHostAddressConstKHR value)

Unsafe version of triangleArray.

public static long
ntriangleArrayStride(long struct)

Unsafe version of triangleArrayStride.

public static void
ntriangleArrayStride(long struct, long value)

Unsafe version of triangleArrayStride.

public static int
ntype(long struct)

Unsafe version of type.

public static void
ntype(long struct, int value)

Unsafe version of type.

public static int
nusageCountsCount(long struct)

Unsafe version of usageCountsCount.

public static void
nusageCountsCount(long struct, int value)

Sets the specified value to the usageCountsCount field of the specified struct.

public long
pNext()

NULL or a pointer to a structure extending this structure.

public VkMicromapBuildInfoEXT
pNext(long value)

Sets the specified value to the pNext field.

public PointerBuffer
ppUsageCounts()

a pointer to an array of pointers to VkMicromapUsageEXT structures.

public VkMicromapBuildInfoEXT
ppUsageCounts(PointerBuffer value)

Sets the address of the specified PointerBuffer to the ppUsageCounts field.

public VkMicromapUsageEXT.Buffer
pUsageCounts()

a pointer to an array of VkMicromapUsageEXT structures.

public VkMicromapBuildInfoEXT
pUsageCounts(VkMicromapUsageEXT.Buffer value)

Sets the address of the specified VkMicromapUsageEXT.Buffer to the pUsageCounts field.

public VkDeviceOrHostAddressKHR
scratchData()

the device or host address to memory that will be used as scratch memory for the build.

public VkMicromapBuildInfoEXT
public VkMicromapBuildInfoEXT
scratchData(Consumer<VkDeviceOrHostAddressKHR> consumer)

Passes the scratchData field to the specified Consumer.

public VkMicromapBuildInfoEXT
set(int sType, long pNext, int type, int flags, int mode, long dstMicromap, int usageCountsCount, VkMicromapUsageEXT.Buffer pUsageCounts, PointerBuffer ppUsageCounts, VkDeviceOrHostAddressConstKHR data, VkDeviceOrHostAddressKHR scratchData, VkDeviceOrHostAddressConstKHR triangleArray, long triangleArrayStride)

Initializes this struct with the specified values.

public VkMicromapBuildInfoEXT

Returns:

this struct
set
(VkMicromapBuildInfoEXT
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
sType()

a VkStructureType value identifying this structure.

public VkMicromapBuildInfoEXT
sType(int value)

Sets the specified value to the sType field.

public VkMicromapBuildInfoEXT
public VkDeviceOrHostAddressConstKHR
triangleArray()

the device or host address to memory containing the VkMicromapTriangleEXT data

public VkMicromapBuildInfoEXT
public VkMicromapBuildInfoEXT
triangleArray(Consumer<VkDeviceOrHostAddressConstKHR> consumer)

Passes the triangleArray field to the specified Consumer.

public long
triangleArrayStride()

the stride in bytes between each element of triangleArray

public VkMicromapBuildInfoEXT
triangleArrayStride(long value)

Sets the specified value to the triangleArrayStride field.

public int
type()

a VkMicromapTypeEXT value specifying the type of micromap being built.

public VkMicromapBuildInfoEXT
type(int value)

Sets the specified value to the type field.

public int
usageCountsCount()

specifies the number of usage counts structures that will be used to determine the size of this micromap.

public VkMicromapBuildInfoEXT
usageCountsCount(int value)

Sets the specified value to the usageCountsCount field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate