egl: replace fd check with swrast check for dri2

Fixes: 93aea6df07 ("egl/x11: replace DRI_DRI2 check with fd check")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31234>
This commit is contained in:
Mike Blumenkrantz
2024-09-18 12:43:23 -04:00
committed by Marge Bot
parent a8f95d9d06
commit d6d33843d9

View File

@@ -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