Class VkImportFenceFdInfoKHR

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class VkImportFenceFdInfoKHR
    extends Struct
    implements NativeResource

    The handle types supported by handleType are:

    Handle Types Supported by VkImportFenceFdInfoKHR
    Handle TypeTransferencePermanence Supported
    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.


    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)
    • 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


    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • fence – the fence into which the payload will be imported.
    • flags – a bitmask of VkFenceImportFlagBits specifying additional parameters for the fence payload import operation.
    • handleType – specifies the type of fd.
    • fd – the external handle to import.


     struct VkImportFenceFdInfoKHR {
         VkStructureType sType;
         void const * pNext;
         VkFence fence;
         VkFenceImportFlags flags;
         VkExternalFenceHandleTypeFlagBits handleType;
         int fd;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail

      • VkImportFenceFdInfoKHR

        public VkImportFenceFdInfoKHR​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • sType

        public int sType()
        Returns the value of the sType field.
      • pNext

        public long pNext()
        Returns the value of the pNext field.
      • fence

        public long fence()
        Returns the value of the fence field.
      • flags

        public int flags()
        Returns the value of the flags field.
      • handleType

        public int handleType()
        Returns the value of the handleType field.
      • fd

        public int fd()
        Returns the value of the fd field.
      • handleType

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

        public VkImportFenceFdInfoKHR set​(int sType,
                                          long pNext,
                                          long fence,
                                          int flags,
                                          int handleType,
                                          int fd)
        Initializes this struct with the specified values.
      • 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​(long address)
        Returns a new VkImportFenceFdInfoKHR instance for the specified memory address.
      • createSafe

        public static VkImportFenceFdInfoKHR createSafe​(long address)
        Like create, but returns null if address is NULL.
      • callocStack

        public static VkImportFenceFdInfoKHR callocStack()
        Returns a new VkImportFenceFdInfoKHR instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static VkImportFenceFdInfoKHR mallocStack​(MemoryStack stack)
        Returns a new VkImportFenceFdInfoKHR instance allocated on the specified MemoryStack.
        stack - the stack from which to allocate
      • callocStack

        public static VkImportFenceFdInfoKHR callocStack​(MemoryStack stack)
        Returns a new VkImportFenceFdInfoKHR instance allocated on the specified MemoryStack and initializes all its bits to zero.
        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.