From 3b60ee666e25f61a6c3c60b59162ceddbc5fb6b3 Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Wed, 10 Jul 2024 10:46:39 -0400 Subject: [PATCH] wayland: Note that setting the damage region in the frame callback is explicitly to work around a driver bug --- src/video/wayland/SDL_waylandwindow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c index 93d9bb3144..4176647594 100644 --- a/src/video/wayland/SDL_waylandwindow.c +++ b/src/video/wayland/SDL_waylandwindow.c @@ -637,9 +637,9 @@ static void surface_frame_done(void *data, struct wl_callback *cb, uint32_t time { SDL_WindowData *wind = (SDL_WindowData *)data; - /* - * wl_surface.damage_buffer is the preferred method of setting the damage region - * on compositor version 4 and above. + /* XXX: This is needed to work around an Nvidia egl-wayland bug due to buffer coordinates + * being used with wl_surface_damage, which causes part of the output to not be + * updated when using a viewport with an output region larger than the source region. */ if (wl_compositor_get_version(wind->waylandData->compositor) >= WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION) { wl_surface_damage_buffer(wind->surface, 0, 0, SDL_MAX_SINT32, SDL_MAX_SINT32);