aboutsummaryrefslogtreecommitdiff
path: root/src/Overlay.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-01-09 19:23:48 +0100
committerdec05eba <dec05eba@protonmail.com>2025-01-09 19:23:48 +0100
commitce6c924f58daa2b944ce51b87337ad994f6a1c41 (patch)
treeb4f43eefd03998c4b1f740bcaefb02fa5aefd84c /src/Overlay.cpp
parent77dd32a3ff82180b15447e1d9ab4e9a7c622f531 (diff)
Use glx on wayland to workaround buggy nvidia driver
Diffstat (limited to 'src/Overlay.cpp')
-rw-r--r--src/Overlay.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index d71dd4e..48aa4d3 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -743,7 +743,10 @@ namespace gsr {
// MGL_WINDOW_TYPE_DIALOG is needed for kde plasma wayland in some cases, otherwise the window will pop up on another activity
// or may not be visible at all
window_create_params.window_type = (is_kwin && gsr_info.system_info.display_server == DisplayServer::WAYLAND) ? MGL_WINDOW_TYPE_DIALOG : MGL_WINDOW_TYPE_NORMAL;
- window_create_params.render_api = MGL_RENDER_API_EGL;
+ // Nvidia + Wayland + Egl doesn't work on some systems properly and it instead falls back to software rendering.
+ // Use Glx on Wayland to workaround this issue. This is fine since Egl is only needed for x11 to reliably get the texture of the fullscreen window on Nvidia
+ // when a compositor isn't running.
+ window_create_params.render_api = gsr_info.system_info.display_server == DisplayServer::WAYLAND ? MGL_RENDER_API_GLX : MGL_RENDER_API_EGL;
if(!window->create("gsr ui", window_create_params))
fprintf(stderr, "error: failed to create window\n");