| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.Event
Synopsis
- createEvent :: forall a io. (Extendss EventCreateInfo a, PokeChain a, MonadIO io) => Device -> EventCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io Event
- withEvent :: forall a io r. (Extendss EventCreateInfo a, PokeChain a, MonadIO io) => Device -> EventCreateInfo a -> 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 (es :: [Type]) = EventCreateInfo {
- next :: Chain es
- flags :: EventCreateFlags
- newtype Event = Event Word64
- newtype EventCreateFlagBits where
- type EventCreateFlags = EventCreateFlagBits
Documentation
Arguments
| :: forall a io. (Extendss EventCreateInfo a, PokeChain a, MonadIO io) | |
| => Device |
|
| -> EventCreateInfo a |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io Event |
vkCreateEvent - Create a new event object
Description
When created, the event object is in the unsignaled state.
Valid Usage
- If the
VK_KHR_portability_subsetextension is enabled, andPhysicalDevicePortabilitySubsetFeaturesKHR::eventsisFALSE, then the implementation does not support events, andcreateEventmust not be used
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
VK_VERSION_1_0,
AllocationCallbacks,
Device, Event,
EventCreateInfo
withEvent :: forall a io r. (Extendss EventCreateInfo a, PokeChain a, MonadIO io) => Device -> EventCreateInfo a -> 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 last argument.
To just extract the pair pass (,) as the last argument.
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> Event |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io () |
vkDestroyEvent - Destroy an event object
Valid Usage
- 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
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> Event |
|
| -> io Result |
vkGetEventStatus - Retrieve the status of an event object
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
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> Event |
|
| -> io () |
vkSetEvent - Set an event to signaled state
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.
Note
If a command buffer is waiting for an event to be signaled from the host, the application must signal the event before submitting the command buffer, as described in the queue forward progress section.
Valid Usage
-
eventmust not have been created withEVENT_CREATE_DEVICE_ONLY_BIT
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
eventmust be a validEventhandle -
eventmust have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
eventmust be externally synchronized
Return Codes
See Also
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> Event |
|
| -> io () |
vkResetEvent - Reset an event to non-signaled state
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
- There must be an execution
dependency between
resetEventand the execution of anycmdWaitEventsthat includeseventin itspEventsparameter
- There must be an execution
dependency between
resetEventand the execution of anycmdWaitEvents2that includeseventin itspEventsparameter -
eventmust not have been created withEVENT_CREATE_DEVICE_ONLY_BIT
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
eventmust be a validEventhandle -
eventmust have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
eventmust be externally synchronized
Return Codes
See Also
data EventCreateInfo (es :: [Type]) Source #
VkEventCreateInfo - Structure specifying parameters of a newly created event
Valid Usage
- If the
pNextchain includes aExportMetalObjectCreateInfoEXTstructure, itsexportObjectTypemember must beEXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_EVENT_CREATE_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofExportMetalObjectCreateInfoEXTorImportMetalSharedEventInfoEXT - The
sTypevalue of each struct in thepNextchain must be unique, with the exception of structures of typeExportMetalObjectCreateInfoEXT -
flagsmust be a valid combination ofEventCreateFlagBitsvalues
See Also
VK_VERSION_1_0,
EventCreateFlags,
StructureType, createEvent
Constructors
| EventCreateInfo | |
Fields
| |
Instances
VkEvent - Opaque handle to an event object
See Also
VK_VERSION_1_0,
ExportMetalSharedEventInfoEXT,
cmdResetEvent,
cmdResetEvent2,
cmdResetEvent2KHR,
cmdSetEvent,
cmdSetEvent2,
cmdSetEvent2KHR,
cmdWaitEvents,
cmdWaitEvents2,
cmdWaitEvents2KHR,
createEvent, destroyEvent,
getEventStatus, resetEvent,
setEvent
Instances
| Storable Event Source # | |
| Show Event Source # | |
| Eq Event Source # | |
| Ord Event Source # | |
| HasObjectType Event Source # | |
Defined in Vulkan.Core10.Handles Methods objectTypeAndHandle :: Event -> (ObjectType, Word64) Source # | |
| IsHandle Event Source # | |
Defined in Vulkan.Core10.Handles | |
| Zero Event Source # | |
Defined in Vulkan.Core10.Handles | |
newtype EventCreateFlagBits Source #
Constructors
| EventCreateFlagBits Flags |
Bundled Patterns
| pattern EVENT_CREATE_DEVICE_ONLY_BIT :: EventCreateFlagBits |
|