glx: set the loader_logger early and for everyone
[mesa.git] / src / glx / glxext.c
index 6e6525aeeae2e032b0808e701589bcffe879a6d8..cbc59e80921d5b606702bcf23cbdacc3ed4f3943 100644 (file)
@@ -50,6 +50,7 @@
 #include "glxextensions.h"
 
 #include "util/debug.h"
+#include "dri_common.h"
 
 #include <X11/Xlib-xcb.h>
 #include <xcb/xcb.h>
@@ -714,7 +715,8 @@ static GLboolean
    LockDisplay(dpy);
 
    psc->configs = NULL;
-   if (atof(priv->serverGLXversion) >= 1.3) {
+   if (priv->majorVersion > 1 ||
+       (priv->majorVersion == 1 && priv->minorVersion >= 3)) {
       GetReq(GLXGetFBConfigs, fb_req);
       fb_req->reqType = priv->majorOpcode;
       fb_req->glxCode = X_GLXGetFBConfigs;
@@ -906,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