mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 06:44:14 +00:00
Fix x11 hang when resizing on vulkan (#4184)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This commit is contained in:
parent
d2b8863cd9
commit
1012c71167
@ -157,6 +157,12 @@ 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");
|
||||
// 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) };
|
||||
self
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user