VideoBackendBase: Remove __builtin_available for macOS 10.14
This commit is contained in:
parent
77d0170285
commit
6e2febd404
|
@ -215,10 +215,7 @@ 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.
|
||||
// On macOS, we prefer Vulkan over OpenGL due to OpenGL support being deprecated by Apple.
|
||||
#ifdef HAS_OPENGL
|
||||
backends.push_back(std::make_unique<OGL::VideoBackend>());
|
||||
#endif
|
||||
|
@ -228,17 +225,11 @@ const std::vector<std::unique_ptr<VideoBackendBase>>& VideoBackendBase::GetAvail
|
|||
#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, *))
|
||||
{
|
||||
// Emplace the Vulkan backend at the beginning so it takes precedence over OpenGL.
|
||||
backends.emplace(backends.begin(), std::make_unique<Vulkan::VideoBackend>());
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#else
|
||||
backends.push_back(std::make_unique<Vulkan::VideoBackend>());
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAS_OPENGL
|
||||
backends.push_back(std::make_unique<SW::VideoSoftware>());
|
||||
|
|
Loading…
Reference in New Issue