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
sourceimpl Event
impl Event
sourcepub fn new(
device: Arc<Device>,
create_info: EventCreateInfo
) -> Result<Event, OomError>
pub fn new(
device: Arc<Device>,
create_info: EventCreateInfo
) -> Result<Event, OomError>
Creates a new Event
.
sourcepub fn from_pool(device: Arc<Device>) -> Result<Event, OomError>
pub fn from_pool(device: Arc<Device>) -> Result<Event, OomError>
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.
Trait Implementations
sourceimpl DeviceOwned for Event
impl DeviceOwned for Event
sourceimpl VulkanObject for Event
impl VulkanObject for Event
sourcefn internal_object(&self) -> Event
fn internal_object(&self) -> Event
Returns a reference to the object.
impl Eq for Event
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more