Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- createEvent :: Device -> EventCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Event
- withEvent :: Device -> EventCreateInfo -> Maybe AllocationCallbacks -> (Event -> IO r) -> IO r
- destroyEvent :: Device -> Event -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
- getEventStatus :: Device -> Event -> IO Result
- setEvent :: Device -> Event -> IO ()
- resetEvent :: Device -> Event -> IO ()
- data EventCreateInfo = EventCreateInfo {}
Documentation
createEvent :: Device -> EventCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Event Source #
vkCreateEvent - Create a new event object
Parameters
Device
is the logical device that creates the event.
pCreateInfo
is a pointer to aEventCreateInfo
structure containing information about how the event is to be created.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pEvent
is 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)
pCreateInfo
must be a valid pointer to a validEventCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure pEvent
must be a valid pointer to aEvent
handle
Return Codes
See Also
withEvent :: Device -> EventCreateInfo -> Maybe AllocationCallbacks -> (Event -> IO r) -> IO r Source #
A safe wrapper for createEvent
and destroyEvent
using bracket
The allocated value must not be returned from the provided computation
destroyEvent :: Device -> Event -> ("allocator" ::: Maybe AllocationCallbacks) -> IO () Source #
vkDestroyEvent - Destroy an event object
Parameters
Device
is the logical device that destroys the event.
Event
is the handle of the event to destroy.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.
Valid Usage
- All submitted commands that refer to
Event
must have completed execution
- If
AllocationCallbacks
were provided whenEvent
was created, a compatible set of callbacks must be provided here - If no
AllocationCallbacks
were provided whenEvent
was created,pAllocator
must beNULL
Valid Usage (Implicit)
- If
Event
is notNULL_HANDLE
,Event
must be a validEvent
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure - If
Event
is a valid handle, it must have been created, allocated, or retrieved fromDevice
Host Synchronization
- Host access to
Event
must be externally synchronized
See Also
getEventStatus :: Device -> Event -> IO Result Source #
vkGetEventStatus - Retrieve the status of an event object
Parameters
Device
is the logical device that owns the event.
Event
is 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 :: Device -> Event -> IO () Source #
vkSetEvent - Set an event to signaled state
Parameters
Device
is the logical device that owns the event.
Event
is 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)
Host Synchronization
- Host access to
Event
must be externally synchronized
Return Codes
See Also
resetEvent :: Device -> Event -> IO () Source #
vkResetEvent - Reset an event to non-signaled state
Parameters
Device
is the logical device that owns the event.
Event
is 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
Event
must not be waited on by acmdWaitEvents
command that is currently executing
Valid Usage (Implicit)
Host Synchronization
- Host access to
Event
must be externally synchronized
Return Codes
See Also
data EventCreateInfo Source #
VkEventCreateInfo - Structure specifying parameters of a newly created event
Valid Usage (Implicit)
See Also
EventCreateInfo | |
|