From d5b9ccd3d4a6e5b35a0411688bfb7113f5c7d631 Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 25 Aug 2024 17:44:23 +0100 Subject: fix(texrepo): deactivate descriptor set layout --- stockton-render/src/draw/texture/repo.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'stockton-render/src/draw/texture/repo.rs') 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); } } } -- cgit v1.2.3