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

This commit is contained in:
Frank Praznik 2024-07-10 10:46:39 -04:00
parent fdc04708f1
commit 3b60ee666e
No known key found for this signature in database

View file

@ -637,9 +637,9 @@ static void surface_frame_done(void *data, struct wl_callback *cb, uint32_t time
{ {
SDL_WindowData *wind = (SDL_WindowData *)data; SDL_WindowData *wind = (SDL_WindowData *)data;
/* /* XXX: This is needed to work around an Nvidia egl-wayland bug due to buffer coordinates
* wl_surface.damage_buffer is the preferred method of setting the damage region * being used with wl_surface_damage, which causes part of the output to not be
* on compositor version 4 and above. * 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) { 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); wl_surface_damage_buffer(wind->surface, 0, 0, SDL_MAX_SINT32, SDL_MAX_SINT32);