mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 06:50:59 +01:00
Add assert that old SwapChainOutput is dead after SwapChain is remade
This commit is contained in:
1 parent
5f5f212d66
commit
08c0460e32
1 file changed
+4
@@ -2288,6 +2288,10 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
|
||||
let sc_id = surface_id.to_swap_chain_id(B::VARIANT);
|
||||
if let Some(sc) = swap_chain_guard.remove(sc_id) {
|
||||
assert!(
|
||||
sc.acquired_view_id.is_none(),
|
||||
"SwapChainOutput must be dropped before a new SwapChain is made."
|
||||
);
|
||||
unsafe {
|
||||
device.raw.destroy_semaphore(sc.semaphore);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user