Class VkMicromapBuildInfoEXT

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkMicromapBuildInfoEXT>
org.lwjgl.vulkan.VkMicromapBuildInfoEXT
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VkMicromapBuildInfoEXT extends org.lwjgl.system.Struct<VkMicromapBuildInfoEXT> implements org.lwjgl.system.NativeResource
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)
  • sType must be STRUCTURE_TYPE_MICROMAP_BUILD_INFO_EXT
  • pNext must be NULL
  • type must be a valid VkMicromapTypeEXT value
  • flags must be a valid combination of VkBuildMicromapFlagBitsEXT values
  • If usageCountsCount is not 0, and pUsageCounts is not NULL, pUsageCounts must be a valid pointer to an array of usageCountsCount VkMicromapUsageEXT structures
  • If usageCountsCount is not 0, and ppUsageCounts is not NULL, ppUsageCounts must be a valid pointer to an array of usageCountsCount valid pointers to VkMicromapUsageEXT structures
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();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • STYPE

      public static final int STYPE
      The struct member offsets.
    • PNEXT

      public static final int PNEXT
      The struct member offsets.
    • TYPE

      public static final int TYPE
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • MODE

      public static final int MODE
      The struct member offsets.
    • DSTMICROMAP

      public static final int DSTMICROMAP
      The struct member offsets.
    • USAGECOUNTSCOUNT

      public static final int USAGECOUNTSCOUNT
      The struct member offsets.
    • PUSAGECOUNTS

      public static final int PUSAGECOUNTS
      The struct member offsets.
    • PPUSAGECOUNTS

      public static final int PPUSAGECOUNTS
      The struct member offsets.
    • DATA

      public static final int DATA
      The struct member offsets.
    • SCRATCHDATA

      public static final int SCRATCHDATA
      The struct member offsets.
    • TRIANGLEARRAY

      public static final int TRIANGLEARRAY
      The struct member offsets.
    • TRIANGLEARRAYSTRIDE

      public static final int TRIANGLEARRAYSTRIDE
      The struct member offsets.
  • Constructor Details

    • VkMicromapBuildInfoEXT

      public VkMicromapBuildInfoEXT(ByteBuffer container)
      Creates a VkMicromapBuildInfoEXT instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details