diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:23 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:23 +0100 |
commit | d5b9ccd3d4a6e5b35a0411688bfb7113f5c7d631 (patch) | |
tree | 1a9f41d78a340e4b1f092268a27e5bd79f2fbaff /stockton-render/src/draw/texture/repo.rs | |
parent | 399ae8ba45f40a54ec68026f77ca3c7c709ab62f (diff) |
fix(texrepo): deactivate descriptor set layout
Diffstat (limited to 'stockton-render/src/draw/texture/repo.rs')
-rw-r--r-- | stockton-render/src/draw/texture/repo.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/stockton-render/src/draw/texture/repo.rs b/stockton-render/src/draw/texture/repo.rs index 75cc650..d5200be 100644 --- a/stockton-render/src/draw/texture/repo.rs +++ b/stockton-render/src/draw/texture/repo.rs @@ -180,8 +180,7 @@ impl<'a> TextureRepo<'a> { let mut device = device_lock.write().unwrap(); // Return all the texture memory and descriptors. - for (i, v) in self.blocks.drain() { - debug!("Deactivating blockref {:?}", i); + for (_, v) in self.blocks.drain() { if let Some(block) = v { block.deactivate( &mut device, @@ -191,13 +190,16 @@ impl<'a> TextureRepo<'a> { } } - debug!("Deactivated all blocks"); - // Dispose of both allocators read(&*remains.tex_allocator).dispose(); read(&*remains.descriptor_allocator).dispose(&device); - debug!("Disposed of allocators"); + // Deactivate DS Layout + let ds_layout = Arc::try_unwrap(self.ds_layout) + .unwrap() + .into_inner() + .unwrap(); + device.destroy_descriptor_set_layout(ds_layout); } } } |