Struct vulkano::sync::Fence [] [src]

pub struct Fence<D = Arc<Device>> where
    D: SafeDeref<Target = Device>, 
{ /* fields omitted */ }

A fence is used to know when a command buffer submission has finished its execution.

When a command buffer accesses a ressource, you have to ensure that the CPU doesn't access the same ressource simultaneously (except for concurrent reads). Therefore in order to know when the CPU can access a ressource again, a fence has to be used.

Methods

impl<D> Fence<D> where
    D: SafeDeref<Target = Device>, 
[src]

Builds a new fence.

See the docs of signaled().

Returns true if the fence is signaled.

Waits until the fence is signaled, or at least until the timeout duration has elapsed.

Returns Ok if the fence is now signaled. Returns Err if the timeout was reached instead.

If you pass a duration of 0, then the function will return without blocking.

Waits for multiple fences at once.

Panic

Panics if not all fences belong to the same device.

Resets the fence.

Resets multiple fences at once.

Panic

  • Panics if not all fences belong to the same device.

Trait Implementations

impl<D: Debug> Debug for Fence<D> where
    D: SafeDeref<Target = Device>, 
[src]

Formats the value using the given formatter.

impl DeviceOwned for Fence
[src]

Returns the device that owns Self.

impl<D> VulkanObject for Fence<D> where
    D: SafeDeref<Target = Device>, 
[src]

The type of the object.

Returns a reference to the object.

impl<D> Drop for Fence<D> where
    D: SafeDeref<Target = Device>, 
[src]

A method called when the value goes out of scope. Read more