Struct vulkano::sync::Event[][src]

pub struct Event { /* fields omitted */ }

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

impl Event[src]

pub fn from_pool(device: Arc<Device>) -> Result<Event, OomError>[src]

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.

pub fn alloc(device: Arc<Device>) -> Result<Event, OomError>[src]

Builds a new event.

pub fn signaled(&self) -> Result<bool, OomError>[src]

Returns true if the event is signaled.

pub fn set_raw(&mut self) -> Result<(), OomError>[src]

See the docs of set().

pub fn set(&mut self)[src]

Changes the Event to the signaled state.

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

Panic

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

pub fn reset_raw(&mut self) -> Result<(), OomError>[src]

See the docs of reset().

pub fn reset(&mut self)[src]

Changes the Event to the unsignaled state.

Panic

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

Trait Implementations

impl Debug for Event[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl DeviceOwned for Event[src]

fn device(&self) -> &Arc<Device>[src]

Returns the device that owns Self.

impl Drop for Event[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

impl VulkanObject for Event[src]

type Object = Event

The type of the object.

const TYPE: ObjectType[src]

The ObjectType of the internal Vulkan handle.

fn internal_object(&self) -> Event[src]

Returns a reference to the object.

Auto Trait Implementations

impl RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> Content for T[src]

pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>[src]

Builds a pointer to this type from a raw pointer.

pub fn is_size_suitable(usize) -> bool[src]

Returns true if the size is suitable to store a type like this.

pub fn indiv_size() -> usize[src]

Returns the size of an individual element.

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.