mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Merge pull request #9962 from OatmealDome/macos-vulkan-default
VideoBackendBase: Prefer Vulkan over OGL on macOS Mojave and newer
This commit is contained in:
commit
35bf5e3839
@ -214,6 +214,10 @@ const std::vector<std::unique_ptr<VideoBackendBase>>& VideoBackendBase::GetAvail
|
||||
std::vector<std::unique_ptr<VideoBackendBase>> backends;
|
||||
|
||||
// OGL > D3D11 > D3D12 > Vulkan > SW > Null
|
||||
//
|
||||
// On macOS Mojave and newer, we prefer Vulkan over OGL due to outdated drivers.
|
||||
// However, on macOS High Sierra and older, we still prefer OGL due to its older Metal version
|
||||
// missing several features required by the Vulkan backend.
|
||||
#ifdef HAS_OPENGL
|
||||
backends.push_back(std::make_unique<OGL::VideoBackend>());
|
||||
#endif
|
||||
@ -222,7 +226,18 @@ const std::vector<std::unique_ptr<VideoBackendBase>>& VideoBackendBase::GetAvail
|
||||
backends.push_back(std::make_unique<DX12::VideoBackend>());
|
||||
#endif
|
||||
#ifdef HAS_VULKAN
|
||||
#ifdef __APPLE__
|
||||
// If we can run the Vulkan backend, emplace it at the beginning of the vector so
|
||||
// it takes precedence over OpenGL.
|
||||
if (__builtin_available(macOS 10.14, *))
|
||||
{
|
||||
backends.emplace(backends.begin(), std::make_unique<Vulkan::VideoBackend>());
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
backends.push_back(std::make_unique<Vulkan::VideoBackend>());
|
||||
}
|
||||
#endif
|
||||
#ifdef HAS_OPENGL
|
||||
backends.push_back(std::make_unique<SW::VideoSoftware>());
|
||||
|
Loading…
x
Reference in New Issue
Block a user