| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Extensions.VK_KHR_external_semaphore_fd
- pattern VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR :: VkStructureType
- pattern VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR :: VkStructureType
- pattern VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION :: Integral a => a
- pattern VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME :: (Eq a, IsString a) => a
- vkGetSemaphoreFdKHR :: ("device" ::: VkDevice) -> ("pGetFdInfo" ::: Ptr VkSemaphoreGetFdInfoKHR) -> ("pFd" ::: Ptr CInt) -> IO VkResult
- vkImportSemaphoreFdKHR :: ("device" ::: VkDevice) -> ("pImportSemaphoreFdInfo" ::: Ptr VkImportSemaphoreFdInfoKHR) -> IO VkResult
- data VkImportSemaphoreFdInfoKHR = VkImportSemaphoreFdInfoKHR {}
- data VkSemaphoreGetFdInfoKHR = VkSemaphoreGetFdInfoKHR {}
Documentation
pattern VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION :: Integral a => a Source #
pattern VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
vkGetSemaphoreFdKHR :: ("device" ::: VkDevice) -> ("pGetFdInfo" ::: Ptr VkSemaphoreGetFdInfoKHR) -> ("pFd" ::: Ptr CInt) -> IO VkResult Source #
vkGetSemaphoreFdKHR - Get a POSIX file descriptor handle for a semaphore
Parameters
deviceis the logical device that created the semaphore being exported.
pGetFdInfois a pointer to an instance of theVkSemaphoreGetFdInfoKHRstructure containing parameters of the export operation.pFdwill return the file descriptor representing the semaphore payload.
Description
Each call to vkGetSemaphoreFdKHR 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.
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
pGetFdInfomust be a valid pointer to a validVkSemaphoreGetFdInfoKHRstructurepFdmust be a valid pointer to aintvalue
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_TOO_MANY_OBJECTSVK_ERROR_OUT_OF_HOST_MEMORY
See Also
vkImportSemaphoreFdKHR :: ("device" ::: VkDevice) -> ("pImportSemaphoreFdInfo" ::: Ptr VkImportSemaphoreFdInfoKHR) -> IO VkResult Source #
vkImportSemaphoreFdKHR - Import a semaphore from a POSIX file descriptor
Parameters
deviceis the logical device that created the semaphore.
pImportSemaphoreFdInfopoints to aVkImportSemaphoreFdInfoKHRstructure 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.
Valid Usage
semaphoremust not be associated with any queue command that has not yet completed execution on that queue
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
pImportSemaphoreFdInfomust be a valid pointer to a validVkImportSemaphoreFdInfoKHRstructure
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_INVALID_EXTERNAL_HANDLE
See Also
data VkImportSemaphoreFdInfoKHR 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 | +=======================+=======================+=======================+ | @VK_EXTERNAL_SEMAPHOR | Reference | Temporary,Permanent | | E_HANDLE_TYPE_OPAQUE_ | | | | FD_BIT@ | | | +-----------------------+-----------------------+-----------------------+ | @VK_EXTERNAL_SEMAPHOR | Copy | Temporary | | E_HANDLE_TYPE_SYNC_FD | | | | _BIT@ | | | +-----------------------+-----------------------+-----------------------+ Handle Types Supported by VkImportSemaphoreFdInfoKHR
Valid Usage
handleTypemust be a value included in the Handle Types Supported by VkImportSemaphoreFdInfoKHR table.
fdmust obey any requirements listed forhandleTypein external semaphore handle types compatibility.
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR
pNextmust beNULLsemaphoremust be a validVkSemaphorehandleflagsmust be a valid combination ofVkSemaphoreImportFlagBitsvalueshandleTypemust be a validVkExternalSemaphoreHandleTypeFlagBitsvalue
Host Synchronization
- Host access to
semaphoremust be externally synchronized
See Also
VkExternalSemaphoreHandleTypeFlagBits,
VkSemaphore,
VkSemaphoreImportFlags,
VkStructureType, vkImportSemaphoreFdKHR
Constructors
| VkImportSemaphoreFdInfoKHR | |
Fields
| |
data VkSemaphoreGetFdInfoKHR 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
VkExternalSemaphoreHandleTypeFlagBits
for a description of the properties of the defined external semaphore
handle types.
Valid Usage
handleTypemust have been included inVkExportSemaphoreCreateInfo::handleTypeswhensemaphore’s current payload was created.
semaphoremust 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 inVkExternalSemaphoreProperties::exportFromImportedHandleTypesforhandleType.- If
handleTyperefers to a handle type with copy payload transference semantics, as defined below in Importing Semaphore Payloads, there must be no queue waiting onsemaphore. - If
handleTyperefers to a handle type with copy payload transference semantics,semaphoremust be signaled, or have an associated semaphore signal operation pending execution. handleTypemust be defined as a POSIX file descriptor handle.
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR
pNextmust beNULLsemaphoremust be a validVkSemaphorehandlehandleTypemust be a validVkExternalSemaphoreHandleTypeFlagBitsvalue
See Also
VkExternalSemaphoreHandleTypeFlagBits,
VkSemaphore,
VkStructureType, vkGetSemaphoreFdKHR
Constructors
| VkSemaphoreGetFdInfoKHR | |
Fields
| |