diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2019-02-16 14:15:00 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-16 14:15:00 +1000 |
| commit | b5c3881fe703287c4f883ca42a3b931bb6594854 (patch) | |
| tree | 29daf45582fa2860c76127271457675184341900 /Source/Core/VideoBackends/Vulkan/main.cpp | |
| parent | c41f32bcf8fe0c04d54d3541df210a604b2399d1 (diff) | |
| parent | eabde77892faf4408481f685f2fbf1b348232d5f (diff) | |
Merge pull request #7512 from stenzek/runtime-headless
DolphinNoGUI: Runtime selection of platform
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/main.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/main.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/main.cpp b/Source/Core/VideoBackends/Vulkan/main.cpp index b5eeb51da6..8055aab178 100644 --- a/Source/Core/VideoBackends/Vulkan/main.cpp +++ b/Source/Core/VideoBackends/Vulkan/main.cpp @@ -36,7 +36,8 @@ void VideoBackend::InitBackendInfo() if (LoadVulkanLibrary()) { - VkInstance temp_instance = VulkanContext::CreateVulkanInstance(false, false, false); + VkInstance temp_instance = + VulkanContext::CreateVulkanInstance(WindowSystemType::Headless, false, false); if (temp_instance) { if (LoadVulkanInstanceFunctions(temp_instance)) @@ -111,10 +112,10 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi) // Create Vulkan instance, needed before we can create a surface, or enumerate devices. // We use this instance to fill in backend info, then re-use it for the actual device. - bool enable_surface = wsi.render_surface != nullptr; + bool enable_surface = wsi.type != WindowSystemType::Headless; bool enable_debug_reports = ShouldEnableDebugReports(enable_validation_layer); - VkInstance instance = VulkanContext::CreateVulkanInstance(enable_surface, enable_debug_reports, - enable_validation_layer); + VkInstance instance = + VulkanContext::CreateVulkanInstance(wsi.type, enable_debug_reports, enable_validation_layer); if (instance == VK_NULL_HANDLE) { PanicAlert("Failed to create Vulkan instance."); @@ -150,7 +151,7 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi) VkSurfaceKHR surface = VK_NULL_HANDLE; if (enable_surface) { - surface = SwapChain::CreateVulkanSurface(instance, wsi.display_connection, wsi.render_surface); + surface = SwapChain::CreateVulkanSurface(instance, wsi); if (surface == VK_NULL_HANDLE) { PanicAlert("Failed to create Vulkan surface."); @@ -213,8 +214,7 @@ bool VideoBackend::Initialize(const WindowSystemInfo& wsi) std::unique_ptr<SwapChain> swap_chain; if (surface != VK_NULL_HANDLE) { - swap_chain = SwapChain::Create(wsi.display_connection, wsi.render_surface, surface, - g_ActiveConfig.bVSyncActive); + swap_chain = SwapChain::Create(wsi, surface, g_ActiveConfig.bVSyncActive); if (!swap_chain) { PanicAlert("Failed to create Vulkan swap chain."); |
