poll device to cleanup resources

This commit is contained in:
João Capucho 2021-06-16 14:07:23 +01:00
parent a9229e3625
commit cb55676bb9
No known key found for this signature in database
GPG Key ID: 1AD5CE7CCAEBDA21
2 changed files with 3 additions and 0 deletions

View File

@ -80,6 +80,7 @@ impl GlobalState {
pub fn maintain(&mut self, dt: std::time::Duration) {
span!(_guard, "maintain", "GlobalState::maintain");
self.audio.maintain(dt);
self.window.renderer().maintain()
}
#[cfg(feature = "singleplayer")]

View File

@ -600,6 +600,8 @@ impl Renderer {
Ok(())
}
pub fn maintain(&self) { self.device.poll(wgpu::Maintain::Poll) }
/// Create render target views
fn create_rt_views(
device: &wgpu::Device,