Hey Emil, this commit breaks mesa pretty badly, wflinfo segfaults:

40a01c9a0ef2c8110d79c284976ef34c0f73be92 is the first bad commit
commit 40a01c9a0ef2c8110d79c284976ef34c0f73be92
Author: Emil Velikov <emil.veli...@collabora.com>
Date:   Thu Nov 9 19:04:25 2017 +0000

    egl/drm: move teardown code to the platform file

    Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
    Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com>

:040000 040000 2b357f3f681f8c4a1a672dd7694f18b4866226d8 
0b1507c3b436555f37c160ebed6757ebcd84e41a M      src

Quoting Emil Velikov (2017-11-13 06:06:13)
> From: Emil Velikov <emil.veli...@collabora.com>
> 
> Signed-off-by: Emil Velikov <emil.veli...@collabora.com>
> ---
>  src/egl/drivers/dri2/egl_dri2.c         | 21 +--------------------
>  src/egl/drivers/dri2/egl_dri2.h         |  4 ++++
>  src/egl/drivers/dri2/platform_wayland.c | 22 ++++++++++++++++++++++
>  3 files changed, 27 insertions(+), 20 deletions(-)
> 
> diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
> index fc56e6357a6..28a3591ed49 100644
> --- a/src/egl/drivers/dri2/egl_dri2.c
> +++ b/src/egl/drivers/dri2/egl_dri2.c
> @@ -994,28 +994,9 @@ dri2_display_destroy(_EGLDisplay *disp)
>     case _EGL_PLATFORM_DRM:
>        dri2_teardown_drm(disp);
>        break;
> -#ifdef HAVE_WAYLAND_PLATFORM
>     case _EGL_PLATFORM_WAYLAND:
> -      if (dri2_dpy->wl_drm)
> -          wl_drm_destroy(dri2_dpy->wl_drm);
> -      if (dri2_dpy->wl_dmabuf)
> -          zwp_linux_dmabuf_v1_destroy(dri2_dpy->wl_dmabuf);
> -      if (dri2_dpy->wl_shm)
> -          wl_shm_destroy(dri2_dpy->wl_shm);
> -      if (dri2_dpy->wl_registry)
> -         wl_registry_destroy(dri2_dpy->wl_registry);
> -      if (dri2_dpy->wl_queue)
> -         wl_event_queue_destroy(dri2_dpy->wl_queue);
> -      if (dri2_dpy->wl_dpy_wrapper)
> -         wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper);
> -      u_vector_finish(&dri2_dpy->wl_modifiers.argb8888);
> -      u_vector_finish(&dri2_dpy->wl_modifiers.xrgb8888);
> -      u_vector_finish(&dri2_dpy->wl_modifiers.rgb565);
> -      if (dri2_dpy->own_device) {
> -         wl_display_disconnect(dri2_dpy->wl_dpy);
> -      }
> +      dri2_teardown_wayland(disp);
>        break;
> -#endif
>     default:
>        break;
>     }
> diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
> index 9222fa122b2..ef375b68f82 100644
> --- a/src/egl/drivers/dri2/egl_dri2.h
> +++ b/src/egl/drivers/dri2/egl_dri2.h
> @@ -433,12 +433,16 @@ dri2_teardown_drm(struct dri2_egl_display *dri2_dpy) {}
>  #ifdef HAVE_WAYLAND_PLATFORM
>  EGLBoolean
>  dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp);
> +void
> +dri2_teardown_wayland(struct dri2_egl_display *dri2_dpy);
>  #else
>  static inline EGLBoolean
>  dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
>  {
>     return _eglError(EGL_NOT_INITIALIZED, "Wayland platform not built");
>  }
> +static inline void
> +dri2_teardown_wayland(struct dri2_egl_display *dri2_dpy) {}
>  #endif
>  
>  #ifdef HAVE_ANDROID_PLATFORM
> diff --git a/src/egl/drivers/dri2/platform_wayland.c 
> b/src/egl/drivers/dri2/platform_wayland.c
> index b38eb1c3354..b8f644210b3 100644
> --- a/src/egl/drivers/dri2/platform_wayland.c
> +++ b/src/egl/drivers/dri2/platform_wayland.c
> @@ -1980,3 +1980,25 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay 
> *disp)
>     return initialized;
>  
>  }
> +
> +void
> +dri2_teardown_wayland(struct dri2_egl_display *dri2_dpy)
> +{
> +   if (dri2_dpy->wl_drm)
> +      wl_drm_destroy(dri2_dpy->wl_drm);
> +   if (dri2_dpy->wl_dmabuf)
> +      zwp_linux_dmabuf_v1_destroy(dri2_dpy->wl_dmabuf);
> +   if (dri2_dpy->wl_shm)
> +      wl_shm_destroy(dri2_dpy->wl_shm);
> +   if (dri2_dpy->wl_registry)
> +      wl_registry_destroy(dri2_dpy->wl_registry);
> +   if (dri2_dpy->wl_queue)
> +      wl_event_queue_destroy(dri2_dpy->wl_queue);
> +   if (dri2_dpy->wl_dpy_wrapper)
> +      wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper);
> +   u_vector_finish(&dri2_dpy->wl_modifiers.argb8888);
> +   u_vector_finish(&dri2_dpy->wl_modifiers.xrgb8888);
> +   u_vector_finish(&dri2_dpy->wl_modifiers.rgb565);
> +   if (dri2_dpy->own_device)
> +      wl_display_disconnect(dri2_dpy->wl_dpy);
> +}
> -- 
> 2.15.0
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Attachment: signature.asc
Description: signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to