mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 10:40:11 +01:00
EGL: legacy-x11=dri2 should support hardware driver
Since MR !33891 EGL only supports a software driver (LLVM). Routine dri3_x11_connect at src/egl/drivers/dri2/platform_x11.c fails if DRI3 is not available. So at that location variable *allow_dri2 should be set. Looking at the major codition, we see it is not executed if LIBGL_DRI3_DISABLE is set. In that case the hardware driver is activated as desired. Previously this was not needed. Also it is not practical, and not necessary. I do not understand the major condition, so I did not change it. This causes some duplicate coding. Fixes:323bad6b18("egl/x11: split out dri2 init entirely") Signed-off-by: GKraats <vd.kraats@hccnet.nl> Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34530> (cherry picked from commit995dc61bf5)
This commit is contained in:
parent
76db8496a9
commit
c196a64471
2 changed files with 10 additions and 3 deletions
|
|
@ -1024,7 +1024,7 @@
|
|||
"description": "EGL: legacy-x11=dri2 should support hardware driver",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "323bad6b18717fcc395f67ef508e5a3d0aed7d02",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1989,8 +1989,15 @@ dri2_initialize_x11(_EGLDisplay *disp, bool *allow_dri2)
|
|||
/* the status here is ignored for zink-with-kopper and swrast,
|
||||
* otherwise return whatever error/fallback status as failure
|
||||
*/
|
||||
if (!dri2_dpy->kopper && !disp->Options.ForceSoftware && !status)
|
||||
return EGL_FALSE;
|
||||
if (!dri2_dpy->kopper && !disp->Options.ForceSoftware) {
|
||||
#ifdef HAVE_X11_DRI2
|
||||
*allow_dri2 = !debug_get_bool_option("LIBGL_DRI2_DISABLE", false);
|
||||
#else
|
||||
*allow_dri2 = false;
|
||||
#endif
|
||||
if (!status)
|
||||
return EGL_FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (!dri2_load_driver(disp))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue