diff options
| author | Stenzek <stenzek@users.noreply.github.com> | 2018-10-24 14:51:21 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-24 14:51:21 +1100 |
| commit | c4d1e4adffcd380cc87b841069ce2fe8b62d7b60 (patch) | |
| tree | c61a0a07c14ccc3c1f7247bdcc82927a82c145bb /Source/Core/VideoBackends/Vulkan/main.cpp | |
| parent | 9c9d598ec006527bc47aea306e5171d03c12c5f5 (diff) | |
| parent | 2c6d96433c322b50470705d43005fd6308506d49 (diff) | |
Merge pull request #7450 from stenzek/glcontext
GLInterface refactoring/cleanup and runtime platform selection
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 |
