From 93aea6df072e9bda002d4f05f6d9626a92fb5097 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 30 Jul 2024 09:01:40 -0400 Subject: [PATCH] egl/x11: replace DRI_DRI2 check with fd check only swrast (not kms_swrast) doesn't support this interface, so this check should be equivalent Reviewed-by: Adam Jackson Part-of: --- src/egl/drivers/dri2/platform_x11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index cf752abe2f3..57534760c23 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -479,7 +479,7 @@ dri2_x11_create_surface(_EGLDisplay *disp, EGLint type, _EGLConfig *conf, goto cleanup_pixmap; #ifdef HAVE_X11_DRI2 - if (dri2_dpy->dri2) { + if (disp->Options.fd > 0) { xcb_void_cookie_t cookie; int conn_error; @@ -574,7 +574,7 @@ dri2_x11_destroy_surface(_EGLDisplay *disp, _EGLSurface *surf) driDestroyDrawable(dri2_surf->dri_drawable); - if (dri2_dpy->dri2) { + if (disp->Options.fd > 0) { #ifdef HAVE_X11_DRI2 xcb_dri2_destroy_drawable(dri2_dpy->conn, dri2_surf->drawable); #endif