Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- createSemaphore :: forall a io. (Extendss SemaphoreCreateInfo a, PokeChain a, MonadIO io) => Device -> SemaphoreCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Semaphore
- withSemaphore :: forall a io r. (Extendss SemaphoreCreateInfo a, PokeChain a, MonadIO io) => Device -> SemaphoreCreateInfo a -> Maybe AllocationCallbacks -> (io Semaphore -> (Semaphore -> io ()) -> r) -> r
- destroySemaphore :: forall io. MonadIO io => Device -> Semaphore -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- data SemaphoreCreateInfo (es :: [Type]) = SemaphoreCreateInfo {
- next :: Chain es
- flags :: SemaphoreCreateFlags
- newtype Semaphore = Semaphore Word64
- newtype SemaphoreCreateFlags = SemaphoreCreateFlags Flags
Documentation
:: forall a io. (Extendss SemaphoreCreateInfo a, PokeChain a, MonadIO io) | |
=> Device |
|
-> SemaphoreCreateInfo a |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io Semaphore |
vkCreateSemaphore - Create a new queue semaphore object
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pCreateInfo
must be a valid pointer to a validSemaphoreCreateInfo
structure - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure -
pSemaphore
must be a valid pointer to aSemaphore
handle
Return Codes
See Also
VK_VERSION_1_0,
AllocationCallbacks
,
Device
, Semaphore
,
SemaphoreCreateInfo
withSemaphore :: forall a io r. (Extendss SemaphoreCreateInfo a, PokeChain a, MonadIO io) => Device -> SemaphoreCreateInfo a -> Maybe AllocationCallbacks -> (io Semaphore -> (Semaphore -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createSemaphore
and destroySemaphore
To ensure that destroySemaphore
is always called: pass
bracket
(or the allocate function from your
favourite resource management library) as the last argument.
To just extract the pair pass (,)
as the last argument.
:: forall io. MonadIO io | |
=> Device |
|
-> Semaphore |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io () |
vkDestroySemaphore - Destroy a semaphore object
Valid Usage
- If
AllocationCallbacks
were provided whensemaphore
was created, a compatible set of callbacks must be provided here - If no
AllocationCallbacks
were provided whensemaphore
was created,pAllocator
must beNULL
Valid Usage (Implicit)
-
device
must be a validDevice
handle
- If
semaphore
is notNULL_HANDLE
,semaphore
must be a validSemaphore
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure - If
semaphore
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
semaphore
must be externally synchronized
See Also
data SemaphoreCreateInfo (es :: [Type]) Source #
VkSemaphoreCreateInfo - Structure specifying parameters of a newly created semaphore
Valid Usage
- If the
pNext
chain includes aExportMetalObjectCreateInfoEXT
structure, itsexportObjectType
member must beEXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofExportMetalObjectCreateInfoEXT
,ExportSemaphoreCreateInfo
,ExportSemaphoreWin32HandleInfoKHR
,ImportMetalSharedEventInfoEXT
, orSemaphoreTypeCreateInfo
- The
sType
value of each struct in thepNext
chain must be unique, with the exception of structures of typeExportMetalObjectCreateInfoEXT
-
flags
must be0
See Also
VK_VERSION_1_0,
SemaphoreCreateFlags
,
StructureType
, createSemaphore
SemaphoreCreateInfo | |
|
Instances
VkSemaphore - Opaque handle to a semaphore object
See Also
VK_VERSION_1_0,
AcquireNextImageInfoKHR
,
BindSparseInfo
,
ExportMetalSharedEventInfoEXT
,
ImportSemaphoreFdInfoKHR
,
ImportSemaphoreWin32HandleInfoKHR
,
ImportSemaphoreZirconHandleInfoFUCHSIA
,
PresentInfoKHR
,
SemaphoreGetFdInfoKHR
,
SemaphoreGetWin32HandleInfoKHR
,
SemaphoreGetZirconHandleInfoFUCHSIA
,
SemaphoreSignalInfo
,
SemaphoreSubmitInfo
,
SemaphoreWaitInfo
,
SubmitInfo
,
acquireNextImageKHR
,
createSemaphore
,
destroySemaphore
,
getSemaphoreCounterValue
,
getSemaphoreCounterValueKHR
Instances
Storable Semaphore Source # | |
Defined in Vulkan.Core10.Handles | |
Show Semaphore Source # | |
Eq Semaphore Source # | |
Ord Semaphore Source # | |
Defined in Vulkan.Core10.Handles | |
HasObjectType Semaphore Source # | |
Defined in Vulkan.Core10.Handles objectTypeAndHandle :: Semaphore -> (ObjectType, Word64) Source # | |
IsHandle Semaphore Source # | |
Defined in Vulkan.Core10.Handles | |
Zero Semaphore Source # | |
Defined in Vulkan.Core10.Handles |
newtype SemaphoreCreateFlags Source #
VkSemaphoreCreateFlags - Reserved for future use
Description
SemaphoreCreateFlags
is a bitmask type for setting a mask, but is
currently reserved for future use.