wgpu_hal::vulkan::semaphore_list

Struct SemaphoreList

Source
pub struct SemaphoreList {
    semaphores: Vec<Semaphore>,
    values: Vec<u64>,
}
Available on vulkan only.
Expand description

A list of Vulkan semaphores to signal.

This represents a list of binary or timeline semaphores, together with values for the timeline semaphores.

This type ensures that the array of semaphores to be signaled stays aligned with the array of values for timeline semaphores appearing in that list. The add_to_submit method prepares the vkQueueSubmit arguments appropriately for whatever semaphores we actually have.

Fields§

§semaphores: Vec<Semaphore>

Semaphores to signal.

This can be a mix of binary and timeline semaphores.

§values: Vec<u64>

Values for timeline semaphores.

If no timeline semaphores are present in semaphores, this is empty. If any timeline semaphores are present, then this has the same length as semaphores, with dummy !0 values in the elements corresponding to binary semaphores, since Vulkan ignores these.

Implementations§

Source§

impl SemaphoreList

Source

pub fn is_empty(&self) -> bool

Source

pub fn add_to_submit<'i, 's: 'i>( &'s self, submit_info: SubmitInfo<'i>, timeline_info: &'i mut MaybeUninit<TimelineSemaphoreSubmitInfo<'i>>, ) -> SubmitInfo<'i>

Add this list to the semaphores to be signalled by a vkQueueSubmit call.

  • Set submit_info’s pSignalSemaphores list to this list’s semaphores.

  • If this list contains any timeline semaphores, then initialize timeline_info, set its pSignalSemaphoreValues to this list’s values, and add it to submit_infos extension chain.

Return the revised submit_info value.

Source

pub fn push_binary(&mut self, semaphore: Semaphore)

Add a binary semaphore to this list.

Source

pub fn push_timeline(&mut self, semaphore: Semaphore, value: u64)

Add a timeline semaphore to this list, to be signalled with value.

Source

pub fn append(&mut self, other: &mut Self)

Append other to self, leaving other empty.

Source

fn pad_values(&mut self)

Pad self.values with dummy values for binary semaphores, in preparation for adding a timeline semaphore value.

This is a no-op if we already have values.

Source

fn check(&self)

Trait Implementations§

Source§

impl Debug for SemaphoreList

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SemaphoreList

Source§

fn default() -> SemaphoreList

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,