Skip to content

Commit

Permalink
Check if current GPU supports Vulkan DRM modifiers when `--backend=au…
Browse files Browse the repository at this point in the history
…to` is used.

This works around ValveSoftware#1218 by making use of the new backend option added in ValveSoftware#1321,
but adds a check to automatically fall back to the SDL backend if the current
GPU does not support Vulkan DRM modifiers.
  • Loading branch information
korewaChino committed Aug 20, 2024
1 parent f554d88 commit 2f696de
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,14 @@ int main(int argc, char **argv)
if ( eCurrentBackend == gamescope::GamescopeBackend::Auto )
{
if ( g_pOriginalWaylandDisplay != NULL )
eCurrentBackend = gamescope::GamescopeBackend::Wayland;
// Additional check if the current GPU supports Vulkan DRM modifiers
// Fallback to SDL if not supported (e.g Older AMD GPUs like Polaris 10/20)
if (vulkan_supports_modifiers()) {
eCurrentBackend = gamescope::GamescopeBackend::Wayland;
}
else {
eCurrentBackend = gamescope::GamescopeBackend::SDL;
}
else if ( g_pOriginalDisplay != NULL )
eCurrentBackend = gamescope::GamescopeBackend::SDL;
else
Expand Down

0 comments on commit 2f696de

Please sign in to comment.