From 940d62907027f388026ba2cac1ac64381af5c78f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 16 May 2024 10:05:16 +0200 Subject: vulkan: Update all components to Vulkan SDK 1.3.183.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pass `VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT` to VMA when using Vulkan 1.3 features. Co-authored-by: Pedro J. Estébanez --- drivers/vulkan/rendering_device_driver_vulkan.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/vulkan/rendering_device_driver_vulkan.cpp') 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) + "."); -- cgit v1.2.3