egl: fix defines for zink's dri3 check

if mesa is built without dri3 then dri3 should/can not be checked

cc: mesa-stable

Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28570>
(cherry picked from commit ff37271ea7)
This commit is contained in:
Mike Blumenkrantz 2024-04-04 08:09:34 -04:00 committed by Eric Engestrom
parent 5a1d9cb484
commit 39e103e13b
2 changed files with 2 additions and 4 deletions

View file

@ -1544,7 +1544,7 @@
"description": "egl: fix defines for zink's dri3 check",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1066,17 +1066,15 @@ dri2_setup_extensions(_EGLDisplay *disp)
(dri2_dpy->present_major_version == 1 &&
dri2_dpy->present_minor_version >= 2)) &&
(dri2_dpy->image && dri2_dpy->image->base.version >= 15);
#endif
if (disp->Options.Zink && !disp->Options.ForceSoftware &&
#ifdef HAVE_DRI3_MODIFIERS
dri2_dpy->dri3_major_version != -1 &&
!dri2_dpy->multibuffers_available &&
#endif
/* this is enum _egl_platform_type */
(disp->Platform == _EGL_PLATFORM_X11 ||
disp->Platform == _EGL_PLATFORM_XCB) &&
!debug_get_bool_option("LIBGL_KOPPER_DRI2", false))
return EGL_FALSE;
#endif
loader_bind_extensions(dri2_dpy, optional_core_extensions,
ARRAY_SIZE(optional_core_extensions), extensions);