Struct vulkano::sync::Fence [−][src]
A fence is used to know when a command buffer submission has finished its execution.
When a command buffer accesses a resource, you have to ensure that the CPU doesn’t access the same resource simultaneously (except for concurrent reads). Therefore in order to know when the CPU can access a resource again, a fence has to be used.
Implementations
impl<D> Fence<D> where
D: SafeDeref<Target = Device>,
[src]
impl<D> Fence<D> where
D: SafeDeref<Target = Device>,
[src]pub fn from_pool(device: D) -> Result<Fence<D>, OomError>
[src]
pub fn from_pool(device: D) -> Result<Fence<D>, OomError>
[src]Takes a fence from the vulkano-provided fence pool.
If the pool is empty, a new fence will be allocated.
Upon drop
, the fence is put back into the pool.
For most applications, using the fence pool should be preferred, in order to avoid creating new fences every frame.
pub fn alloc_signaled(device: D) -> Result<Fence<D>, OomError>
[src]
pub fn alloc_signaled(device: D) -> Result<Fence<D>, OomError>
[src]Builds a new fence in signaled state.
pub fn wait(&self, timeout: Option<Duration>) -> Result<(), FenceWaitError>
[src]
pub fn wait(&self, timeout: Option<Duration>) -> Result<(), FenceWaitError>
[src]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.
pub fn multi_wait<'a, I>(
iter: I,
timeout: Option<Duration>
) -> Result<(), FenceWaitError> where
I: IntoIterator<Item = &'a Fence<D>>,
D: 'a,
[src]
pub fn multi_wait<'a, I>(
iter: I,
timeout: Option<Duration>
) -> Result<(), FenceWaitError> where
I: IntoIterator<Item = &'a Fence<D>>,
D: 'a,
[src]pub fn multi_reset<'a, I>(iter: I) -> Result<(), OomError> where
I: IntoIterator<Item = &'a mut Fence<D>>,
D: 'a,
[src]
pub fn multi_reset<'a, I>(iter: I) -> Result<(), OomError> where
I: IntoIterator<Item = &'a mut Fence<D>>,
D: 'a,
[src]Trait Implementations
impl DeviceOwned for Fence
[src]
impl DeviceOwned for Fence
[src]impl<D> VulkanObject for Fence<D> where
D: SafeDeref<Target = Device>,
[src]
impl<D> VulkanObject for Fence<D> where
D: SafeDeref<Target = Device>,
[src]const TYPE: ObjectType
[src]
const TYPE: ObjectType
[src]The ObjectType
of the internal Vulkan handle.
fn internal_object(&self) -> Fence
[src]
fn internal_object(&self) -> Fence
[src]Returns a reference to the object.
Auto Trait Implementations
impl<D> RefUnwindSafe for Fence<D> where
D: RefUnwindSafe,
D: RefUnwindSafe,
impl<D> Send for Fence<D> where
D: Send,
D: Send,
impl<D> Sync for Fence<D> where
D: Sync,
D: Sync,
impl<D> Unpin for Fence<D> where
D: Unpin,
D: Unpin,
impl<D> UnwindSafe for Fence<D> where
D: UnwindSafe,
D: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Content for T
[src]
impl<T> Content for T
[src]pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>
[src]
pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>
[src]Builds a pointer to this type from a raw pointer.
pub fn is_size_suitable(usize) -> bool
[src]
pub fn is_size_suitable(usize) -> bool
[src]Returns true if the size is suitable to store a type like this.
pub fn indiv_size() -> usize
[src]
pub fn indiv_size() -> usize
[src]Returns the size of an individual element.