Quick answer: Vulkan vkAllocateDescriptorSets failing despite pool having capacity? Pool fragments after many alloc/free cycles - reset the pool periodically or use a free list.

Long play session: descriptor pool reports 1000/2000 used but allocations fail.

Reset pool periodically

vkResetDescriptorPool(device, pool, 0);

All descriptors freed at once. Defrag happens for free.

Or use VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT

Allows individual frees; manages fragmentation better.

Cycle pools

Multiple pools; allocate from active one; reset others. Round-robin avoids fragmentation entirely.

“Pool fragmentation is real. Reset is the universal cure.”

For long-running games, descriptor pool strategy is part of the engine design. Plan from day one.

Related reading