[PATCH 0/1] MR9474: winex11.drv: Set use_egl to false if it is unavailable.
Avoids attempting to use EGL in visual_from_pixel_format, even when it may not be usable. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9474
From: Tim Clem <tclem(a)codeweavers.com> Avoids attempting to use EGL in visual_from_pixel_format, even when it may not be usable. --- dlls/winex11.drv/opengl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index c1e4ca8d5af..e968f197fb3 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -564,6 +564,11 @@ UINT X11DRV_OpenGLInit( UINT version, const struct opengl_funcs *opengl_funcs, c *driver_funcs = &x11drv_driver_funcs; return STATUS_SUCCESS; } + else if (use_egl) + { + ERR( "Unable to initialize EGL; falling back to libGL\n" ); + use_egl = FALSE; + } /* No need to load any other libraries as according to the ABI, libGL should be self-sufficient and include all dependencies */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9474
Alternatively, visual_from_pixel_format could check `funcs->egl_handle`, but adjusting `use_egl` seemed cleaner (& preventative of future bugs). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9474#note_122098
Rémi Bernon (@rbernon) commented about dlls/winex11.drv/opengl.c:
*driver_funcs = &x11drv_driver_funcs; return STATUS_SUCCESS; } + else if (use_egl) + { + ERR( "Unable to initialize EGL; falling back to libGL\n" ); + use_egl = FALSE; + }
I don't think we want to print an error, it's just a default and we should let win32u actually decide to fallback. Let's just change to: ```suggestion:-4+0 use_egl = FALSE; ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9474#note_122099
participants (3)
-
Rémi Bernon -
Tim Clem -
Tim Clem (@tclem)