Class VkMicromapCreateInfoEXT

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

public class VkMicromapCreateInfoEXT extends org.lwjgl.system.Struct<VkMicromapCreateInfoEXT> implements org.lwjgl.system.NativeResource
Structure specifying the parameters of a newly created micromap object.
Description

If deviceAddress is zero, no specific address is requested.

If deviceAddress is not zero, deviceAddress must be an address retrieved from an identically created micromap on the same implementation. The micromap must also be placed on an identically created buffer and at the same offset.

Applications should avoid creating micromaps with application-provided addresses and implementation-provided addresses in the same process, to reduce the likelihood of ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR errors.

Note

The expected usage for this is that a trace capture/replay tool will add the BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag to all buffers that use BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT, and will add BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT to all buffers used as storage for a micromap where deviceAddress is not zero. This also means that the tool will need to add MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT to memory allocations to allow the flag to be set where the application may not have otherwise required it. During capture the tool will save the queried opaque device addresses in the trace. During replay, the buffers will be created specifying the original address so any address values stored in the trace data will remain valid.

Implementations are expected to separate such buffers in the GPU address space so normal allocations will avoid using these addresses. Applications and tools should avoid mixing application-provided and implementation-provided addresses for buffers created with BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, to avoid address space allocation conflicts.

If the micromap will be the target of a build operation, the required size for a micromap can be queried with GetMicromapBuildSizesEXT.

Valid Usage
Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_MICROMAP_CREATE_INFO_EXT
  • pNext must be NULL
  • createFlags must be a valid combination of VkMicromapCreateFlagBitsEXT values
  • buffer must be a valid VkBuffer handle
  • type must be a valid VkMicromapTypeEXT value
See Also

CreateMicromapEXT

Layout


 struct VkMicromapCreateInfoEXT {
     VkStructureType sType();
     void const * pNext();
     VkMicromapCreateFlagsEXT createFlags();
     VkBuffer buffer();
     VkDeviceSize offset();
     VkDeviceSize size();
     VkMicromapTypeEXT type();
     VkDeviceAddress deviceAddress();
 }
  • 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.
    • CREATEFLAGS

      public static final int CREATEFLAGS
      The struct member offsets.
    • BUFFER

      public static final int BUFFER
      The struct member offsets.
    • OFFSET

      public static final int OFFSET
      The struct member offsets.
    • SIZE

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

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

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

    • VkMicromapCreateInfoEXT

      public VkMicromapCreateInfoEXT(ByteBuffer container)
      Creates a VkMicromapCreateInfoEXT 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

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VkMicromapCreateInfoEXT>
    • sType

      public int sType()
      a VkStructureType value identifying this structure.
    • pNext

      public long pNext()
      NULL or a pointer to a structure extending this structure.
    • createFlags

      public int createFlags()
      a bitmask of VkMicromapCreateFlagBitsEXT specifying additional creation parameters of the micromap.
    • buffer

      public long buffer()
      the buffer on which the micromap will be stored.
    • offset

      public long offset()
      an offset in bytes from the base address of the buffer at which the micromap will be stored, and must be a multiple of 256.
    • size

      public long size()
      the size required for the micromap.
    • type

      public int type()
      a VkMicromapTypeEXT value specifying the type of micromap that will be created.
    • deviceAddress

      public long deviceAddress()
      the device address requested for the micromap if the micromapCaptureReplay feature is being used.
    • sType

      public VkMicromapCreateInfoEXT sType(int value)
      Sets the specified value to the sType() field.
    • sType$Default

      public VkMicromapCreateInfoEXT sType$Default()
    • pNext

      public VkMicromapCreateInfoEXT pNext(long value)
      Sets the specified value to the pNext() field.
    • createFlags

      public VkMicromapCreateInfoEXT createFlags(int value)
      Sets the specified value to the createFlags() field.
    • buffer

      public VkMicromapCreateInfoEXT buffer(long value)
      Sets the specified value to the buffer() field.
    • offset

      public VkMicromapCreateInfoEXT offset(long value)
      Sets the specified value to the offset() field.
    • size

      public VkMicromapCreateInfoEXT size(long value)
      Sets the specified value to the size() field.
    • type

      public VkMicromapCreateInfoEXT type(int value)
      Sets the specified value to the type() field.
    • deviceAddress

      public VkMicromapCreateInfoEXT deviceAddress(long value)
      Sets the specified value to the deviceAddress() field.
    • set

      public VkMicromapCreateInfoEXT set(int sType, long pNext, int createFlags, long buffer, long offset, long size, int type, long deviceAddress)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static VkMicromapCreateInfoEXT malloc()
      Returns a new VkMicromapCreateInfoEXT instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static VkMicromapCreateInfoEXT calloc()
      Returns a new VkMicromapCreateInfoEXT instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static VkMicromapCreateInfoEXT create()
      Returns a new VkMicromapCreateInfoEXT instance allocated with BufferUtils.
    • create

      public static VkMicromapCreateInfoEXT create(long address)
      Returns a new VkMicromapCreateInfoEXT instance for the specified memory address.
    • createSafe

      public static @Nullable VkMicromapCreateInfoEXT createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkMicromapCreateInfoEXT.Buffer malloc(int capacity)
      Returns a new VkMicromapCreateInfoEXT.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static VkMicromapCreateInfoEXT.Buffer calloc(int capacity)
      Returns a new VkMicromapCreateInfoEXT.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkMicromapCreateInfoEXT.Buffer create(int capacity)
      Returns a new VkMicromapCreateInfoEXT.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkMicromapCreateInfoEXT.Buffer create(long address, int capacity)
      Create a VkMicromapCreateInfoEXT.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable VkMicromapCreateInfoEXT.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkMicromapCreateInfoEXT malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkMicromapCreateInfoEXT instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static VkMicromapCreateInfoEXT calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkMicromapCreateInfoEXT instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static VkMicromapCreateInfoEXT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkMicromapCreateInfoEXT.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static VkMicromapCreateInfoEXT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkMicromapCreateInfoEXT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nsType

      public static int nsType(long struct)
      Unsafe version of sType().
    • npNext

      public static long npNext(long struct)
      Unsafe version of pNext().
    • ncreateFlags

      public static int ncreateFlags(long struct)
      Unsafe version of createFlags().
    • nbuffer

      public static long nbuffer(long struct)
      Unsafe version of buffer().
    • noffset

      public static long noffset(long struct)
      Unsafe version of offset().
    • nsize

      public static long nsize(long struct)
      Unsafe version of size().
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • ndeviceAddress

      public static long ndeviceAddress(long struct)
      Unsafe version of deviceAddress().
    • nsType

      public static void nsType(long struct, int value)
      Unsafe version of sType.
    • npNext

      public static void npNext(long struct, long value)
      Unsafe version of pNext.
    • ncreateFlags

      public static void ncreateFlags(long struct, int value)
      Unsafe version of createFlags.
    • nbuffer

      public static void nbuffer(long struct, long value)
      Unsafe version of buffer.
    • noffset

      public static void noffset(long struct, long value)
      Unsafe version of offset.
    • nsize

      public static void nsize(long struct, long value)
      Unsafe version of size.
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • ndeviceAddress

      public static void ndeviceAddress(long struct, long value)
      Unsafe version of deviceAddress.