Class VkDeviceOrHostAddressKHR

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

public class VkDeviceOrHostAddressKHR extends org.lwjgl.system.Struct<VkDeviceOrHostAddressKHR> implements org.lwjgl.system.NativeResource
Union specifying a device or host address.
See Also

VkAccelerationStructureBuildGeometryInfoKHR, VkCopyAccelerationStructureToMemoryInfoKHR, VkCopyMicromapToMemoryInfoEXT, VkMicromapBuildInfoEXT

Layout


 union VkDeviceOrHostAddressKHR {
     VkDeviceAddress deviceAddress();
     void * hostAddress();
 }
  • Field Details

    • SIZEOF

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

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

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

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

    • VkDeviceOrHostAddressKHR

      public VkDeviceOrHostAddressKHR(ByteBuffer container)
      Creates a VkDeviceOrHostAddressKHR 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<VkDeviceOrHostAddressKHR>
    • deviceAddress

      public long deviceAddress()
      a buffer device address as returned by the GetBufferDeviceAddressKHR command.
    • hostAddress

      public long hostAddress()
      a host memory address.
    • deviceAddress

      public VkDeviceOrHostAddressKHR deviceAddress(long value)
      Sets the specified value to the deviceAddress() field.
    • hostAddress

      public VkDeviceOrHostAddressKHR hostAddress(long value)
      Sets the specified value to the hostAddress() field.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static VkDeviceOrHostAddressKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkDeviceOrHostAddressKHR.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
    • ndeviceAddress

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

      public static long nhostAddress(long struct)
      Unsafe version of hostAddress().
    • ndeviceAddress

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

      public static void nhostAddress(long struct, long value)
      Unsafe version of hostAddress.