From 9f18595559a6c9a6b27c459828671d3ccb70c9bb Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Fri, 28 Jun 2024 21:53:03 -0300 Subject: [PATCH] vulkan: reduce memory use in some situations --- src/modules/graphics/vulkan/Graphics.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index 5736188e8..1c792c0a1 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -1740,6 +1740,10 @@ void Graphics::initVMA() allocatorCreateInfo.device = device; allocatorCreateInfo.instance = instance; + // Default of 256 MB is a little too wasteful for most love games. + // TODO: Tune this more. + allocatorCreateInfo.preferredLargeHeapBlockSize = 128 * 1024 * 1024; + VmaVulkanFunctions vulkanFunctions{}; vulkanFunctions.vkGetInstanceProcAddr = vkGetInstanceProcAddr;