vulkan-3.13: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

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
Extension and Version Dependencies
  • Requires Vulkan 1.0
  • Requires VK_KHR_external_semaphore_capabilities
  • Requires 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

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

Documentation

getSemaphoreZirconHandleFUCHSIA Source #

Arguments

:: forall io. MonadIO io 
=> Device

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

device must be a valid Device handle

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

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

Success
Failure

See Also

VK_FUCHSIA_external_semaphore, Device, SemaphoreGetZirconHandleInfoFUCHSIA

importSemaphoreZirconHandleFUCHSIA Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device that created the semaphore.

device must be a valid Device handle

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

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

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_FUCHSIAReferenceTemporary,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

ImportSemaphoreZirconHandleInfoFUCHSIA 

Fields

Instances

Instances details
Eq ImportSemaphoreZirconHandleInfoFUCHSIA Source # 
Instance details

Defined in Vulkan.Extensions.VK_FUCHSIA_external_semaphore

Show ImportSemaphoreZirconHandleInfoFUCHSIA Source # 
Instance details

Defined in Vulkan.Extensions.VK_FUCHSIA_external_semaphore

Storable ImportSemaphoreZirconHandleInfoFUCHSIA Source # 
Instance details

Defined in Vulkan.Extensions.VK_FUCHSIA_external_semaphore

FromCStruct ImportSemaphoreZirconHandleInfoFUCHSIA Source # 
Instance details

Defined in Vulkan.Extensions.VK_FUCHSIA_external_semaphore

ToCStruct ImportSemaphoreZirconHandleInfoFUCHSIA Source # 
Instance details

Defined in Vulkan.Extensions.VK_FUCHSIA_external_semaphore

Zero ImportSemaphoreZirconHandleInfoFUCHSIA Source # 
Instance details

Defined in Vulkan.Extensions.VK_FUCHSIA_external_semaphore

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

  • 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

SemaphoreGetZirconHandleInfoFUCHSIA 

Fields

Instances

Instances details
Eq SemaphoreGetZirconHandleInfoFUCHSIA Source # 
Instance details

Defined in Vulkan.Extensions.VK_FUCHSIA_external_semaphore

Show SemaphoreGetZirconHandleInfoFUCHSIA Source # 
Instance details

Defined in Vulkan.Extensions.VK_FUCHSIA_external_semaphore

Storable SemaphoreGetZirconHandleInfoFUCHSIA Source # 
Instance details

Defined in Vulkan.Extensions.VK_FUCHSIA_external_semaphore

FromCStruct SemaphoreGetZirconHandleInfoFUCHSIA Source # 
Instance details

Defined in Vulkan.Extensions.VK_FUCHSIA_external_semaphore

ToCStruct SemaphoreGetZirconHandleInfoFUCHSIA Source # 
Instance details

Defined in Vulkan.Extensions.VK_FUCHSIA_external_semaphore

Zero SemaphoreGetZirconHandleInfoFUCHSIA Source # 
Instance details

Defined in Vulkan.Extensions.VK_FUCHSIA_external_semaphore

type FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_FUCHSIA_external_semaphore" Source #