[−][src]Struct nannou::vk::sync::FenceSignalFuture
Represents a fence being signaled after a previous event.
Contrary to most other future types, it is possible to block the current thread until the event
happens. This is done by calling the wait()
function.
Also note that the GpuFuture
trait is implemented on Arc<FenceSignalFuture<_>>
.
This means that you can put this future in an Arc
and keep a copy of it somewhere in order
to know when the execution reached that point.
use std::sync::Arc; use vulkano::sync::GpuFuture; // Assuming you have a chain of operations, like this: // let future = ... // .then_execute(foo) // .then_execute(bar) // You can signal a fence at this point of the chain, and put the future in an `Arc`. let fence_signal = Arc::new(future.then_signal_fence()); // And then continue the chain: // fence_signal.clone() // .then_execute(baz) // .then_execute(qux) // Later you can wait until you reach the point of `fence_signal`: fence_signal.wait(None).unwrap();
Methods
impl<F> FenceSignalFuture<F> where
F: GpuFuture,
[src]
F: GpuFuture,
pub fn wait(&self, timeout: Option<Duration>) -> Result<(), FlushError>
[src]
Blocks the current thread until the fence is signaled by the GPU. Performs a flush if necessary.
If timeout
is None
, then the wait is infinite. Otherwise the thread will unblock after
the specified timeout has elapsed and an error will be returned.
If the wait is successful, this function also cleans any resource locked by previous submissions.
Trait Implementations
impl<F> GpuFuture for FenceSignalFuture<F> where
F: GpuFuture,
[src]
F: GpuFuture,
fn cleanup_finished(&mut self)
[src]
unsafe fn build_submission(&self) -> Result<SubmitAnyBuilder, FlushError>
[src]
fn flush(&self) -> Result<(), FlushError>
[src]
unsafe fn signal_finished(&self)
[src]
fn queue_change_allowed(&self) -> bool
[src]
fn queue(&self) -> Option<Arc<Queue>>
[src]
fn check_buffer_access(
&self,
buffer: &dyn BufferAccess,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
[src]
&self,
buffer: &dyn BufferAccess,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
fn check_image_access(
&self,
image: &dyn ImageAccess,
layout: ImageLayout,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
[src]
&self,
image: &dyn ImageAccess,
layout: ImageLayout,
exclusive: bool,
queue: &Queue
) -> Result<Option<(PipelineStages, AccessFlagBits)>, AccessCheckError>
fn join<F>(self, other: F) -> JoinFuture<Self, F> where
F: GpuFuture,
[src]
F: GpuFuture,
Joins this future with another one, representing the moment when both events have happened.
fn then_execute<Cb>(
self,
queue: Arc<Queue>,
command_buffer: Cb
) -> Result<CommandBufferExecFuture<Self, Cb>, CommandBufferExecError> where
Cb: CommandBuffer + 'static,
[src]
self,
queue: Arc<Queue>,
command_buffer: Cb
) -> Result<CommandBufferExecFuture<Self, Cb>, CommandBufferExecError> where
Cb: CommandBuffer + 'static,
Executes a command buffer after this future. Read more
fn then_execute_same_queue<Cb>(
self,
command_buffer: Cb
) -> Result<CommandBufferExecFuture<Self, Cb>, CommandBufferExecError> where
Cb: CommandBuffer + 'static,
[src]
self,
command_buffer: Cb
) -> Result<CommandBufferExecFuture<Self, Cb>, CommandBufferExecError> where
Cb: CommandBuffer + 'static,
Executes a command buffer after this future, on the same queue as the future. Read more
fn then_signal_semaphore(self) -> SemaphoreSignalFuture<Self>
[src]
Signals a semaphore after this future. Returns another future that represents the signal. Read more
fn then_signal_semaphore_and_flush(
self
) -> Result<SemaphoreSignalFuture<Self>, FlushError>
[src]
self
) -> Result<SemaphoreSignalFuture<Self>, FlushError>
Signals a semaphore after this future and flushes it. Returns another future that represents the moment when the semaphore is signalled. Read more
fn then_signal_fence(self) -> FenceSignalFuture<Self>
[src]
Signals a fence after this future. Returns another future that represents the signal. Read more
fn then_signal_fence_and_flush(
self
) -> Result<FenceSignalFuture<Self>, FlushError>
[src]
self
) -> Result<FenceSignalFuture<Self>, FlushError>
Signals a fence after this future. Returns another future that represents the signal. Read more
fn then_swapchain_present<W>(
self,
queue: Arc<Queue>,
swapchain: Arc<Swapchain<W>>,
image_index: usize
) -> PresentFuture<Self, W>
[src]
self,
queue: Arc<Queue>,
swapchain: Arc<Swapchain<W>>,
image_index: usize
) -> PresentFuture<Self, W>
Presents a swapchain image after this future. Read more
fn then_swapchain_present_incremental<W>(
self,
queue: Arc<Queue>,
swapchain: Arc<Swapchain<W>>,
image_index: usize,
present_region: PresentRegion
) -> PresentFuture<Self, W>
[src]
self,
queue: Arc<Queue>,
swapchain: Arc<Swapchain<W>>,
image_index: usize,
present_region: PresentRegion
) -> PresentFuture<Self, W>
Same as then_swapchain_present
, except it allows specifying a present region. Read more
impl<F> DeviceOwned for FenceSignalFuture<F> where
F: GpuFuture,
[src]
F: GpuFuture,
impl<F> Drop for FenceSignalFuture<F> where
F: GpuFuture,
[src]
F: GpuFuture,
Auto Trait Implementations
impl<F> Send for FenceSignalFuture<F> where
F: Send,
F: Send,
impl<F> Sync for FenceSignalFuture<F> where
F: Send,
F: Send,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeviceOwned for T where
T: Deref,
<T as Deref>::Target: DeviceOwned,
[src]
T: Deref,
<T as Deref>::Target: DeviceOwned,
impl<T> Content for T
[src]
fn ref_from_ptr(ptr: *mut c_void, size: usize) -> Option<*mut T>
[src]
fn is_size_suitable(size: usize) -> bool
[src]
fn indiv_size() -> usize
[src]
impl<T> SafeBorrow<T> for T
[src]
impl<T> Erased for T
impl<S> FromSample<S> for S
[src]
fn from_sample_(s: S) -> S
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(self) -> U
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.