egl: don't bind zink under dri2/3

If we are in dri2/3 paths and the loader picks zink for this fd
don't bind it here, let the fallbacks work.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27628>
This commit is contained in:
Dave Airlie
2024-02-20 13:09:36 +10:00
parent ccbccfff91
commit b907eb4750
2 changed files with 11 additions and 0 deletions

View File

@@ -744,6 +744,11 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
strndup(driver_name, xcb_dri2_connect_driver_name_length(connect));
}
if (!strcmp(dri2_dpy->driver_name, "zink")) {
close(dri2_dpy->fd_render_gpu);
return EGL_FALSE;
}
if (dri2_dpy->driver_name == NULL) {
close(dri2_dpy->fd_render_gpu);
free(connect);

View File

@@ -634,6 +634,12 @@ dri3_x11_connect(struct dri2_egl_display *dri2_dpy)
if (!dri2_dpy->driver_name)
dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd_render_gpu);
if (!strcmp(dri2_dpy->driver_name, "zink")) {
close(dri2_dpy->fd_render_gpu);
return EGL_FALSE;
}
if (!dri2_dpy->driver_name) {
_eglLog(_EGL_WARNING, "DRI3: No driver found");
close(dri2_dpy->fd_render_gpu);