Skip to content

Commit

Permalink
don't force queue submitting in engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Azorlogh committed Dec 8, 2024
1 parent d618229 commit 22fd4a8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions wgpu/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,18 @@ impl Engine {
queue: &wgpu::Queue,
encoder: wgpu::CommandEncoder,
) -> wgpu::SubmissionIndex {
self.staging_belt.finish();
self.finish();
let index = queue.submit(Some(encoder.finish()));
self.end_frame();

index
}

pub fn finish(&mut self) {
self.staging_belt.finish();
}

pub fn end_frame(&mut self) {
self.staging_belt.recall();

self.quad_pipeline.end_frame();
Expand All @@ -81,7 +91,5 @@ impl Engine {

#[cfg(any(feature = "image", feature = "svg"))]
self.image_pipeline.end_frame();

index
}
}

0 comments on commit 22fd4a8

Please sign in to comment.