getFenceFdKHR :: MonadIO io=> Devicedeviceis the logical device that created the fence being exported.devicemust be a valid Device handle-> FenceGetFdInfoKHRpGetFdInfois a pointer to a FenceGetFdInfoKHR structure containing parameters of the export operation.pGetFdInfomust be a valid pointer to a valid FenceGetFdInfoKHR structure-> io ("fd"
::: Int32)
vkGetFenceFdKHR - Get a POSIX file descriptor handle for a fence
Description
Each call to getFenceFdKHR 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.
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 fence payload.
If pGetFdInfo->handleType is
EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT
and the fence is signaled at the time getFenceFdKHR is called, pFd
may return the value -1 instead of a valid file descriptor.
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 fence may have side effects depending on the transference of the specified handle type, as described in Importing Fence State.