egl: always check dri caps for EGL_WL_bind_wayland_display support

this should be functionally the same

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
This commit is contained in:
Mike Blumenkrantz 2024-07-29 13:16:42 -04:00 committed by Marge Bot
parent 455219979e
commit 9907166c42

View file

@ -630,19 +630,12 @@ dri2_set_WL_bind_wayland_display(_EGLDisplay *disp)
#ifdef HAVE_WAYLAND_PLATFORM
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
if (!dri2_dpy->swrast && dri2_dpy->image) {
if (dri2_dpy->image->base.version >= 10 &&
dri2_dpy->image->getCapabilities != NULL) {
int capabilities;
int capabilities;
capabilities =
dri2_get_capabilities(dri2_dpy->dri_screen_render_gpu);
disp->Extensions.WL_bind_wayland_display =
(capabilities & __DRI_IMAGE_CAP_GLOBAL_NAMES) != 0;
} else {
disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
}
}
capabilities =
dri2_get_capabilities(dri2_dpy->dri_screen_render_gpu);
disp->Extensions.WL_bind_wayland_display =
(capabilities & __DRI_IMAGE_CAP_GLOBAL_NAMES) != 0;
#endif
}