mirror of
https://github.com/love2d/love.git
synced 2026-08-21 21:15:09 +02:00
vulkan: fix build on machines without vulkan 1.3
This commit is contained in:
@@ -901,7 +901,10 @@ void Graphics::initVMA() {
|
||||
|
||||
allocatorCreateInfo.pVulkanFunctions = &vulkanFunctions;
|
||||
#else
|
||||
allocatorCreateInfo.pVulkanFunctions = nullptr;
|
||||
VmaVulkanFunctions vulkanFunctions{};
|
||||
vulkanFunctions.vkGetInstanceProcAddr = &vkGetInstanceProcAddr;
|
||||
vulkanFunctions.vkGetDeviceProcAddr = &vkGetDeviceProcAddr;
|
||||
allocatorCreateInfo.pVulkanFunctions = &vulkanFunctions;
|
||||
#endif
|
||||
|
||||
if (vmaCreateAllocator(&allocatorCreateInfo, &vmaAllocator) != VK_SUCCESS) {
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
#include "VulkanWrapper.h"
|
||||
|
||||
#define VMA_IMPLEMENTATION
|
||||
#include "vk_mem_alloc.h"
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 0
|
||||
#else
|
||||
#include <vulkan/vulkan.h>
|
||||
#define VMA_STATIC_VULKAN_FUNCTIONS 0
|
||||
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
|
||||
#endif
|
||||
|
||||
#endif //LOVE_GRAPHICS_VULKAN_VULKANWRAPPER_H
|
||||
|
||||
Reference in New Issue
Block a user