Skip to content

Commit 1024d26

Browse files
committed
fix: flush wgpu staging buffers on every frame even if it's not rendered
1 parent f2293db commit 1024d26

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

neothesia/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,18 @@ impl Neothesia {
174174
let frame = match self.surface.get_current_texture() {
175175
wgpu::CurrentSurfaceTexture::Success(texture) => texture,
176176
wgpu::CurrentSurfaceTexture::Occluded | wgpu::CurrentSurfaceTexture::Timeout => {
177+
self.context.gpu.submit();
177178
return;
178179
}
179180
wgpu::CurrentSurfaceTexture::Suboptimal(texture) => {
180181
drop(texture);
181182
self.surface.configure();
183+
self.context.gpu.submit();
182184
return;
183185
}
184186
wgpu::CurrentSurfaceTexture::Outdated => {
185187
self.surface.configure();
188+
self.context.gpu.submit();
186189
return;
187190
}
188191
wgpu::CurrentSurfaceTexture::Lost => {

0 commit comments

Comments
 (0)