pub struct Semaphore { /* private fields */ }
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

Creates a new Semaphore.

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.

Creates a new Semaphore from a raw object handle.

Safety
  • handle must be a valid Vulkan object handle created from device.
  • create_info must match the info used to create the object.

Exports the semaphore into a POSIX file descriptor. The caller owns the returned File.

Imports a semaphore from a POSIX file descriptor.

The khr_external_semaphore_fd extension must be enabled on the device.

Safety
  • If in import_semaphore_fd_info, handle_type is ExternalHandleType::OpaqueFd, then file must represent a binary semaphore that was exported from Vulkan or a compatible API, with a driver and device UUID equal to those of the device that owns self.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the device that owns Self.
Executes the destructor for this type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The type of the object.
Returns the raw Vulkan handle of the object.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.