[Mesa-dev] [PATCH 3/5] egl: Move loader_set_logger() up to egl_dri2.c.
Eric Anholt
eric at anholt.net
Thu Nov 15 23:05:25 UTC 2018
Everyone needs to call it, and platform_x11 forgot to.
---
src/egl/drivers/dri2/egl_dri2.c | 2 ++
src/egl/drivers/dri2/platform_android.c | 2 --
src/egl/drivers/dri2/platform_drm.c | 2 --
src/egl/drivers/dri2/platform_surfaceless.c | 2 --
src/egl/drivers/dri2/platform_wayland.c | 4 ----
5 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 3b63aebbf9a2..f05c39126c85 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 b3ef55896116..366a9ec14e98 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 fb346e007332..c1ab1c9b0f6e 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 1edfca246dbd..f98095616115 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 dc16a69dfbc2..8122c8112887 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");
--
2.19.1
More information about the mesa-dev
mailing list