Files
packages/anda/games/gamescope/1483.patch
T
Raboneko 3c9d174b11 fix gamescope for older GPUs (#1930) (#1993)
* gamescope: make the SDL backend the default backend for all builds

* add back funny patches

* Obsolete gamescope-legacy with wrapper script, fix multiarch subpackage

* fix dependency issue

* terra downstream script patches

* add the ctrl patch properly

* revert

* update to 3.15.0

* simplify wrapper script

* handle calling gamescope-legacy from non-gamescope session

* Use my PR patch for gamescope fallback

* format patch from github

* update patch

---------

Signed-off-by: Cappy Ishihara <cappy@cappuchino.xyz>
(cherry picked from commit e334d5d927)

Co-authored-by: Cappy Ishihara <cappy@cappuchino.xyz>
2024-08-26 13:23:02 +08:00

35 lines
1.3 KiB
Diff

From ca58cb2453e6d9ef44d799e394ee9950b7a35b30 Mon Sep 17 00:00:00 2001
From: Cappy Ishihara <cappy@cappuchino.xyz>
Date: Wed, 21 Aug 2024 03:56:53 +0700
Subject: [PATCH] Check if current GPU supports Vulkan DRM modifiers when
`--backend=auto` is used.
This works around #1218 by making use of the new backend option added in #1321,
but adds a check to automatically fall back to the SDL backend if the current
GPU does not support Vulkan DRM modifiers.
---
src/main.cpp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/main.cpp b/src/main.cpp
index ca4001249..bc6b16904 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -817,9 +817,13 @@ int main(int argc, char **argv)
if ( eCurrentBackend == gamescope::GamescopeBackend::Auto )
{
if ( g_pOriginalWaylandDisplay != NULL )
- eCurrentBackend = gamescope::GamescopeBackend::Wayland;
- else if ( g_pOriginalDisplay != NULL )
- eCurrentBackend = gamescope::GamescopeBackend::SDL;
+ // 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
eCurrentBackend = gamescope::GamescopeBackend::DRM;
}