| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.QueueSemaphore
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
Documentation
Arguments
| :: 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)
devicemust be a validDevicehandle
pCreateInfomust be a valid pointer to a validSemaphoreCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure pSemaphoremust be a valid pointer to aSemaphorehandle
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 first argument.
To just extract the pair pass (,) as the first argument.
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> Semaphore |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io () |
vkDestroySemaphore - Destroy a semaphore object
Valid Usage
- All submitted batches that refer to
semaphoremust have completed execution
- If
AllocationCallbackswere provided whensemaphorewas created, a compatible set of callbacks must be provided here - If no
AllocationCallbackswere provided whensemaphorewas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validDevicehandle
- If
semaphoreis notNULL_HANDLE,semaphoremust be a validSemaphorehandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure - If
semaphoreis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
semaphoremust be externally synchronized
See Also
data SemaphoreCreateInfo (es :: [Type]) Source #
VkSemaphoreCreateInfo - Structure specifying parameters of a newly created semaphore
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofExportSemaphoreCreateInfo,ExportSemaphoreWin32HandleInfoKHR, orSemaphoreTypeCreateInfo - The
sTypevalue of each struct in thepNextchain must be unique flagsmust be0
See Also
Constructors
| SemaphoreCreateInfo | |
Fields
| |