#include "glxextensions.h"
#include "util/debug.h"
+#ifndef GLX_USE_APPLEGL
+#include "dri_common.h"
+#endif
#include <X11/Xlib-xcb.h>
#include <xcb/xcb.h>
screens = ScreenCount(priv->dpy);
for (i = 0; i < screens; i++) {
psc = priv->screens[i];
+ if (!psc)
+ continue;
glx_screen_cleanup(psc);
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
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;
** First allocate memory for the array of per screen configs.
*/
screens = ScreenCount(dpy);
- priv->screens = malloc(screens * sizeof *priv->screens);
+ priv->screens = calloc(screens, sizeof *priv->screens);
if (!priv->screens)
return GL_FALSE;
dpyPriv->drawHash = __glxHashCreate();
+#ifndef GLX_USE_APPLEGL
+ /* Set the logger before the *CreateDisplay functions. */
+ loader_set_logger(dri_message);
+#endif
+
/*
** Initialize the direct rendering per display data and functions.
** Note: This _must_ be done before calling any other DRI routines