From 3ffbf94b2a7460e250ae81e3eb6a40dcc1024e36 Mon Sep 17 00:00:00 2001 From: Robin Kertels Date: Fri, 7 Oct 2022 23:36:16 +0200 Subject: VideoBackends:Vulkan: Set up VMA Co-authored-by: iwubcode --- Source/Core/VideoBackends/Vulkan/VKMain.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'Source/Core/VideoBackends/Vulkan/VKMain.cpp') diff --git a/Source/Core/VideoBackends/Vulkan/VKMain.cpp b/Source/Core/VideoBackends/Vulkan/VKMain.cpp index bc76aa5610..e81c5d066b 100644 --- a/Source/Core/VideoBackends/Vulkan/VKMain.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKMain.cpp @@ -35,8 +35,9 @@ void VideoBackend::InitBackendInfo() if (LoadVulkanLibrary()) { - VkInstance temp_instance = - VulkanContext::CreateVulkanInstance(WindowSystemType::Headless, false, false); + u32 vk_api_version = 0; + VkInstance temp_instance = VulkanContext::CreateVulkanInstance(WindowSystemType::Headless, + false, false, &vk_api_version); if (temp_instance) { if (LoadVulkanInstanceFunctions(temp_instance)) @@ -114,8 +115,9 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi) // We use this instance to fill in backend info, then re-use it for the actual device. bool enable_surface = wsi.type != WindowSystemType::Headless; bool enable_debug_reports = ShouldEnableDebugReports(enable_validation_layer); - VkInstance instance = - VulkanContext::CreateVulkanInstance(wsi.type, enable_debug_reports, enable_validation_layer); + u32 vk_api_version = 0; + VkInstance instance = VulkanContext::CreateVulkanInstance( + wsi.type, enable_debug_reports, enable_validation_layer, &vk_api_version); if (instance == VK_NULL_HANDLE) { PanicAlertFmt("Failed to create Vulkan instance."); @@ -171,8 +173,9 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi) } // Now we can create the Vulkan device. VulkanContext takes ownership of the instance and surface. - g_vulkan_context = VulkanContext::Create(instance, gpu_list[selected_adapter_index], surface, - enable_debug_reports, enable_validation_layer); + g_vulkan_context = + VulkanContext::Create(instance, gpu_list[selected_adapter_index], surface, + enable_debug_reports, enable_validation_layer, vk_api_version); if (!g_vulkan_context) { PanicAlertFmt("Failed to create Vulkan device"); -- cgit v1.2.3