| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_KHR_external_fence_win32
Description
Name
VK_KHR_external_fence_win32 - device extension
VK_KHR_external_fence_win32
- Name String
VK_KHR_external_fence_win32
- Extension Type
- Device extension
- Registered Extension Number
- 115
- 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_win32
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 Windows handles.
New Commands
New Structures
New Enum Constants
Issues
This extension borrows concepts, semantics, and language from
VK_KHR_external_semaphore_win32. That extension’s issues apply equally
to this extension.
1) Should D3D12 fence handle types be supported, like they are for semaphores?
RESOLVED: No. Doing so would require extending the fence signal and
wait operations to provide values to signal / wait for, like
D3D12FenceSubmitInfoKHR
does. A D3D12 fence can be signaled by importing it into a
Semaphore instead of a
Fence, and applications can check status or wait
on the D3D12 fence using non-Vulkan APIs. The convenience of being able
to do these operations on Fence objects does not
justify the extra API complexity.
Version History
Revision 1, 2017-05-08 (Jesse Hall)
- Initial revision
See Also
ExportFenceWin32HandleInfoKHR, FenceGetWin32HandleInfoKHR,
ImportFenceWin32HandleInfoKHR, getFenceWin32HandleKHR,
importFenceWin32HandleKHR
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
- getFenceWin32HandleKHR :: forall io. MonadIO io => Device -> FenceGetWin32HandleInfoKHR -> io HANDLE
- importFenceWin32HandleKHR :: forall io. MonadIO io => Device -> ImportFenceWin32HandleInfoKHR -> io ()
- data ImportFenceWin32HandleInfoKHR = ImportFenceWin32HandleInfoKHR {}
- data ExportFenceWin32HandleInfoKHR = ExportFenceWin32HandleInfoKHR {}
- data FenceGetWin32HandleInfoKHR = FenceGetWin32HandleInfoKHR {}
- type KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION = 1
- pattern KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION :: forall a. Integral a => a
- type KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME = "VK_KHR_external_fence_win32"
- pattern KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- type HANDLE = Ptr ()
- type DWORD = Word32
- type LPCWSTR = Ptr CWchar
- data SECURITY_ATTRIBUTES
Documentation
getFenceWin32HandleKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> FenceGetWin32HandleInfoKHR |
|
| -> io HANDLE |
vkGetFenceWin32HandleKHR - Get a Windows HANDLE for a fence
Description
For handle types defined as NT handles, the handles returned by
getFenceWin32HandleKHR are owned by the application. To avoid leaking
resources, the application must release ownership of them using the
CloseHandle system call when they are no longer needed.
Exporting a Windows handle from a fence may have side effects depending on the transference of the specified handle type, as described in Importing Fence Payloads.
Return Codes
See Also
importFenceWin32HandleKHR Source #
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> ImportFenceWin32HandleInfoKHR |
|
| -> io () |
vkImportFenceWin32HandleKHR - Import a fence from a Windows HANDLE
Description
Importing a fence payload from Windows handles does not transfer
ownership of the handle to the Vulkan implementation. For handle types
defined as NT handles, the application must release ownership using
the CloseHandle system call when the handle is no longer needed.
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 ImportFenceWin32HandleInfoKHR Source #
VkImportFenceWin32HandleInfoKHR - (None)
Description
The handle types supported by handleType are:
| Handle Type | Transference | Permanence Supported |
|---|---|---|
EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT | Reference | Temporary,Permanent |
EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT | Reference | Temporary,Permanent |
Handle Types Supported by ImportFenceWin32HandleInfoKHR
Valid Usage
-
handleTypemust be a value included in the Handle Types Supported by table
- If
handleTypeis notEXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT,namemust beNULL - If
handleisNULL,namemust name a valid synchronization primitive of the type specified byhandleType - If
nameisNULL,handlemust be a valid handle of the type specified byhandleType - If
handleis notNULL,namemust beNULL - If
handleis notNULL, it must obey any requirements listed forhandleTypein external fence handle types compatibility - If
nameis notNULL, it must obey any requirements listed forhandleTypein external fence handle types compatibility
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR
-
pNextmust beNULL -
fencemust be a validFencehandle -
flagsmust be a valid combination ofFenceImportFlagBitsvalues
Host Synchronization
- Host access to
fencemust be externally synchronized
See Also
ExternalFenceHandleTypeFlagBits,
Fence,
FenceImportFlags,
StructureType,
importFenceWin32HandleKHR
Constructors
| ImportFenceWin32HandleInfoKHR | |
Fields
| |
Instances
data ExportFenceWin32HandleInfoKHR Source #
VkExportFenceWin32HandleInfoKHR - Structure specifying additional attributes of Windows handles exported from a fence
Description
If
ExportFenceCreateInfo
is not inluded in the same pNext chain, this structure is ignored.
If
ExportFenceCreateInfo
is included in the pNext chain of
FenceCreateInfo with a Windows handleType, but
either ExportFenceWin32HandleInfoKHR is not included in the pNext
chain, or if it is but pAttributes is set to NULL, default security
descriptor values will be used, and child processes created by the
application will not inherit the handle, as described in the MSDN
documentation for “Synchronization Object Security and Access Rights”1.
Further, if the structure is not present, the access rights will be
DXGI_SHARED_RESOURCE_READ | DXGI_SHARED_RESOURCE_WRITE
for handles of the following types:
EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT
Valid Usage
- If
ExportFenceCreateInfo::handleTypesdoes not includeEXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT, aExportFenceWin32HandleInfoKHRstructure must not be included in thepNextchain ofFenceCreateInfo
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR
- If
pAttributesis notNULL,pAttributesmust be a valid pointer to a validSECURITY_ATTRIBUTESvalue
See Also
Constructors
| ExportFenceWin32HandleInfoKHR | |
Fields
| |
Instances
data FenceGetWin32HandleInfoKHR Source #
VkFenceGetWin32HandleInfoKHR - Structure describing a Win32 handle fence export operation
Description
The properties of the handle returned depend on the value of
handleType. See
ExternalFenceHandleTypeFlagBits
for a description of the properties of the defined external fence handle
types.
Valid Usage
-
handleTypemust have been included inExportFenceCreateInfo::handleTypeswhen thefence’s current payload was created
- If
handleTypeis defined as an NT handle,getFenceWin32HandleKHRmust be called no more than once for each valid unique combination offenceandhandleType -
fencemust 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::exportFromImportedHandleTypesforhandleType - If
handleTyperefers to a handle type with copy payload transference semantics,fencemust be signaled, or have an associated fence signal operation pending execution -
handleTypemust be defined as an NT handle or a global share handle
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR
-
pNextmust beNULL -
fencemust be a validFencehandle -
handleTypemust be a validExternalFenceHandleTypeFlagBitsvalue
See Also
ExternalFenceHandleTypeFlagBits,
Fence,
StructureType,
getFenceWin32HandleKHR
Constructors
| FenceGetWin32HandleInfoKHR | |
Fields
| |
Instances
type KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION = 1 Source #
pattern KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION :: forall a. Integral a => a Source #
type KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME = "VK_KHR_external_fence_win32" Source #
pattern KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
data SECURITY_ATTRIBUTES Source #