Struct vulkano::sync::Event

source ·
pub struct Event { /* private fields */ }
Expand description

Used to block the GPU execution until an event on the CPU occurs.

Note that Vulkan implementations may have limits on how long a command buffer will wait for an event to be signaled, in order to avoid interfering with progress of other clients of the GPU. If the event isn’t signaled within these limits, results are undefined and may include device loss.

Implementations

Creates a new Event.

On portability subset devices, the events feature must be enabled on the device.

Takes an event from the vulkano-provided event pool. If the pool is empty, a new event will be allocated. Upon drop, the event is put back into the pool.

For most applications, using the event pool should be preferred, in order to avoid creating new events every frame.

Creates a new Event from a raw object handle.

Safety
  • handle must be a valid Vulkan object handle created from device.
  • create_info must match the info used to create the object.

Returns true if the event is signaled.

See the docs of set().

Changes the Event to the signaled state.

If a command buffer is waiting on this event, it is then unblocked.

Panics
  • Panics if the device or host ran out of memory.

See the docs of reset().

Changes the Event to the unsignaled state.

Panics
  • Panics if the device or host ran out of memory.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the device that owns Self.
Executes the destructor for this type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The type of the object.
Returns the raw Vulkan handle of the object.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.