Skip to content

Commit 313d522

Browse files
committed
wayland: Only require fifo-v1 for Wayland by default
Some compositors may not implement commit-timing-v1 in addition to fifo-v1, at least not immediately, and Mesa doesn't require commit-timing for FIFO behavior. The fifo-v1 protocol alone is enough for the desired behavior. Only check for fifo-v1 to enable Wayland by default.
1 parent ac2edad commit 313d522

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/video/wayland/SDL_waylandvideo.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ static void Wayland_DeleteDevice(SDL_VideoDevice *device)
449449
typedef struct
450450
{
451451
bool has_fifo_v1;
452-
bool has_commit_timing_v1;
453452
} SDL_WaylandPreferredData;
454453

455454
static void wayland_preferred_check_handle_global(void *data, struct wl_registry *registry, uint32_t id,
@@ -459,8 +458,6 @@ static void wayland_preferred_check_handle_global(void *data, struct wl_registry
459458

460459
if (SDL_strcmp(interface, "wp_fifo_manager_v1") == 0) {
461460
d->has_fifo_v1 = true;
462-
} else if (SDL_strcmp(interface, "wp_commit_timing_manager_v1") == 0) {
463-
d->has_commit_timing_v1 = true;
464461
}
465462
}
466463

@@ -490,7 +487,7 @@ static bool Wayland_IsPreferred(struct wl_display *display)
490487

491488
wl_registry_destroy(registry);
492489

493-
return preferred_data.has_fifo_v1 && preferred_data.has_commit_timing_v1;
490+
return preferred_data.has_fifo_v1;
494491
}
495492

496493
static SDL_VideoDevice *Wayland_CreateDevice(bool require_preferred_protocols)
@@ -524,9 +521,8 @@ static SDL_VideoDevice *Wayland_CreateDevice(bool require_preferred_protocols)
524521

525522
/*
526523
* If we are checking for preferred Wayland, then let's query for
527-
* fifo-v1 and commit-timing-v1's existence, so we don't regress
528-
* GPU-bound performance and frame-pacing by default due to
529-
* swapchain starvation.
524+
* fifo-v1's existence, so we don't regress GPU-bound performance
525+
* and frame-pacing by default due to swapchain starvation.
530526
*/
531527
if (require_preferred_protocols && !Wayland_IsPreferred(display)) {
532528
WAYLAND_wl_display_disconnect(display);

0 commit comments

Comments
 (0)