Struct wgpu_core::device::life::ActiveSubmission
source · struct ActiveSubmission {
index: SubmissionIndex,
temp_resources: Vec<TempResource>,
mapped: Vec<Arc<Buffer>>,
encoders: Vec<EncoderInFlight>,
work_done_closures: SmallVec<[SubmittedWorkDoneClosure; 1]>,
}
Expand description
Fields§
§index: SubmissionIndex
The index of the submission we track.
When Device::fence
’s value is greater than or equal to this, our queue
submission has completed.
temp_resources: Vec<TempResource>
Temporary resources to be freed once this queue submission has completed.
mapped: Vec<Arc<Buffer>>
Buffers to be mapped once this submission has completed.
encoders: Vec<EncoderInFlight>
Command buffers used by this submission, and the encoder that owns them.
wgpu_hal::Queue::submit
requires the submitted command buffers to
remain alive until the submission has completed execution. Command
encoders double as allocation pools for command buffers, so holding them
here and cleaning them up in LifetimeTracker::triage_submissions
satisfies that requirement.
Once this submission has completed, the command buffers are reset and the command encoder is recycled.
work_done_closures: SmallVec<[SubmittedWorkDoneClosure; 1]>
List of queue “on_submitted_work_done” closures to be called once this submission has completed.
Implementations§
source§impl ActiveSubmission
impl ActiveSubmission
sourcepub fn contains_buffer(&self, buffer: &Buffer) -> bool
pub fn contains_buffer(&self, buffer: &Buffer) -> bool
Returns true if this submission contains the given buffer.
This only uses constant-time operations.
sourcepub fn contains_texture(&self, texture: &Texture) -> bool
pub fn contains_texture(&self, texture: &Texture) -> bool
Returns true if this submission contains the given texture.
This only uses constant-time operations.