vulkan-3.3: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_KHR_external_semaphore_fd

Synopsis

Documentation

getSemaphoreFdKHR :: forall io. MonadIO io => Device -> SemaphoreGetFdInfoKHR -> io ("fd" ::: Int32) Source #

vkGetSemaphoreFdKHR - Get a POSIX file descriptor handle for a semaphore

Parameters

  • device is the logical device that created the semaphore being exported.
  • pGetFdInfo is a pointer to a SemaphoreGetFdInfoKHR structure containing parameters of the export operation.
  • pFd will return the file descriptor representing the semaphore payload.

Description

Each call to getSemaphoreFdKHR must create a new file descriptor and transfer ownership of it to the application. To avoid leaking resources, the application must release ownership of the file descriptor when it is no longer needed.

Note

Ownership can be released in many ways. For example, the application can call close() on the file descriptor, or transfer ownership back to Vulkan by using the file descriptor to import a semaphore payload.

Where supported by the operating system, the implementation must set the file descriptor to be closed automatically when an execve system call is made.

Exporting a file descriptor from a semaphore may have side effects depending on the transference of the specified handle type, as described in Importing Semaphore State.

Return Codes

Success
Failure

See Also

Device, SemaphoreGetFdInfoKHR

importSemaphoreFdKHR :: forall io. MonadIO io => Device -> ImportSemaphoreFdInfoKHR -> io () Source #

vkImportSemaphoreFdKHR - Import a semaphore from a POSIX file descriptor

Parameters

  • device is the logical device that created the semaphore.
  • pImportSemaphoreFdInfo is a pointer to a ImportSemaphoreFdInfoKHR structure specifying the semaphore and import parameters.

Description

Importing a semaphore payload from a file descriptor transfers ownership of the file descriptor from the application to the Vulkan implementation. The application must not perform any operations on the file descriptor after a successful import.

Applications can import the same semaphore payload into multiple instances of Vulkan, into the same instance from which it was exported, and multiple times into a given Vulkan instance.

Return Codes

Success
Failure

See Also

Device, ImportSemaphoreFdInfoKHR

data ImportSemaphoreFdInfoKHR Source #

VkImportSemaphoreFdInfoKHR - Structure specifying POSIX file descriptor to import to a semaphore

Description

The handle types supported by handleType are:

Handle Type Transference Permanence Supported
EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT Reference Temporary,Permanent
EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT Copy Temporary

Handle Types Supported by ImportSemaphoreFdInfoKHR

Valid Usage

Valid Usage (Implicit)

Host Synchronization

  • Host access to semaphore must be externally synchronized

See Also

ExternalSemaphoreHandleTypeFlagBits, Semaphore, SemaphoreImportFlags, StructureType, importSemaphoreFdKHR

Constructors

ImportSemaphoreFdInfoKHR 

Fields

Instances

Instances details
Show ImportSemaphoreFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_fd

Storable ImportSemaphoreFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_fd

FromCStruct ImportSemaphoreFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_fd

ToCStruct ImportSemaphoreFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_fd

Zero ImportSemaphoreFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_fd

data SemaphoreGetFdInfoKHR Source #

VkSemaphoreGetFdInfoKHR - Structure describing a POSIX FD semaphore export operation

Description

The properties of the file descriptor returned depend on the value of handleType. See ExternalSemaphoreHandleTypeFlagBits for a description of the properties of the defined external semaphore handle types.

Valid Usage

  • semaphore must not currently have its payload replaced by an imported payload as described below in Importing Semaphore Payloads unless that imported payload’s handle type was included in ExternalSemaphoreProperties::exportFromImportedHandleTypes for handleType
  • If handleType refers to a handle type with copy payload transference semantics, as defined below in Importing Semaphore Payloads, there must be no queue waiting on semaphore
  • If handleType refers to a handle type with copy payload transference semantics, semaphore must be signaled, or have an associated semaphore signal operation pending execution
  • handleType must be defined as a POSIX file descriptor handle
  • If handleType refers to a handle type with copy payload transference semantics, semaphore must have been created with a SemaphoreType of SEMAPHORE_TYPE_BINARY
  • If handleType refers to a handle type with copy payload transference semantics, semaphore must have an associated semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends (if any) must have also been submitted for execution

Valid Usage (Implicit)

See Also

ExternalSemaphoreHandleTypeFlagBits, Semaphore, StructureType, getSemaphoreFdKHR

Constructors

SemaphoreGetFdInfoKHR 

Fields

Instances

Instances details
Show SemaphoreGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_fd

Storable SemaphoreGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_fd

FromCStruct SemaphoreGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_fd

ToCStruct SemaphoreGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_fd

Zero SemaphoreGetFdInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_fd

type KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME = "VK_KHR_external_semaphore_fd" Source #