On Thu, Aug 25, 2016 at 9:18 AM, Emil Velikov <[email protected]> wrote:
> From: Emil Velikov <[email protected]>
>
> The dri3 version of commits 60e9c35b3a0 and 6de9a03bed4.
>
> CC: <[email protected]>
> Signed-off-by: Emil Velikov <[email protected]>
> ---
> src/egl/drivers/dri2/platform_x11.c | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/src/egl/drivers/dri2/platform_x11.c
> b/src/egl/drivers/dri2/platform_x11.c
> index 2a5fc0b..ede12b6 100644
> --- a/src/egl/drivers/dri2/platform_x11.c
> +++ b/src/egl/drivers/dri2/platform_x11.c
> @@ -1313,15 +1313,13 @@ dri2_initialize_x11_dri3(_EGLDriver *drv, _EGLDisplay
> *disp)
> dri2_dpy->screen = DefaultScreen(dpy);
> }
>
> - if (xcb_connection_has_error(dri2_dpy->conn)) {
> + if (!dri2_dpy->conn || xcb_connection_has_error(dri2_dpy->conn)) {
> _eglLog(_EGL_WARNING, "DRI3: xcb_connect failed");
> goto cleanup_dpy;
> }
When is dri2_dpy->conn ever NULL? xcb_connect() returns a valid
connection or an error object, and I don't see how XGetXCBConnection()
would ever return a NULL connection either.
Kristian
> - if (dri2_dpy->conn) {
> - if (!dri3_x11_connect(dri2_dpy))
> - goto cleanup_conn;
> - }
> + if (!dri3_x11_connect(dri2_dpy))
> + goto cleanup_conn;
>
> if (!dri2_load_driver_dri3(disp))
> goto cleanup_conn;
> @@ -1346,10 +1344,8 @@ dri2_initialize_x11_dri3(_EGLDriver *drv, _EGLDisplay
> *disp)
> disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
> #endif
>
> - if (dri2_dpy->conn) {
> - if (!dri2_x11_add_configs_for_visuals(dri2_dpy, disp, false))
> - goto cleanup_configs;
> - }
> + if (!dri2_x11_add_configs_for_visuals(dri2_dpy, disp, false))
> + goto cleanup_configs;
>
> dri2_dpy->loader_dri3_ext.core = dri2_dpy->core;
> dri2_dpy->loader_dri3_ext.image_driver = dri2_dpy->image_driver;
> --
> 2.9.0
>
> _______________________________________________
> mesa-dev mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev