| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_FUCHSIA_external_semaphore
Description
Name
VK_FUCHSIA_external_semaphore - device extension
VK_FUCHSIA_external_semaphore
- Name String
VK_FUCHSIA_external_semaphore
- Extension Type
- Device extension
- Registered Extension Number
- 366
- Revision
- 1
- Ratification Status
- Not ratified
- Extension and Version Dependencies
- VK_KHR_external_semaphore_capabilities and VK_KHR_external_semaphore
- Contact
Other Extension Metadata
- Last Modified Date
- 2021-03-08
- IP Status
- No known IP claims.
- Contributors
- Craig Stout, Google
- John Bauman, Google
- John Rosasco, Google
Description
An application using external memory may wish to synchronize access to that memory using semaphores. This extension enables an application to export semaphore payload to and import semaphore payload from Zircon event handles.
New Commands
New Structures
New Enum Constants
FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSIONExtending
ExternalSemaphoreHandleTypeFlagBits:Extending
StructureType:
Issues
1) Does the application need to close the Zircon event handle returned
by getSemaphoreZirconHandleFUCHSIA?
RESOLVED: Yes, unless it is passed back in to a driver instance to import the semaphore. A successful get call transfers ownership of the Zircon event handle to the application, and a successful import transfers it back to the driver. Destroying the original semaphore object will not close the Zircon event handle nor remove its reference to the underlying semaphore resource associated with it.
Version History
Revision 1, 2021-03-08 (John Rosasco)
- Initial revision
See Also
ImportSemaphoreZirconHandleInfoFUCHSIA,
SemaphoreGetZirconHandleInfoFUCHSIA,
getSemaphoreZirconHandleFUCHSIA, importSemaphoreZirconHandleFUCHSIA
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
- getSemaphoreZirconHandleFUCHSIA :: forall io. MonadIO io => Device -> SemaphoreGetZirconHandleInfoFUCHSIA -> io ("zirconHandle" ::: Zx_handle_t)
- importSemaphoreZirconHandleFUCHSIA :: forall io. MonadIO io => Device -> ImportSemaphoreZirconHandleInfoFUCHSIA -> io ()
- data ImportSemaphoreZirconHandleInfoFUCHSIA = ImportSemaphoreZirconHandleInfoFUCHSIA {}
- data SemaphoreGetZirconHandleInfoFUCHSIA = SemaphoreGetZirconHandleInfoFUCHSIA {}
- type FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION = 1
- pattern FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION :: forall a. Integral a => a
- type FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_FUCHSIA_external_semaphore"
- pattern FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- type Zx_handle_t = Word32
Documentation
getSemaphoreZirconHandleFUCHSIA Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> SemaphoreGetZirconHandleInfoFUCHSIA |
|
| -> io ("zirconHandle" ::: Zx_handle_t) |
vkGetSemaphoreZirconHandleFUCHSIA - Get a Zircon event handle for a semaphore
Description
Each call to getSemaphoreZirconHandleFUCHSIA must create a Zircon
event handle and transfer ownership of it to the application. To avoid
leaking resources, the application must release ownership of the
Zircon event handle when it is no longer needed.
Note
Ownership can be released in many ways. For example, the application can call zx_handle_close() on the file descriptor, or transfer ownership back to Vulkan by using the file descriptor to import a semaphore payload.
Exporting a Zircon event handle from a semaphore may have side effects depending on the transference of the specified handle type, as described in Importing Semaphore State.
Return Codes
See Also
VK_FUCHSIA_external_semaphore,
Device, SemaphoreGetZirconHandleInfoFUCHSIA
importSemaphoreZirconHandleFUCHSIA Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> ImportSemaphoreZirconHandleInfoFUCHSIA |
|
| -> io () |
vkImportSemaphoreZirconHandleFUCHSIA - Import a semaphore from a Zircon event handle
Description
Importing a semaphore payload from a Zircon event handle transfers ownership of the handle from the application to the Vulkan implementation. The application must not perform any operations on the handle 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
See Also
VK_FUCHSIA_external_semaphore,
Device, ImportSemaphoreZirconHandleInfoFUCHSIA
data ImportSemaphoreZirconHandleInfoFUCHSIA Source #
VkImportSemaphoreZirconHandleInfoFUCHSIA - Structure specifying Zircon event handle to import to a semaphore
Description
The handle types supported by handleType are:
| Handle Type | Transference | Permanence Supported |
|---|---|---|
EXTERNAL_SEMAPHORE_HANDLE_TYPE_ZIRCON_EVENT_BIT_FUCHSIA | Reference | Temporary,Permanent |
Handle Types Supported by ImportSemaphoreZirconHandleInfoFUCHSIA
Valid Usage
-
handleTypemust be a value included in the Handle Types Supported by table
-
zirconHandlemust obey any requirements listed forhandleTypein external semaphore handle types compatibility -
zirconHandlemust haveZX_RIGHTS_BASICandZX_RIGHTS_SIGNALrights -
The
SemaphoreTypeCreateInfo::semaphoreTypefield must not beSEMAPHORE_TYPE_TIMELINE
Valid Usage (Implicit)
-
pNextmust beNULL -
semaphoremust be a validSemaphorehandle -
flagsmust be a valid combination ofSemaphoreImportFlagBitsvalues -
handleTypemust be a validExternalSemaphoreHandleTypeFlagBitsvalue
Host Synchronization
- Host access to
semaphoremust be externally synchronized
See Also
VK_FUCHSIA_external_semaphore,
ExternalSemaphoreHandleTypeFlagBits,
Semaphore,
SemaphoreImportFlags,
StructureType,
importSemaphoreZirconHandleFUCHSIA
Constructors
| ImportSemaphoreZirconHandleInfoFUCHSIA | |
Fields
| |
Instances
data SemaphoreGetZirconHandleInfoFUCHSIA Source #
VkSemaphoreGetZirconHandleInfoFUCHSIA - Structure describing a Zircon event handle semaphore export operation
Description
The properties of the Zircon event handle returned depend on the value
of handleType. See
ExternalSemaphoreHandleTypeFlagBits
for a description of the properties of the defined external semaphore
handle types.
Valid Usage
-
handleTypemust have been included inExportSemaphoreCreateInfo::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 inExternalSemaphoreProperties::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 Zircon event handle -
semaphoremust have been created with aSemaphoreTypeofSEMAPHORE_TYPE_BINARY
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA
-
pNextmust beNULL -
semaphoremust be a validSemaphorehandle -
handleTypemust be a validExternalSemaphoreHandleTypeFlagBitsvalue
See Also
VK_FUCHSIA_external_semaphore,
ExternalSemaphoreHandleTypeFlagBits,
Semaphore,
StructureType,
getSemaphoreZirconHandleFUCHSIA
Constructors
| SemaphoreGetZirconHandleInfoFUCHSIA | |
Fields
| |
Instances
pattern FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION :: forall a. Integral a => a Source #
type FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_FUCHSIA_external_semaphore" Source #
pattern FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
type Zx_handle_t = Word32 Source #