| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.Event
Synopsis
- createEvent :: forall io. MonadIO io => Device -> EventCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io Event
- withEvent :: forall io r. MonadIO io => Device -> EventCreateInfo -> Maybe AllocationCallbacks -> (io Event -> (Event -> io ()) -> r) -> r
- destroyEvent :: forall io. MonadIO io => Device -> Event -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- getEventStatus :: forall io. MonadIO io => Device -> Event -> io Result
- setEvent :: forall io. MonadIO io => Device -> Event -> io ()
- resetEvent :: forall io. MonadIO io => Device -> Event -> io ()
- data EventCreateInfo = EventCreateInfo {}
Documentation
createEvent :: forall io. MonadIO io => Device -> EventCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io Event Source #
vkCreateEvent - Create a new event object
Parameters
deviceis the logical device that creates the event.
pCreateInfois a pointer to aEventCreateInfostructure containing information about how the event is to be created.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pEventis a pointer to a handle in which the resulting event object is returned.
Description
When created, the event object is in the unsignaled state.
Valid Usage (Implicit)
devicemust be a validDevicehandle
pCreateInfomust be a valid pointer to a validEventCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure pEventmust be a valid pointer to aEventhandle
Return Codes
See Also
withEvent :: forall io r. MonadIO io => Device -> EventCreateInfo -> Maybe AllocationCallbacks -> (io Event -> (Event -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createEvent and destroyEvent
To ensure that destroyEvent 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.
destroyEvent :: forall io. MonadIO io => Device -> Event -> ("allocator" ::: Maybe AllocationCallbacks) -> io () Source #
vkDestroyEvent - Destroy an event object
Parameters
deviceis the logical device that destroys the event.
eventis the handle of the event to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
Valid Usage
- All submitted commands that refer to
eventmust have completed execution
- If
AllocationCallbackswere provided wheneventwas created, a compatible set of callbacks must be provided here - If no
AllocationCallbackswere provided wheneventwas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validDevicehandle
- If
eventis notNULL_HANDLE,eventmust be a validEventhandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure - If
eventis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
eventmust be externally synchronized
See Also
getEventStatus :: forall io. MonadIO io => Device -> Event -> io Result Source #
vkGetEventStatus - Retrieve the status of an event object
Parameters
deviceis the logical device that owns the event.
eventis the handle of the event to query.
Description
Upon success, getEventStatus returns the state of the event object
with the following return codes:
| Status | Meaning |
|---|---|
EVENT_SET
| The event specified by event is
signaled. |
EVENT_RESET
| The event specified by event is
unsignaled. |
Event Object Status Codes
If a cmdSetEvent or
cmdResetEvent command is in a
command buffer that is in the
pending state,
then the value returned by this command may immediately be out of
date.
The state of an event can be updated by the host. The state of the
event is immediately changed, and subsequent calls to getEventStatus
will return the new state. If an event is already in the requested
state, then updating it to the same state has no effect.
Return Codes
See Also
setEvent :: forall io. MonadIO io => Device -> Event -> io () Source #
vkSetEvent - Set an event to signaled state
Parameters
deviceis the logical device that owns the event.
eventis the event to set.
Description
When setEvent is executed on the host, it defines an /event signal
operation/ which sets the event to the signaled state.
If event is already in the signaled state when setEvent is executed,
then setEvent has no effect, and no event signal operation occurs.
Valid Usage (Implicit)
devicemust be a validDevicehandle
eventmust be a validEventhandleeventmust have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
eventmust be externally synchronized
Return Codes
See Also
resetEvent :: forall io. MonadIO io => Device -> Event -> io () Source #
vkResetEvent - Reset an event to non-signaled state
Parameters
deviceis the logical device that owns the event.
eventis the event to reset.
Description
When resetEvent is executed on the host, it defines an /event unsignal
operation/ which resets the event to the unsignaled state.
If event is already in the unsignaled state when resetEvent is
executed, then resetEvent has no effect, and no event unsignal
operation occurs.
Valid Usage
eventmust not be waited on by acmdWaitEventscommand that is currently executing
Valid Usage (Implicit)
devicemust be a validDevicehandle
eventmust be a validEventhandleeventmust have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
eventmust be externally synchronized
Return Codes
See Also
data EventCreateInfo Source #
VkEventCreateInfo - Structure specifying parameters of a newly created event
Valid Usage (Implicit)
See Also
Constructors
| EventCreateInfo | |
Fields
| |