summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2020-03-04 17:52:04 +0000
committerEmil Velikov <[email protected]>2020-04-01 16:21:32 +0100
commitb699d070a6de273fb3a964e05944b203d0b57090 (patch)
tree30f9f5e6468677921676a790382b57019f508e87
parent06f758b0931794f5b8edb23587633f172e1b685d (diff)
glx: set the loader_logger early and for everyone
Currently we set the logger only for DRI3. Even though it's used nearly everywhere. For platforms where we don't the function is effectively a no-op. With this in place, LIBGL_DEBUG=verbose works across the board. Fixes: d971a4230d5 ("loader: Factor out the common driver opening logic from each loader.") Cc: Eric Anholt <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4084>
-rw-r--r--src/glx/dri3_glx.c2
-rw-r--r--src/glx/glxext.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index 4664733c655..a0929316778 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -1105,8 +1105,6 @@ dri3_create_display(Display * dpy)
pdp->base.destroyDisplay = dri3_destroy_display;
pdp->base.createScreen = dri3_create_screen;
- loader_set_logger(dri_message);
-
pdp->loader_extensions = loader_extensions;
return &pdp->base;
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 59434431006..cbc59e80921 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -50,6 +50,7 @@
#include "glxextensions.h"
#include "util/debug.h"
+#include "dri_common.h"
#include <X11/Xlib-xcb.h>
#include <xcb/xcb.h>
@@ -907,6 +908,9 @@ __glXInitialize(Display * dpy)
dpyPriv->drawHash = __glxHashCreate();
+ /* Set the logger before the *CreateDisplay functions. */
+ loader_set_logger(dri_message);
+
/*
** Initialize the direct rendering per display data and functions.
** Note: This _must_ be done before calling any other DRI routines