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]
fn raw(device: D) -> Result<Fence<D>, OomError>
See the docs of new().
fn new(device: D) -> Arc<Fence<D>>
fn signaled_raw(device: D) -> Result<Fence<D>, OomError>
See the docs of signaled().
fn signaled(device: D) -> Arc<Fence<D>>
Builds a new fence already in the "signaled" state.
Panic
- Panics if the device or host ran out of memory.
fn ready(&self) -> Result<bool, OomError>
Returns true if the fence is signaled.
fn wait(&self, timeout: Duration) -> Result<(), FenceWaitError>
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.
fn multi_wait<'a, I>(iter: I, timeout: Duration) -> Result<(), FenceWaitError> where I: IntoIterator<Item=&'a Fence<D>>, D: 'a
fn reset(&mut self)
Resets the fence.
fn multi_reset<'a, I>(iter: I) where I: IntoIterator<Item=&'a mut Fence<D>>, D: 'a
Trait Implementations
impl<D: Debug> Debug for Fence<D> where D: SafeDeref<Target=Device>
[src]
impl<D> VulkanObject for Fence<D> where D: SafeDeref<Target=Device>
[src]
type Object = Fence
The type of the object.
fn internal_object(&self) -> Fence
Returns a reference to the object.