Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- createSemaphore :: forall a io. (PokeChain a, MonadIO io) => Device -> SemaphoreCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Semaphore
- withSemaphore :: forall a io r. (PokeChain a, MonadIO io) => (io Semaphore -> (Semaphore -> io ()) -> r) -> Device -> SemaphoreCreateInfo a -> Maybe AllocationCallbacks -> 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. (PokeChain a, MonadIO io) => Device -> SemaphoreCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Semaphore Source #
vkCreateSemaphore - Create a new queue semaphore object
Parameters
device
is the logical device that creates the semaphore.
pCreateInfo
is a pointer to aSemaphoreCreateInfo
structure containing information about how the semaphore is to be created.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pSemaphore
is a pointer to a handle in which the resulting semaphore object is returned.
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. (PokeChain a, MonadIO io) => (io Semaphore -> (Semaphore -> io ()) -> r) -> Device -> SemaphoreCreateInfo a -> Maybe AllocationCallbacks -> 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
device
is the logical device that destroys the semaphore.
semaphore
is the handle of the semaphore to destroy.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.
Valid Usage
- All submitted batches that refer to
semaphore
must have completed execution
- 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 | |
|