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

Vulkan.Extensions.VK_KHR_external_semaphore_win32

Synopsis

Documentation

getSemaphoreWin32HandleKHR 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

-> SemaphoreGetWin32HandleInfoKHR

pGetWin32HandleInfo is a pointer to a SemaphoreGetWin32HandleInfoKHR structure containing parameters of the export operation.

pGetWin32HandleInfo must be a valid pointer to a valid SemaphoreGetWin32HandleInfoKHR structure

-> io HANDLE 

vkGetSemaphoreWin32HandleKHR - Get a Windows HANDLE for a semaphore

Description

For handle types defined as NT handles, the handles returned by getSemaphoreWin32HandleKHR 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 semaphore may have side effects depending on the transference of the specified handle type, as described in Importing Semaphore Payloads.

Return Codes

Success
Failure

See Also

Device, SemaphoreGetWin32HandleInfoKHR

importSemaphoreWin32HandleKHR Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device that created the semaphore.

device must be a valid Device handle

-> ImportSemaphoreWin32HandleInfoKHR

pImportSemaphoreWin32HandleInfo is a pointer to a ImportSemaphoreWin32HandleInfoKHR structure specifying the semaphore and import parameters.

pImportSemaphoreWin32HandleInfo must be a valid pointer to a valid ImportSemaphoreWin32HandleInfoKHR structure

-> io () 

vkImportSemaphoreWin32HandleKHR - Import a semaphore from a Windows HANDLE

Description

Importing a semaphore 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 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

Device, ImportSemaphoreWin32HandleInfoKHR

data ImportSemaphoreWin32HandleInfoKHR Source #

VkImportSemaphoreWin32HandleInfoKHR - Structure specifying Windows handle to import to a semaphore

Description

The handle types supported by handleType are:

Handle Type Transference Permanence Supported
EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT Reference Temporary,Permanent
EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT Reference Temporary,Permanent
EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT Reference Temporary,Permanent

Handle Types Supported by ImportSemaphoreWin32HandleInfoKHR

Valid Usage

Valid Usage (Implicit)

Host Synchronization

  • Host access to semaphore must be externally synchronized

See Also

ExternalSemaphoreHandleTypeFlagBits, Semaphore, SemaphoreImportFlags, StructureType, importSemaphoreWin32HandleKHR

Constructors

ImportSemaphoreWin32HandleInfoKHR 

Fields

Instances

Instances details
Eq ImportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Show ImportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Generic ImportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Associated Types

type Rep ImportSemaphoreWin32HandleInfoKHR :: Type -> Type #

Storable ImportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

FromCStruct ImportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

ToCStruct ImportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Zero ImportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

type Rep ImportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

data ExportSemaphoreWin32HandleInfoKHR Source #

VkExportSemaphoreWin32HandleInfoKHR - Structure specifying additional attributes of Windows handles exported from a semaphore

Description

If ExportSemaphoreCreateInfo is not present in the same pNext chain, this structure is ignored.

If ExportSemaphoreCreateInfo is present in the pNext chain of SemaphoreCreateInfo with a Windows handleType, but either ExportSemaphoreWin32HandleInfoKHR is not present 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 used depend on the handle type.

For handles of the following types:

EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT

The implementation must ensure the access rights allow both signal and wait operations on the semaphore.

For handles of the following types:

EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT

The access rights must be:

GENERIC_ALL
1
https://docs.microsoft.com/en-us/windows/win32/sync/synchronization-object-security-and-access-rights

Valid Usage

Valid Usage (Implicit)

  • If pAttributes is not NULL, pAttributes must be a valid pointer to a valid SECURITY_ATTRIBUTES value

See Also

StructureType

Constructors

ExportSemaphoreWin32HandleInfoKHR 

Fields

  • attributes :: Ptr SECURITY_ATTRIBUTES

    pAttributes is a pointer to a Windows SECURITY_ATTRIBUTES structure specifying security attributes of the handle.

  • dwAccess :: DWORD

    dwAccess is a DWORD specifying access rights of the handle.

  • name :: LPCWSTR

    name is a null-terminated UTF-16 string to associate with the underlying synchronization primitive referenced by NT handles exported from the created semaphore.

Instances

Instances details
Eq ExportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Show ExportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Generic ExportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Associated Types

type Rep ExportSemaphoreWin32HandleInfoKHR :: Type -> Type #

Storable ExportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

FromCStruct ExportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

ToCStruct ExportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Zero ExportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

type Rep ExportSemaphoreWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

type Rep ExportSemaphoreWin32HandleInfoKHR = D1 ('MetaData "ExportSemaphoreWin32HandleInfoKHR" "Vulkan.Extensions.VK_KHR_external_semaphore_win32" "vulkan-3.6.3-inplace" 'False) (C1 ('MetaCons "ExportSemaphoreWin32HandleInfoKHR" 'PrefixI 'True) (S1 ('MetaSel ('Just "attributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Ptr SECURITY_ATTRIBUTES)) :*: (S1 ('MetaSel ('Just "dwAccess") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DWORD) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LPCWSTR))))

data D3D12FenceSubmitInfoKHR Source #

VkD3D12FenceSubmitInfoKHR - Structure specifying values for Direct3D 12 fence-backed semaphores

Description

If the semaphore in SubmitInfo::pWaitSemaphores or SubmitInfo::pSignalSemaphores corresponding to an entry in pWaitSemaphoreValues or pSignalSemaphoreValues respectively does not currently have a payload referring to a Direct3D 12 fence, the implementation must ignore the value in the pWaitSemaphoreValues or pSignalSemaphoreValues entry.

Note

As the introduction of the external semaphore handle type EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT predates that of timeline semaphores, support for importing semaphore payloads from external handles of that type into semaphores created (implicitly or explicitly) with a SemaphoreType of SEMAPHORE_TYPE_BINARY is preserved for backwards compatibility. However, applications should prefer importing such handle types into semaphores created with a SemaphoreType of SEMAPHORE_TYPE_TIMELINE, and use the TimelineSemaphoreSubmitInfo structure instead of the D3D12FenceSubmitInfoKHR structure to specify the values to use when waiting for and signaling such semaphores.

Valid Usage

Valid Usage (Implicit)

  • If waitSemaphoreValuesCount is not 0, and pWaitSemaphoreValues is not NULL, pWaitSemaphoreValues must be a valid pointer to an array of waitSemaphoreValuesCount uint64_t values
  • If signalSemaphoreValuesCount is not 0, and pSignalSemaphoreValues is not NULL, pSignalSemaphoreValues must be a valid pointer to an array of signalSemaphoreValuesCount uint64_t values

See Also

StructureType

Constructors

D3D12FenceSubmitInfoKHR 

Fields

Instances

Instances details
Show D3D12FenceSubmitInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Generic D3D12FenceSubmitInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Associated Types

type Rep D3D12FenceSubmitInfoKHR :: Type -> Type #

FromCStruct D3D12FenceSubmitInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

ToCStruct D3D12FenceSubmitInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Zero D3D12FenceSubmitInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

type Rep D3D12FenceSubmitInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

type Rep D3D12FenceSubmitInfoKHR = D1 ('MetaData "D3D12FenceSubmitInfoKHR" "Vulkan.Extensions.VK_KHR_external_semaphore_win32" "vulkan-3.6.3-inplace" 'False) (C1 ('MetaCons "D3D12FenceSubmitInfoKHR" 'PrefixI 'True) ((S1 ('MetaSel ('Just "waitSemaphoreValuesCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "waitSemaphoreValues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Vector Word64))) :*: (S1 ('MetaSel ('Just "signalSemaphoreValuesCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word32) :*: S1 ('MetaSel ('Just "signalSemaphoreValues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Vector Word64)))))

data SemaphoreGetWin32HandleInfoKHR Source #

VkSemaphoreGetWin32HandleInfoKHR - Structure describing a Win32 handle semaphore export operation

Description

The properties of the 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 in ExportSemaphoreCreateInfo::handleTypes when the semaphore’s current payload was created
  • If handleType is defined as an NT handle, getSemaphoreWin32HandleKHR must be called no more than once for each valid unique combination of semaphore and handleType
  • 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 an NT handle or a global share handle

Valid Usage (Implicit)

See Also

ExternalSemaphoreHandleTypeFlagBits, Semaphore, StructureType, getSemaphoreWin32HandleKHR

Constructors

SemaphoreGetWin32HandleInfoKHR 

Fields

Instances

Instances details
Eq SemaphoreGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Show SemaphoreGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Generic SemaphoreGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Associated Types

type Rep SemaphoreGetWin32HandleInfoKHR :: Type -> Type #

Storable SemaphoreGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

FromCStruct SemaphoreGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

ToCStruct SemaphoreGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

Zero SemaphoreGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

type Rep SemaphoreGetWin32HandleInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_external_semaphore_win32

type Rep SemaphoreGetWin32HandleInfoKHR = D1 ('MetaData "SemaphoreGetWin32HandleInfoKHR" "Vulkan.Extensions.VK_KHR_external_semaphore_win32" "vulkan-3.6.3-inplace" 'False) (C1 ('MetaCons "SemaphoreGetWin32HandleInfoKHR" 'PrefixI 'True) (S1 ('MetaSel ('Just "semaphore") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Semaphore) :*: S1 ('MetaSel ('Just "handleType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ExternalSemaphoreHandleTypeFlagBits)))

type KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME = "VK_KHR_external_semaphore_win32" Source #

type HANDLE = Ptr () Source #