WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 22fd4a8

Browse files
committed
don't force queue submitting in engine
1 parent d618229 commit 22fd4a8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

wgpu/src/engine.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,18 @@ impl Engine {
7171
queue: &wgpu::Queue,
7272
encoder: wgpu::CommandEncoder,
7373
) -> wgpu::SubmissionIndex {
74-
self.staging_belt.finish();
74+
self.finish();
7575
let index = queue.submit(Some(encoder.finish()));
76+
self.end_frame();
77+
78+
index
79+
}
80+
81+
pub fn finish(&mut self) {
82+
self.staging_belt.finish();
83+
}
84+
85+
pub fn end_frame(&mut self) {
7686
self.staging_belt.recall();
7787

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

8292
#[cfg(any(feature = "image", feature = "svg"))]
8393
self.image_pipeline.end_frame();
84-
85-
index
8694
}
8795
}

0 commit comments

Comments
 (0)