mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-23 07:51:08 +01:00
Track async mapping properly
This commit is contained in:
1 parent
f5ad76726b
commit
1f4d67aeb2
5 files changed
+94
-53
No files matched your search
@@ -131,4 +131,17 @@ impl<B: hal::Backend> CommandAllocator<B> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn destroy(self, device: &B::Device) {
|
||||
let mut inner = self.inner.lock();
|
||||
while let Some(cmd_buf) = inner.pending.pop() {
|
||||
inner.recycle(cmd_buf);
|
||||
}
|
||||
for (_, mut pool) in inner.pools.drain() {
|
||||
unsafe {
|
||||
pool.raw.free(pool.available);
|
||||
device.destroy_command_pool(pool.raw);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user