Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- Extension and Version Dependencies
- Requires support for Vulkan 1.0
- Requires
VK_KHR_external_semaphore_capabilities
to be enabled for any device-level functionality - Requires
VK_KHR_external_semaphore
to be enabled for any device-level functionality
- 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_VERSION
Extending
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 #
:: 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 #
:: 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
-
handleType
must be a value included in the Handle Types Supported by table
-
zirconHandle
must obey any requirements listed forhandleType
in external semaphore handle types compatibility -
zirconHandle
must haveZX_RIGHTS_BASIC
andZX_RIGHTS_SIGNAL
rights -
The
SemaphoreTypeCreateInfo
::semaphoreType
field must not beSEMAPHORE_TYPE_TIMELINE
Valid Usage (Implicit)
-
pNext
must beNULL
-
semaphore
must be a validSemaphore
handle -
flags
must be a valid combination ofSemaphoreImportFlagBits
values -
handleType
must be a validExternalSemaphoreHandleTypeFlagBits
value
Host Synchronization
- Host access to
semaphore
must be externally synchronized
See Also
VK_FUCHSIA_external_semaphore,
ExternalSemaphoreHandleTypeFlagBits
,
Semaphore
,
SemaphoreImportFlags
,
StructureType
,
importSemaphoreZirconHandleFUCHSIA
ImportSemaphoreZirconHandleInfoFUCHSIA | |
|
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
-
handleType
must have been included inExportSemaphoreCreateInfo
::handleTypes
whensemaphore
’s current payload was created
-
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 inExternalSemaphoreProperties
::exportFromImportedHandleTypes
forhandleType
- 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 onsemaphore
- 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 Zircon event handle -
semaphore
must have been created with aSemaphoreType
ofSEMAPHORE_TYPE_BINARY
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA
-
pNext
must beNULL
-
semaphore
must be a validSemaphore
handle -
handleType
must be a validExternalSemaphoreHandleTypeFlagBits
value
See Also
VK_FUCHSIA_external_semaphore,
ExternalSemaphoreHandleTypeFlagBits
,
Semaphore
,
StructureType
,
getSemaphoreZirconHandleFUCHSIA
SemaphoreGetZirconHandleInfoFUCHSIA | |
|
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 #