From: Eric Anholt Date: Thu, 15 Nov 2018 22:47:30 +0000 (-0800) Subject: egl: Move loader_set_logger() up to egl_dri2.c. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2bc1f5c2e70fe3b4d41f060af9859bc2a94c5b62;p=mesa.git egl: Move loader_set_logger() up to egl_dri2.c. Everyone needs to call it, and platform_x11 forgot to. Reviewed-by: Eric Engestrom Reviewed-by: Emil Velikov --- diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 198ba73247f..af2b3a6fa8f 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -900,6 +900,8 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp) return EGL_TRUE; } + loader_set_logger(_eglLog); + switch (disp->Platform) { case _EGL_PLATFORM_SURFACELESS: ret = dri2_initialize_surfaceless(drv, disp); diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index b3ef5589611..366a9ec14e9 100644 --- a/src/egl/drivers/dri2/platform_android.c +++ b/src/egl/drivers/dri2/platform_android.c @@ -1536,8 +1536,6 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *disp) if (disp->Options.ForceSoftware) return EGL_FALSE; - loader_set_logger(_eglLog); - dri2_dpy = calloc(1, sizeof(*dri2_dpy)); if (!dri2_dpy) return _eglError(EGL_BAD_ALLOC, "eglInitialize"); diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index fb346e00733..c1ab1c9b0f6 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -704,8 +704,6 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) if (disp->Options.ForceSoftware) return EGL_FALSE; - loader_set_logger(_eglLog); - dri2_dpy = calloc(1, sizeof *dri2_dpy); if (!dri2_dpy) return _eglError(EGL_BAD_ALLOC, "eglInitialize"); diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c index 1edfca246db..f9809561611 100644 --- a/src/egl/drivers/dri2/platform_surfaceless.c +++ b/src/egl/drivers/dri2/platform_surfaceless.c @@ -350,8 +350,6 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp) const char* err; bool driver_loaded = false; - loader_set_logger(_eglLog); - dri2_dpy = calloc(1, sizeof *dri2_dpy); if (!dri2_dpy) return _eglError(EGL_BAD_ALLOC, "eglInitialize"); diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index dc16a69dfbc..8122c811288 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -1323,8 +1323,6 @@ dri2_initialize_wayland_drm(_EGLDriver *drv, _EGLDisplay *disp) _EGLDevice *dev; struct dri2_egl_display *dri2_dpy; - loader_set_logger(_eglLog); - dri2_dpy = calloc(1, sizeof *dri2_dpy); if (!dri2_dpy) return _eglError(EGL_BAD_ALLOC, "eglInitialize"); @@ -1986,8 +1984,6 @@ dri2_initialize_wayland_swrast(_EGLDriver *drv, _EGLDisplay *disp) _EGLDevice *dev; struct dri2_egl_display *dri2_dpy; - loader_set_logger(_eglLog); - dri2_dpy = calloc(1, sizeof *dri2_dpy); if (!dri2_dpy) return _eglError(EGL_BAD_ALLOC, "eglInitialize");