egl: Move loader_set_logger() up to egl_dri2.c.
authorEric Anholt <eric@anholt.net>
Thu, 15 Nov 2018 22:47:30 +0000 (14:47 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 16 Nov 2018 23:38:18 +0000 (15:38 -0800)
Everyone needs to call it, and platform_x11 forgot to.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/dri2/platform_android.c
src/egl/drivers/dri2/platform_drm.c
src/egl/drivers/dri2/platform_surfaceless.c
src/egl/drivers/dri2/platform_wayland.c

index 198ba73247f5b94a96df5a7f8c79039797304ef9..af2b3a6fa8fd444ce27edd505dd1def06063f742 100644 (file)
@@ -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);
index b3ef55896116359dfea02cc5f5030281cd83b17b..366a9ec14e983c41ded1505e32a9b434de7c5117 100644 (file)
@@ -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");
index fb346e0073321a3bccaee5e3b4bdeab88c04ba11..c1ab1c9b0f6ec1331073aa7d25b41f6e60831ed1 100644 (file)
@@ -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");
index 1edfca246dbd300bc4c43a86b9b2bf4788f5f073..f98095616115d39ce97f66c3d08cdee9ac476de4 100644 (file)
@@ -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");
index dc16a69dfbc2a5379cdb43b2257ff8f40792a352..8122c8112887dcd49d7555c77b30ba8cc5443f96 100644 (file)
@@ -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");