pub struct SemaphoreList {
semaphores: Vec<Semaphore>,
values: Vec<u64>,
}
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
impl SemaphoreList
pub fn is_empty(&self) -> bool
Sourcepub fn add_to_submit<'i, 's: 'i>(
&'s self,
submit_info: SubmitInfo<'i>,
timeline_info: &'i mut MaybeUninit<TimelineSemaphoreSubmitInfo<'i>>,
) -> SubmitInfo<'i>
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
’spSignalSemaphores
list to this list’s semaphores. -
If this list contains any timeline semaphores, then initialize
timeline_info
, set itspSignalSemaphoreValues
to this list’s values, and add it tosubmit_info
s extension chain.
Return the revised submit_info
value.
Sourcepub fn push_binary(&mut self, semaphore: Semaphore)
pub fn push_binary(&mut self, semaphore: Semaphore)
Add a binary semaphore to this list.
Sourcepub fn push_timeline(&mut self, semaphore: Semaphore, value: u64)
pub fn push_timeline(&mut self, semaphore: Semaphore, value: u64)
Add a timeline semaphore to this list, to be signalled with
value
.
Sourcefn pad_values(&mut self)
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.