Merge pull request #14835 from JoshuaVandaele/vulkan-over-gl

VideoCommon: Prefer Vulkan over OpenGL on Linux
This commit is contained in:
JosJuice
2026-10-07 19:36:04 +02:00
committed by GitHub
+8 -8
View File
@@ -208,17 +208,17 @@ const std::vector<std::unique_ptr<VideoBackendBase>>& VideoBackendBase::GetAvail
backends.push_back(std::make_unique<DX11::VideoBackend>());
backends.push_back(std::make_unique<DX12::VideoBackend>());
#endif
#ifdef HAS_OPENGL
backends.push_back(std::make_unique<OGL::VideoBackend>());
#endif
#ifdef HAS_VULKAN
#ifdef __APPLE__
// Emplace the Vulkan backend at the beginning so it takes precedence over OpenGL.
// On macOS, we prefer Vulkan over OpenGL due to OpenGL support being deprecated by Apple.
backends.emplace(backends.begin(), std::make_unique<Vulkan::VideoBackend>());
#else
backends.push_back(std::make_unique<Vulkan::VideoBackend>());
#endif
#ifdef HAS_OPENGL
#ifdef ANDROID
// Emplace the OpenGL backend at the beginning so it takes precedence over Vulkan.
// On Android, we prefer OpenGL over Vulkan due to OpenGL supporting more features.
backends.emplace(backends.begin(), std::make_unique<OGL::VideoBackend>());
#else
backends.push_back(std::make_unique<OGL::VideoBackend>());
#endif
#endif
#ifdef __APPLE__
backends.emplace(backends.begin(), std::make_unique<Metal::VideoBackend>());