Compare commits

...

1 Commits

Author SHA1 Message Date
Faith Ekstrand
30f8606b94 egl/wayland: Refuse to initialize Zink+DRM
Trying to use Zink with the DRM winsys is problematic at best.  In
theory all the pieces should be there but there are bugs around
synchronization, etc.  This copies the current behavior of X11 which
also refuses to initialize DRM on Zink.

This is particularly important for Nouveau users which are getting Zink
via the loader returning "zink" for get_driver_for_fd().  On Wayland
today, we go ahead and load zink and attempt to use the DRM EGL paths,
which are broken.  On X11, it fails to load the driver and then the EGL
device initialization code re-tries with zink which succeeds.  Because
the second try is using Zink from the start, it's equivalent to if the
user had set MESA_LOADER_DRIVER_OVERRIDE=zink and they get the kopper
path, which is more reliable.

This absolutely not what we want because it means we don't load the
driver the loader requested and are dependent on fallback paths to get a
driver loaded at all.  However, the real solution in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36014
is too complex to backport.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13498
Acked-by: Mel Henning <mhenning@darkrefraction.com>
2025-07-14 21:52:10 -03:00

View File

@@ -2449,6 +2449,9 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
goto cleanup;
}
if (!strcmp(dri2_dpy->driver_name, "zink"))
goto cleanup;
dri2_dpy->loader_extensions = dri2_loader_extensions;
dri2_detect_swrast(disp);