Browse Source

vulkan: reduce memory use in some situations

Sasha Szpakowski 1 year ago
parent
commit
9f18595559
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/modules/graphics/vulkan/Graphics.cpp

+ 4 - 0
src/modules/graphics/vulkan/Graphics.cpp

@@ -1740,6 +1740,10 @@ void Graphics::initVMA()
 	allocatorCreateInfo.device = device;
 	allocatorCreateInfo.device = device;
 	allocatorCreateInfo.instance = instance;
 	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{};
 	VmaVulkanFunctions vulkanFunctions{};
 
 
 	vulkanFunctions.vkGetInstanceProcAddr = vkGetInstanceProcAddr;
 	vulkanFunctions.vkGetInstanceProcAddr = vkGetInstanceProcAddr;