diff options
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/main.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/main.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/main.cpp b/Source/Core/VideoBackends/Vulkan/main.cpp index 9bd4039138..40798934e7 100644 --- a/Source/Core/VideoBackends/Vulkan/main.cpp +++ b/Source/Core/VideoBackends/Vulkan/main.cpp @@ -89,7 +89,7 @@ static bool ShouldEnableDebugReports(bool enable_validation_layers) return enable_validation_layers || IsHostGPULoggingEnabled(); } -bool VideoBackend::Initialize(void* window_handle) +bool VideoBackend::Initialize(const WindowSystemInfo& wsi) { if (!LoadVulkanLibrary()) { @@ -107,7 +107,7 @@ bool VideoBackend::Initialize(void* window_handle) // 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 = window_handle != nullptr; + bool enable_surface = wsi.render_surface != nullptr; bool enable_debug_reports = ShouldEnableDebugReports(enable_validation_layer); VkInstance instance = VulkanContext::CreateVulkanInstance(enable_surface, enable_debug_reports, enable_validation_layer); @@ -146,7 +146,7 @@ bool VideoBackend::Initialize(void* window_handle) VkSurfaceKHR surface = VK_NULL_HANDLE; if (enable_surface) { - surface = SwapChain::CreateVulkanSurface(instance, window_handle); + surface = SwapChain::CreateVulkanSurface(instance, wsi.display_connection, wsi.render_surface); if (surface == VK_NULL_HANDLE) { PanicAlert("Failed to create Vulkan surface."); @@ -209,7 +209,8 @@ bool VideoBackend::Initialize(void* window_handle) std::unique_ptr<SwapChain> swap_chain; if (surface != VK_NULL_HANDLE) { - swap_chain = SwapChain::Create(window_handle, surface, g_Config.IsVSync()); + swap_chain = + SwapChain::Create(wsi.display_connection, wsi.render_surface, surface, g_Config.IsVSync()); if (!swap_chain) { PanicAlert("Failed to create Vulkan swap chain."); @@ -271,4 +272,4 @@ void VideoBackend::Shutdown() ShutdownShared(); UnloadVulkanLibrary(); } -} +} // namespace Vulkan |
