vulkan-3.1.0.0: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Core10.QueueSemaphore

Synopsis

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 a SemaphoreCreateInfo 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 valid Device handle

Return Codes

Success
Failure

See Also

AllocationCallbacks, Device, Semaphore, SemaphoreCreateInfo

withSemaphore :: forall a r. PokeChain a => Device -> SemaphoreCreateInfo a -> Maybe AllocationCallbacks -> (Semaphore -> IO r) -> IO r Source #

A safe wrapper for createSemaphore and destroySemaphore using bracket

The allocated value must not be returned from the provided computation

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 when semaphore was created, a compatible set of callbacks must be provided here
  • If no AllocationCallbacks were provided when semaphore was created, pAllocator must be NULL

Valid Usage (Implicit)

  • device must be a valid Device handle
  • If semaphore is not NULL_HANDLE, semaphore must be a valid Semaphore handle
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure
  • If semaphore is a valid handle, it must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to semaphore must be externally synchronized

See Also

AllocationCallbacks, Device, Semaphore

data SemaphoreCreateInfo (es :: [Type]) Source #

VkSemaphoreCreateInfo - Structure specifying parameters of a newly created semaphore

Valid Usage (Implicit)

See Also

SemaphoreCreateFlags, StructureType, createSemaphore

Constructors

SemaphoreCreateInfo 

Fields

Instances
Extensible SemaphoreCreateInfo Source # 
Instance details

Defined in Graphics.Vulkan.Core10.QueueSemaphore

Show (Chain es) => Show (SemaphoreCreateInfo es) Source # 
Instance details

Defined in Graphics.Vulkan.Core10.QueueSemaphore

PeekChain es => FromCStruct (SemaphoreCreateInfo es) Source # 
Instance details

Defined in Graphics.Vulkan.Core10.QueueSemaphore

PokeChain es => ToCStruct (SemaphoreCreateInfo es) Source # 
Instance details

Defined in Graphics.Vulkan.Core10.QueueSemaphore

es ~ ([] :: [Type]) => Zero (SemaphoreCreateInfo es) Source # 
Instance details

Defined in Graphics.Vulkan.Core10.QueueSemaphore