[Feat] (MG_Backend/DirectVulkan): dynamically load vulkan functions for vma

This commit is contained in:
2026-02-17 12:47:01 +08:00
parent cf229c4a5b
commit f7ea6cd1d9
2 changed files with 22 additions and 0 deletions
@@ -1020,9 +1020,13 @@ namespace MobileGL::MG_Backend::DirectVulkan {
}
VmaAllocatorCreateInfo allocatorInfo{};
VmaVulkanFunctions vulkanFunctions{};
vulkanFunctions.vkGetInstanceProcAddr = vkGetInstanceProcAddr;
vulkanFunctions.vkGetDeviceProcAddr = vkGetDeviceProcAddr;
allocatorInfo.instance = m_instance;
allocatorInfo.physicalDevice = m_physicalDevice.handle;
allocatorInfo.device = m_device;
allocatorInfo.pVulkanFunctions = &vulkanFunctions;
allocatorInfo.vulkanApiVersion = VK_API_VERSION_1_0;
VK_VERIFY(vmaCreateAllocator(&allocatorInfo, &m_allocator), "vmaCreateAllocator");