Browse Source

wayland: Note that setting the damage region in the frame callback is explicitly to work around a driver bug

Frank Praznik 9 months ago
parent
commit
3b60ee666e
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/video/wayland/SDL_waylandwindow.c

+ 3 - 3
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);