Class VkImportSemaphoreFdInfoKHR

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

public class VkImportSemaphoreFdInfoKHR extends org.lwjgl.system.Struct<VkImportSemaphoreFdInfoKHR> implements org.lwjgl.system.NativeResource
Structure specifying POSIX file descriptor to import to a semaphore.
Description

The handle types supported by handleType are:

Handle Types Supported by VkImportSemaphoreFdInfoKHR
Handle TypeTransferencePermanence Supported
EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BITReferenceTemporary,Permanent
EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BITCopyTemporary
Valid Usage

If handleType is EXTERNAL_SEMAPHORE_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 VkSemaphore 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_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT from a VkSemaphore which is signaled.

Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR
  • pNext must be NULL
  • semaphore must be a valid VkSemaphore handle
  • flags must be a valid combination of VkSemaphoreImportFlagBits values
  • handleType must be a valid VkExternalSemaphoreHandleTypeFlagBits value
Host Synchronization
  • Host access to semaphore must be externally synchronized
See Also

ImportSemaphoreFdKHR

Layout


 struct VkImportSemaphoreFdInfoKHR {
     VkStructureType sType();
     void const * pNext();
     VkSemaphore semaphore();
     VkSemaphoreImportFlags flags();
     VkExternalSemaphoreHandleTypeFlagBits 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.
    • SEMAPHORE

      public static final int SEMAPHORE
      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

    • VkImportSemaphoreFdInfoKHR

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