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.
pUsageCounts or ppUsageCounts can be a valid pointer, the other must be NULLtype is MICROMAP_TYPE_OPACITY_MICROMAP_EXT the format member of VkMicromapUsageEXT must be a valid value from VkOpacityMicromapFormatEXTtype is MICROMAP_TYPE_OPACITY_MICROMAP_EXT the format member of VkMicromapTriangleEXT must be a valid value from VkOpacityMicromapFormatEXTtype is MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV the format member of VkMicromapUsageEXT must be a valid value from VkDisplacementMicromapFormatNVtype is MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV the format member of VkMicromapTriangleEXT must be a valid value from VkDisplacementMicromapFormatNVsType must be STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXTpNext must be NULLtype must be a valid VkMicromapTypeEXT valueflags must be a valid combination of VkBuildMicromapFlagBitsEXT valuesusageCountsCount is not 0, and pUsageCounts is not NULL, pUsageCounts must be a valid pointer to an array of usageCountsCount VkMicromapUsageEXT structuresusageCountsCount is not 0, and ppUsageCounts is not NULL, ppUsageCounts must be a valid pointer to an array of usageCountsCount valid pointers to VkMicromapUsageEXT structuresVkDeviceOrHostAddressConstKHR, VkDeviceOrHostAddressKHR, VkMicromapUsageEXT, BuildMicromapsEXT, CmdBuildMicromapsEXT, GetMicromapBuildSizesEXT
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;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkMicromapBuildInfoEXT.
An array of |
| Modifier and Type | Field 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. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkMicromapBuildInfoEXT(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static VkMicromapBuildInfoEXT | |
| public static VkMicromapBuildInfoEXT. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkMicromapBuildInfoEXT | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkMicromapBuildInfoEXT. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| 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. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkMicromapBuildInfoEXT | |
| public static VkMicromapBuildInfoEXT | |
| public static VkMicromapBuildInfoEXT. | create(int
the buffer capacity capacity)Returns a new |
| public static VkMicromapBuildInfoEXT. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkMicromapBuildInfoEXT | |
| public static VkMicromapBuildInfoEXT. | |
| public VkDeviceOrHostAddressConstKHR | |
| public VkMicromapBuildInfoEXT | data(VkDeviceOrHostAddressConstKHR value)
Copies the specified |
| public VkMicromapBuildInfoEXT | data(Consumer<VkDeviceOrHostAddressConstKHR> consumer)
|
| public long | |
| public VkMicromapBuildInfoEXT | |
| public int | |
| public VkMicromapBuildInfoEXT | |
| public static VkMicromapBuildInfoEXT | |
| public static VkMicromapBuildInfoEXT. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkMicromapBuildInfoEXT | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkMicromapBuildInfoEXT. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public int | |
| public VkMicromapBuildInfoEXT | |
| public static VkDeviceOrHostAddressConstKHR | |
| public static void | |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static long | |
| public static void | |
| public static PointerBuffer | |
| public static void | |
| public static VkMicromapUsageEXT. | |
| public static void | |
| public static VkDeviceOrHostAddressKHR | |
| public static void | |
| public static int | |
| public static void | |
| public static VkDeviceOrHostAddressConstKHR | |
| public static void | |
| public static long | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | nusageCountsCount(long struct, int value)
Sets the specified value to the |
| public long | |
| public VkMicromapBuildInfoEXT | |
| public PointerBuffer | |
| public VkMicromapBuildInfoEXT | ppUsageCounts(PointerBuffer value)
Sets the address of the specified |
| public VkMicromapUsageEXT. | |
| public VkMicromapBuildInfoEXT | pUsageCounts(VkMicromapUsageEXT.
Sets the address of the specified |
| public VkDeviceOrHostAddressKHR | scratchData()
the device or host address to memory that will be used as scratch memory for the build. |
| public VkMicromapBuildInfoEXT | scratchData(VkDeviceOrHostAddressKHR value)
Copies the specified |
| public VkMicromapBuildInfoEXT | scratchData(Consumer<VkDeviceOrHostAddressKHR> consumer)
Passes the |
| public VkMicromapBuildInfoEXT | set(int sType, long pNext, int type, int flags, int mode, long dstMicromap, int usageCountsCount, VkMicromapUsageEXT.
Initializes this struct with the specified values. |
| public VkMicromapBuildInfoEXT | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public VkMicromapBuildInfoEXT | |
| public VkMicromapBuildInfoEXT | |
| public VkDeviceOrHostAddressConstKHR | |
| public VkMicromapBuildInfoEXT | triangleArray(VkDeviceOrHostAddressConstKHR value)
Copies the specified |
| public VkMicromapBuildInfoEXT | triangleArray(Consumer<VkDeviceOrHostAddressConstKHR> consumer)
Passes the |
| public long | |
| public VkMicromapBuildInfoEXT | |
| public int | |
| public VkMicromapBuildInfoEXT | |
| public int | usageCountsCount()
specifies the number of usage counts structures that will be used to determine the size of this micromap. |
| public VkMicromapBuildInfoEXT |