| 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
createSemaphore :: forall a io. (Extendss SemaphoreCreateInfo a, PokeChain a, MonadIO io) => Device -> SemaphoreCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Semaphore Source #
vkCreateSemaphore - Create a new queue semaphore object
Parameters
deviceis the logical device that creates the semaphore.
pCreateInfois a pointer to aSemaphoreCreateInfostructure containing information about how the semaphore is to be created.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pSemaphoreis a pointer to a handle in which the resulting semaphore object is returned.
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.
destroySemaphore :: forall io. MonadIO io => Device -> Semaphore -> ("allocator" ::: Maybe AllocationCallbacks) -> io () Source #
vkDestroySemaphore - Destroy a semaphore object
Parameters
deviceis the logical device that destroys the semaphore.
semaphoreis the handle of the semaphore to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
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
| |