summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/VKMain.cpp
diff options
context:
space:
mode:
authorRobin Kertels <robin.kertels@gmail.com>2022-10-07 23:36:16 +0200
committerRobin Kertels <robin.kertels@gmail.com>2022-10-23 02:54:35 +0200
commit3ffbf94b2a7460e250ae81e3eb6a40dcc1024e36 (patch)
treef33b7a015b70e19269d26c07388864fd3ecca004 /Source/Core/VideoBackends/Vulkan/VKMain.cpp
parent5e96733e353c8cbca0b9d467332d073daed1952d (diff)
VideoBackends:Vulkan: Set up VMA
Co-authored-by: iwubcode <iwubcode@users.noreply.github.com>
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VKMain.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/VKMain.cpp15
1 files changed, 9 insertions, 6 deletions
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");