Class VkImportFenceFdInfoKHR

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

public class VkImportFenceFdInfoKHR extends org.lwjgl.system.Struct<VkImportFenceFdInfoKHR> implements org.lwjgl.system.NativeResource
(None).
Description

The handle types supported by handleType are:

Handle Types Supported by VkImportFenceFdInfoKHR
Handle TypeTransferencePermanence Supported
EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BITReferenceTemporary,Permanent
EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BITCopyTemporary
Valid Usage

If handleType is EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT, the special value -1 for fd is treated like a valid sync file descriptor referring to an object that has already signaled. The import operation will succeed and the VkFence will have a temporarily imported payload as if a valid file descriptor had been provided.

Note

This special behavior for importing an invalid sync file descriptor allows easier interoperability with other system APIs which use the convention that an invalid sync file descriptor represents work that has already completed and does not need to be waited for. It is consistent with the option for implementations to return a -1 file descriptor when exporting a EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT from a VkFence which is signaled.

Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR
  • pNext must be NULL
  • fence must be a valid VkFence handle
  • flags must be a valid combination of VkFenceImportFlagBits values
  • handleType must be a valid VkExternalFenceHandleTypeFlagBits value
Host Synchronization
  • Host access to fence must be externally synchronized
See Also

ImportFenceFdKHR

Layout


 struct VkImportFenceFdInfoKHR {
     VkStructureType sType();
     void const * pNext();
     VkFence fence();
     VkFenceImportFlags flags();
     VkExternalFenceHandleTypeFlagBits handleType();
     int fd();
 }
  • 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.
    • FENCE

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

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

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

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

    • VkImportFenceFdInfoKHR

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

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

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

      public long fence()
      the fence into which the payload will be imported.
    • flags

      public int flags()
      a bitmask of VkFenceImportFlagBits specifying additional parameters for the fence payload import operation.
    • handleType

      public int handleType()
      a VkExternalFenceHandleTypeFlagBits value specifying the type of fd.
    • fd

      public int fd()
      the external handle to import.
    • sType

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

      public VkImportFenceFdInfoKHR sType$Default()
    • pNext

      public VkImportFenceFdInfoKHR pNext(long value)
      Sets the specified value to the pNext() field.
    • fence

      public VkImportFenceFdInfoKHR fence(long value)
      Sets the specified value to the fence() field.
    • flags

      public VkImportFenceFdInfoKHR flags(int value)
      Sets the specified value to the flags() field.
    • handleType

      public VkImportFenceFdInfoKHR handleType(int value)
      Sets the specified value to the handleType() field.
    • fd

      public VkImportFenceFdInfoKHR fd(int value)
      Sets the specified value to the fd() field.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static VkImportFenceFdInfoKHR.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 VkImportFenceFdInfoKHR.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 VkImportFenceFdInfoKHR malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkImportFenceFdInfoKHR instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

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

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

      public static long nfence(long struct)
      Unsafe version of fence().
    • nflags

      public static int nflags(long struct)
      Unsafe version of flags().
    • nhandleType

      public static int nhandleType(long struct)
      Unsafe version of handleType().
    • nfd

      public static int nfd(long struct)
      Unsafe version of fd().
    • 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.
    • nfence

      public static void nfence(long struct, long value)
      Unsafe version of fence.
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.
    • nhandleType

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

      public static void nfd(long struct, int value)
      Unsafe version of fd.