Skip to content

Commit

Permalink
Update wgpu-hal/src/vulkan/instance.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald authored Oct 3, 2023
1 parent c8f669c commit 521f3e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wgpu-hal/src/vulkan/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ impl super::Swapchain {
profiling::scope!("Swapchain::release_resources");
{
profiling::scope!("vkDeviceWaitIdle");
// We need to also wait until all presentation work is done. Because there is no way to portably wait until
// the presentation work is done, we are forced to wait until the device is idle.
let _ = unsafe { device.device_wait_idle() };
};
unsafe { device.destroy_fence(self.fence, None) };
Expand Down

0 comments on commit 521f3e6

Please sign in to comment.