Module: Mesa Branch: main Commit: 8cab2ae2405b77ab21546c920fd5e6a6073a5582 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8cab2ae2405b77ab21546c920fd5e6a6073a5582
Author: Jesse Natalie <[email protected]> Date: Fri Sep 24 08:41:05 2021 -0700 egl/wgl: Don't require a native display to support window surfaces Found a Windows EGL/GLES app that inits EGL without a native display, and then creates a window surface from that EGL display: https://github.com/danginsburg/opengles3-book/ Acked-by: Daniel Stone <[email protected]> Acked-by: Mike Blumenkrantz <[email protected]> Acked-by: Sidney Just <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Tested-by: Yonggang Luo <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964> --- src/egl/drivers/wgl/egl_wgl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/egl/drivers/wgl/egl_wgl.c b/src/egl/drivers/wgl/egl_wgl.c index b98445133c4..bde80adaa3c 100644 --- a/src/egl/drivers/wgl/egl_wgl.c +++ b/src/egl/drivers/wgl/egl_wgl.c @@ -171,10 +171,10 @@ wgl_add_config(_EGLDisplay *disp, const struct stw_pixelformat_info *stw_config, } static EGLBoolean -wgl_add_configs(_EGLDisplay *disp, HDC hdc) +wgl_add_configs(_EGLDisplay *disp) { unsigned int config_count = 0; - unsigned surface_type = EGL_PBUFFER_BIT | (hdc ? EGL_WINDOW_BIT : 0); + unsigned surface_type = EGL_PBUFFER_BIT | EGL_WINDOW_BIT; // This is already a filtered set of what the driver supports, // and there's no further filtering needed per-visual @@ -256,7 +256,7 @@ wgl_initialize_impl(_EGLDisplay *disp, HDC hdc) } #endif - if (!wgl_add_configs(disp, hdc)) { + if (!wgl_add_configs(disp)) { err = "wgl: failed to add configs"; goto cleanup; }
