From d6d33843d9555ecef48c6ee901f27cf45b5be27d Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 18 Sep 2024 12:43:23 -0400 Subject: [PATCH] egl: replace fd check with swrast check for dri2 Fixes: 93aea6df072 ("egl/x11: replace DRI_DRI2 check with fd check") 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 56ac2ee37e4..073ddd94b65 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -477,7 +477,7 @@ dri2_x11_create_surface(_EGLDisplay *disp, EGLint type, _EGLConfig *conf, goto cleanup_pixmap; #ifdef HAVE_X11_DRI2 - if (disp->Options.fd > 0) { + if (!dri2_dpy->swrast) { xcb_void_cookie_t cookie; int conn_error; @@ -572,7 +572,7 @@ dri2_x11_destroy_surface(_EGLDisplay *disp, _EGLSurface *surf) driDestroyDrawable(dri2_surf->dri_drawable); - if (disp->Options.fd > 0) { + if (!dri2_dpy->swrast) { #ifdef HAVE_X11_DRI2 xcb_dri2_destroy_drawable(dri2_dpy->conn, dri2_surf->drawable); #endif