Things were getting destroyed one frame too early since the destroy queue
is ticked after rendering a frame.
const VulkanFunctions &vk = device.get_functions();
MemoryAllocator &allocator = device.get_allocator();
const VulkanFunctions &vk = device.get_functions();
MemoryAllocator &allocator = device.get_allocator();
while(!queue.empty() && current_frame>=queue.front().on_frame)
{
const Entry &e = queue.front();
while(!queue.empty() && current_frame>=queue.front().on_frame)
{
const Entry &e = queue.front();
allocator.release(e.memory_id);
queue.pop_front();
}
allocator.release(e.memory_id);
queue.pop_front();
}