Skip to content

Commit

Permalink
Fix x11 hang when resizing on vulkan
Browse files Browse the repository at this point in the history
  • Loading branch information
Azorlogh committed Sep 28, 2023
1 parent 57f8757 commit c8f669c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wgpu-hal/src/vulkan/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ impl super::Swapchain {
/// - The device must have been made idle before calling this function.
unsafe fn release_resources(self, device: &ash::Device) -> Self {
profiling::scope!("Swapchain::release_resources");
{
profiling::scope!("vkDeviceWaitIdle");
let _ = unsafe { device.device_wait_idle() };
};
unsafe { device.destroy_fence(self.fence, None) };
self
}
Expand Down

0 comments on commit c8f669c

Please sign in to comment.