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

pub struct Fence<D = Arc<Device>> where D: SafeDeref<Target=Device> {
    // some 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]

See the docs of new().

Builds a new fence.

Panic

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

See the docs of signaled().

Builds a new fence already in the "signaled" state.

Panic

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

Returns true if the fence is signaled.

Waits until the fence is signaled, or at least until the number of nanoseconds of the timeout has elapsed.

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

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<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