egl/x11: Fix swap interval setup
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Calling dri2_x11_setup_swap_interval with swap_available = false
sets the min/max/default swap interval values to zero.
EGL_MIN/MAX_SWAP_INTERVAL is always reported as 0 and the interval
value set by eglSwapInterval gets clamped to 0.

Set swap_available to true before calling dri2_x11_setup_swap_interval,
as was done before.

Fixes: c00701c83a ("egl/x11: unify swrast/kopper/dri3 paths a bit")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34235>
This commit is contained in:
David Rosca 2025-03-27 11:45:31 +01:00 committed by Marge Bot
parent efc87e0d6a
commit 1610841f0f

View file

@ -1780,14 +1780,13 @@ platform_x11_finalize(_EGLDisplay *disp)
dri2_setup_screen(disp);
if (!dri2_dpy->swrast) {
dri2_x11_setup_swap_interval(disp);
#ifdef HAVE_WAYLAND_PLATFORM
if (dri2_dpy->kopper)
dri2_dpy->device_name = strdup("zink");
#endif
dri2_dpy->swap_available = true;
dri2_x11_setup_swap_interval(disp);
if (dri2_dpy->fd_render_gpu == dri2_dpy->fd_display_gpu)
disp->Extensions.KHR_image_pixmap = EGL_TRUE;
disp->Extensions.NOK_texture_from_pixmap = EGL_TRUE;