HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_FUCHSIA_external_semaphore

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

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

No cross-references are available

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.

  • 5 types
  • 2 values
  • Packagevulkan-3.27
  • Exports9
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_FUCHSIA_external_semaphore.hs
valuegetSemaphoreZirconHandleFUCHSIA
  1. :: MonadIO io
  2. => Device

    device is the logical device that created the semaphore being exported.

    device must be a valid Device handle

  3. -> SemaphoreGetZirconHandleInfoFUCHSIA

    pGetZirconHandleInfo is a pointer to a SemaphoreGetZirconHandleInfoFUCHSIA structure containing parameters of the export operation.

    pGetZirconHandleInfo must be a valid pointer to a valid SemaphoreGetZirconHandleInfoFUCHSIA structure

  4. -> 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.

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

Success
Failure

See Also

VK_FUCHSIA_external_semaphore, Device, SemaphoreGetZirconHandleInfoFUCHSIA

valueimportSemaphoreZirconHandleFUCHSIA
  1. :: MonadIO io
  2. => Device

    device is the logical device that created the semaphore.

    device must be a valid Device handle

  3. -> ImportSemaphoreZirconHandleInfoFUCHSIA

    pImportSemaphoreZirconHandleInfo is a pointer to a ImportSemaphoreZirconHandleInfoFUCHSIA structure specifying the semaphore and import parameters.

    pImportSemaphoreZirconHandleInfo must be a valid pointer to a valid ImportSemaphoreZirconHandleInfoFUCHSIA structure

  4. -> 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

Success
Failure

See Also

VK_FUCHSIA_external_semaphore, Device, ImportSemaphoreZirconHandleInfoFUCHSIA

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

Valid Usage (Implicit)

Host Synchronization

  • Host access to semaphore must be externally synchronized

See Also

VK_FUCHSIA_external_semaphore, ExternalSemaphoreHandleTypeFlagBits, Semaphore, SemaphoreImportFlags, StructureType, importSemaphoreZirconHandleFUCHSIA

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

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

  • 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 in ExternalSemaphoreProperties::exportFromImportedHandleTypes for handleType

  • 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 on semaphore

  • 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 a SemaphoreType of SEMAPHORE_TYPE_BINARY

Valid Usage (Implicit)

See Also

VK_FUCHSIA_external_semaphore, ExternalSemaphoreHandleTypeFlagBits, Semaphore, StructureType, getSemaphoreZirconHandleFUCHSIA

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero