]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/vulkan/destroyqueue.cpp
Rewrite descriptor set management
[libs/gl.git] / source / backends / vulkan / destroyqueue.cpp
index 0c3e17c1a1831ecc2ab88534f33b8a0ca8bc7169..929f89c6070196caee4ca9b17533bccdb16a6021 100644 (file)
@@ -20,6 +20,11 @@ void DestroyQueue::destroy(VkBuffer handle, unsigned mem_id)
        destroy<VkBuffer, &VulkanFunctions::DestroyBuffer>(handle, mem_id);
 }
 
+void DestroyQueue::destroy(VkDescriptorPool handle)
+{
+       destroy<VkDescriptorPool, &VulkanFunctions::DestroyDescriptorPool>(handle);
+}
+
 void DestroyQueue::destroy(VkFence handle)
 {
        destroy<VkFence, &VulkanFunctions::DestroyFence>(handle);
@@ -66,7 +71,6 @@ void DestroyQueue::tick()
        const VulkanFunctions &vk = device.get_functions();
        MemoryAllocator &allocator = device.get_allocator();
 
-       ++current_frame;
        while(!queue.empty() && current_frame>=queue.front().on_frame)
        {
                const Entry &e = queue.front();
@@ -75,6 +79,8 @@ void DestroyQueue::tick()
                        allocator.release(e.memory_id);
                queue.pop_front();
        }
+
+       ++current_frame;
 }
 
 } // namespace GL