Safe Haskell | None |
---|---|
Language | Haskell2010 |
Name
VK_KHR_external_fence_fd - device extension
VK_KHR_external_fence_fd
- Name String
VK_KHR_external_fence_fd
- Extension Type
- Device extension
- Registered Extension Number
- 116
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_external_fence
- Contact
Other Extension Metadata
- Last Modified Date
- 2017-05-08
- IP Status
- No known IP claims.
- Contributors
- Jesse Hall, Google
- James Jones, NVIDIA
- Jeff Juliano, NVIDIA
- Cass Everitt, Oculus
- Contributors to
VK_KHR_external_semaphore_fd
Description
An application using external memory may wish to synchronize access to that memory using fences. This extension enables an application to export fence payload to and import fence payload from POSIX file descriptors.
New Commands
New Structures
New Enum Constants
Issues
This extension borrows concepts, semantics, and language from
VK_KHR_external_semaphore_fd
. That extension’s issues apply equally to
this extension.
Version History
Revision 1, 2017-05-08 (Jesse Hall)
- Initial revision
See Also
FenceGetFdInfoKHR
, ImportFenceFdInfoKHR
, getFenceFdKHR
,
importFenceFdKHR
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- getFenceFdKHR :: forall io. MonadIO io => Device -> FenceGetFdInfoKHR -> io ("fd" ::: Int32)
- importFenceFdKHR :: forall io. MonadIO io => Device -> ImportFenceFdInfoKHR -> io ()
- data ImportFenceFdInfoKHR = ImportFenceFdInfoKHR {}
- data FenceGetFdInfoKHR = FenceGetFdInfoKHR {}
- type KHR_EXTERNAL_FENCE_FD_SPEC_VERSION = 1
- pattern KHR_EXTERNAL_FENCE_FD_SPEC_VERSION :: forall a. Integral a => a
- type KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME = "VK_KHR_external_fence_fd"
- pattern KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
Documentation
:: forall io. MonadIO io | |
=> Device |
|
-> FenceGetFdInfoKHR |
|
-> 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.
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 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.
Return Codes
See Also
:: forall io. MonadIO io | |
=> Device |
|
-> ImportFenceFdInfoKHR |
|
-> io () |
vkImportFenceFdKHR - Import a fence from a POSIX file descriptor
Description
Importing a fence 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 fence 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
See Also
data ImportFenceFdInfoKHR Source #
VkImportFenceFdInfoKHR - (None)
Description
The handle types supported by handleType
are:
Handle Type | Transference | Permanence Supported |
---|---|---|
EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT | Reference | Temporary,Permanent |
EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT | Copy | Temporary |
Handle Types Supported by ImportFenceFdInfoKHR
Valid Usage
-
handleType
must be a value included in the Handle Types Supported by table
-
fd
must obey any requirements listed forhandleType
in external fence handle types compatibility
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 Fence
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_FENCE_HANDLE_TYPE_SYNC_FD_BIT
from a Fence
which is signaled.
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR
-
pNext
must beNULL
-
fence
must be a validFence
handle -
flags
must be a valid combination ofFenceImportFlagBits
values -
handleType
must be a validExternalFenceHandleTypeFlagBits
value
Host Synchronization
- Host access to
fence
must be externally synchronized
See Also
ExternalFenceHandleTypeFlagBits
,
Fence
,
FenceImportFlags
,
StructureType
, importFenceFdKHR
ImportFenceFdInfoKHR | |
|
Instances
data FenceGetFdInfoKHR Source #
VkFenceGetFdInfoKHR - Structure describing a POSIX FD fence export operation
Description
The properties of the file descriptor returned depend on the value of
handleType
. See
ExternalFenceHandleTypeFlagBits
for a description of the properties of the defined external fence handle
types.
Valid Usage
-
handleType
must have been included inExportFenceCreateInfo
::handleTypes
whenfence
’s current payload was created
- If
handleType
refers to a handle type with copy payload transference semantics,fence
must be signaled, or have an associated fence signal operation pending execution -
fence
must not currently have its payload replaced by an imported payload as described below in Importing Fence Payloads unless that imported payload’s handle type was included inExternalFenceProperties
::exportFromImportedHandleTypes
forhandleType
-
handleType
must be defined as a POSIX file descriptor handle
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR
-
pNext
must beNULL
-
fence
must be a validFence
handle -
handleType
must be a validExternalFenceHandleTypeFlagBits
value
See Also
ExternalFenceHandleTypeFlagBits
,
Fence
,
StructureType
, getFenceFdKHR
FenceGetFdInfoKHR | |
|
Instances
type KHR_EXTERNAL_FENCE_FD_SPEC_VERSION = 1 Source #
pattern KHR_EXTERNAL_FENCE_FD_SPEC_VERSION :: forall a. Integral a => a Source #
type KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME = "VK_KHR_external_fence_fd" Source #
pattern KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #