From 1e0a4d53006c8660bff7f5c5a34c7da02f7b3443 Mon Sep 17 00:00:00 2001 From: marc0246 <40955683+marc0246@users.noreply.github.com> Date: Sun, 29 Oct 2023 18:05:41 +0100 Subject: [PATCH] Fix multiplication overflow in `StandardDescriptorSetAllocator` (#2379) --- vulkano/src/descriptor_set/allocator.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/vulkano/src/descriptor_set/allocator.rs b/vulkano/src/descriptor_set/allocator.rs index c349f103..32768897 100644 --- a/vulkano/src/descriptor_set/allocator.rs +++ b/vulkano/src/descriptor_set/allocator.rs @@ -196,8 +196,6 @@ struct FixedEntry { // The `FixedPool` struct contains an actual Vulkan pool. Every time it is full we create // a new pool and replace the current one with the new one. pool: Arc, - // The amount of sets available to use when we create a new Vulkan pool. - set_count: usize, // The descriptor set layout that this pool is for. layout: Arc, } @@ -209,7 +207,6 @@ impl FixedEntry { ) -> Result> { Ok(FixedEntry { pool: FixedPool::new(&layout, create_info)?, - set_count: create_info.set_count, layout, }) } @@ -221,7 +218,6 @@ impl FixedEntry { let inner = if let Some(inner) = self.pool.reserve.pop() { inner } else { - self.set_count *= 2; self.pool = FixedPool::new(&self.layout, create_info)?; self.pool.reserve.pop().unwrap()