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 <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30472>
This commit is contained in:

committed by
Marge Bot

parent
920f085dea
commit
93aea6df07
@@ -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
|
||||
|
Reference in New Issue
Block a user