summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/vulkan/rendering_device_driver_vulkan.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/vulkan/rendering_device_driver_vulkan.cpp b/drivers/vulkan/rendering_device_driver_vulkan.cpp
index 2a9e9ba264..97fd156584 100644
--- a/drivers/vulkan/rendering_device_driver_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_driver_vulkan.cpp
@@ -999,6 +999,10 @@ Error RenderingDeviceDriverVulkan::_initialize_allocator() {
allocator_info.physicalDevice = physical_device;
allocator_info.device = vk_device;
allocator_info.instance = context_driver->instance_get();
+ const bool use_1_3_features = physical_device_properties.apiVersion >= VK_API_VERSION_1_3;
+ if (use_1_3_features) {
+ allocator_info.flags |= VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT;
+ }
VkResult err = vmaCreateAllocator(&allocator_info, &allocator);
ERR_FAIL_COND_V_MSG(err, ERR_CANT_CREATE, "vmaCreateAllocator failed with error " + itos(err) + ".");