Expand description
Used to provide synchronization between command buffers during their execution.
It is similar to a fence, except that it is purely on the GPU side. The CPU can’t query a semaphore’s status or wait for it to be signaled.
Implementations
sourceimpl<D> Semaphore<D>where
D: SafeDeref<Target = Device>,
impl<D> Semaphore<D>where
D: SafeDeref<Target = Device>,
sourcepub fn from_pool(device: D) -> Result<Semaphore<D>, OomError>
pub fn from_pool(device: D) -> Result<Semaphore<D>, OomError>
Takes a semaphore from the vulkano-provided semaphore pool.
If the pool is empty, a new semaphore will be allocated.
Upon drop
, the semaphore is put back into the pool.
For most applications, using the pool should be preferred, in order to avoid creating new semaphores every frame.
Trait Implementations
sourceimpl DeviceOwned for Semaphore
impl DeviceOwned for Semaphore
sourceimpl<D> VulkanObject for Semaphore<D>where
D: SafeDeref<Target = Device>,
impl<D> VulkanObject for Semaphore<D>where
D: SafeDeref<Target = Device>,
sourceconst TYPE: DebugReportObjectTypeEXT = 5u32
const TYPE: DebugReportObjectTypeEXT = 5u32
The
DebugReportObjectTypeEXT
of the internal Vulkan handle.sourcefn internal_object(&self) -> Semaphore
fn internal_object(&self) -> Semaphore
Returns a reference to the object.
Auto Trait Implementations
impl<D> RefUnwindSafe for Semaphore<D>where
D: RefUnwindSafe,
impl<D> Send for Semaphore<D>where
D: Send,
impl<D> Sync for Semaphore<D>where
D: Sync,
impl<D> Unpin for Semaphore<D>where
D: Unpin,
impl<D> UnwindSafe for Semaphore<D>where
D: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Content for T
impl<T> Content for T
sourcefn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
sourcefn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
sourcefn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.