Class VkMemoryGetFdInfoKHR

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

public class VkMemoryGetFdInfoKHR extends org.lwjgl.system.Struct<VkMemoryGetFdInfoKHR> implements org.lwjgl.system.NativeResource
Structure describing a POSIX FD memory export operation.
Description

The properties of the file descriptor exported depend on the value of handleType. See VkExternalMemoryHandleTypeFlagBits for a description of the properties of the defined external memory handle types.

Note

The size of the exported file may be larger than the size requested by VkMemoryAllocateInfo::allocationSize. If handleType is EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT, then the application can query the file’s actual size with lseek.

Valid Usage
Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR
  • pNext must be NULL
  • memory must be a valid VkDeviceMemory handle
  • handleType must be a valid VkExternalMemoryHandleTypeFlagBits value
See Also

GetMemoryFdKHR

Layout


 struct VkMemoryGetFdInfoKHR {
     VkStructureType sType();
     void const * pNext();
     VkDeviceMemory memory();
     VkExternalMemoryHandleTypeFlagBits handleType();
 }
  • 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.
    • MEMORY

      public static final int MEMORY
      The struct member offsets.
    • HANDLETYPE

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

    • VkMemoryGetFdInfoKHR

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

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

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

      public long memory()
      the memory object from which the handle will be exported.
    • handleType

      public int handleType()
      a VkExternalMemoryHandleTypeFlagBits value specifying the type of handle requested.
    • sType

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

      public VkMemoryGetFdInfoKHR sType$Default()
      Sets the STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR value to the sType() field.
    • pNext

      public VkMemoryGetFdInfoKHR pNext(long value)
      Sets the specified value to the pNext() field.
    • memory

      public VkMemoryGetFdInfoKHR memory(long value)
      Sets the specified value to the memory() field.
    • handleType

      public VkMemoryGetFdInfoKHR handleType(int value)
      Sets the specified value to the handleType() field.
    • set

      public VkMemoryGetFdInfoKHR set(int sType, long pNext, long memory, int handleType)
      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 VkMemoryGetFdInfoKHR malloc()
      Returns a new VkMemoryGetFdInfoKHR instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

      @Deprecated public static VkMemoryGetFdInfoKHR mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkMemoryGetFdInfoKHR callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkMemoryGetFdInfoKHR mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkMemoryGetFdInfoKHR callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkMemoryGetFdInfoKHR.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VkMemoryGetFdInfoKHR.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkMemoryGetFdInfoKHR.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VkMemoryGetFdInfoKHR.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

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

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

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

      public static long nmemory(long struct)
      Unsafe version of memory().
    • nhandleType

      public static int nhandleType(long struct)
      Unsafe version of handleType().
    • 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.
    • nmemory

      public static void nmemory(long struct, long value)
      Unsafe version of memory.
    • nhandleType

      public static void nhandleType(long struct, int value)
      Unsafe version of handleType.