mirror of
https://github.com/love2d/love.git
synced 2026-08-20 12:40:20 +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;
|
allocatorCreateInfo.pVulkanFunctions = &vulkanFunctions;
|
||||||
#else
|
#else
|
||||||
allocatorCreateInfo.pVulkanFunctions = nullptr;
|
VmaVulkanFunctions vulkanFunctions{};
|
||||||
|
vulkanFunctions.vkGetInstanceProcAddr = &vkGetInstanceProcAddr;
|
||||||
|
vulkanFunctions.vkGetDeviceProcAddr = &vkGetDeviceProcAddr;
|
||||||
|
allocatorCreateInfo.pVulkanFunctions = &vulkanFunctions;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (vmaCreateAllocator(&allocatorCreateInfo, &vmaAllocator) != VK_SUCCESS) {
|
if (vmaCreateAllocator(&allocatorCreateInfo, &vmaAllocator) != VK_SUCCESS) {
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
|
#include "VulkanWrapper.h"
|
||||||
|
|
||||||
#define VMA_IMPLEMENTATION
|
#define VMA_IMPLEMENTATION
|
||||||
#include "vk_mem_alloc.h"
|
#include "vk_mem_alloc.h"
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 0
|
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 0
|
||||||
#else
|
#else
|
||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
|
#define VMA_STATIC_VULKAN_FUNCTIONS 0
|
||||||
|
#define VMA_DYNAMIC_VULKAN_FUNCTIONS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif //LOVE_GRAPHICS_VULKAN_VULKANWRAPPER_H
|
#endif //LOVE_GRAPHICS_VULKAN_VULKANWRAPPER_H
|
||||||
|
|||||||
Reference in New Issue
Block a user