mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-10-11 22:49:50 +00:00
Merge pull request #14835 from JoshuaVandaele/vulkan-over-gl
VideoCommon: Prefer Vulkan over OpenGL on Linux
This commit is contained in:
@@ -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>());
|
||||
|
||||
Reference in New Issue
Block a user