diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2022-02-24 12:47:34 +0100 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2022-02-24 14:30:55 +0100 |
commit | 801741e7870a3e4f943a8628447c5eac74ecb2e3 (patch) | |
tree | 7007584f54a68979b8e51ae560fc2ed12d0b4f94 /drivers/vulkan/rendering_device_vulkan.h | |
parent | 6a35864a6ddf84f97caeb6b3e830a4f4cfbd7082 (diff) | |
download | redot-engine-801741e7870a3e4f943a8628447c5eac74ecb2e3.tar.gz |
vk_mem_alloc: Update to upstream + Adapt approach to small objects pooling
This updates VMA and instead of using the custom small pool approach from 4e6c9d3ae979f2eb0151cf581fe61d2f3194ea72, lazily creates pools for the relevant memory type indices, which doesn't require patching VMA.
Also, patches already merged upstream or not needed any longer are removed.
Diffstat (limited to 'drivers/vulkan/rendering_device_vulkan.h')
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h index 3e4327667b..126f6f8ad0 100644 --- a/drivers/vulkan/rendering_device_vulkan.h +++ b/drivers/vulkan/rendering_device_vulkan.h @@ -1016,7 +1016,8 @@ class RenderingDeviceVulkan : public RenderingDevice { void _free_pending_resources(int p_frame); VmaAllocator allocator = nullptr; - VmaPool small_allocs_pool = nullptr; + Map<uint32_t, VmaPool> small_allocs_pools; + VmaPool _find_or_create_small_allocs_pool(uint32_t p_mem_type_index); VulkanContext *context = nullptr; |