Safe Haskell | None |
---|---|
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
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 (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 ofExportSemaphoreCreateInfo
,ExportSemaphoreWin32HandleInfoKHR
, orSemaphoreTypeCreateInfo
- The
sType
value of each struct in thepNext
chain must be unique -
flags
must be0
See Also
SemaphoreCreateInfo | |
|
Instances
VkSemaphore - Opaque handle to a semaphore object
See Also
AcquireNextImageInfoKHR
,
BindSparseInfo
,
ImportSemaphoreFdInfoKHR
,
ImportSemaphoreWin32HandleInfoKHR
,
PresentInfoKHR
,
SemaphoreGetFdInfoKHR
,
SemaphoreGetWin32HandleInfoKHR
,
SemaphoreSignalInfo
,
SemaphoreWaitInfo
,
SubmitInfo
,
acquireNextImageKHR
,
createSemaphore
,
destroySemaphore
,
getSemaphoreCounterValue
,
getSemaphoreCounterValueKHR
Instances
Eq Semaphore Source # | |
Ord Semaphore Source # | |
Defined in Vulkan.Core10.Handles | |
Show Semaphore Source # | |
Storable Semaphore Source # | |
Defined in Vulkan.Core10.Handles | |
Zero 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 |
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.