aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx/x11/glxext.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2008-06-18 14:07:38 -0700
committerEric Anholt <[email protected]>2008-06-18 14:07:38 -0700
commit654258a4fe5e7114022c6e02f2844fc469fcc6f3 (patch)
tree89d285becb87659ab61ee0ceeb35c76726ae93d2 /src/glx/x11/glxext.c
parent64adeb163d7da6d75b5664cd2ee3783cadaf63d8 (diff)
parentcf29ab3ba075905cca786b52617d7dc993f58033 (diff)
Merge commit 'origin/master' into drm-gem
Diffstat (limited to 'src/glx/x11/glxext.c')
-rw-r--r--src/glx/x11/glxext.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 75b7374a3fb..777828569f4 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -194,9 +194,14 @@ static int __glXFreeDisplayPrivate(XExtData *extension)
#ifdef GLX_DIRECT_RENDERING
/* Free the direct rendering per display data */
+ if (priv->driswDisplay)
+ (*priv->driswDisplay->destroyDisplay)(priv->driswDisplay);
+ priv->driswDisplay = NULL;
+
if (priv->driDisplay)
(*priv->driDisplay->destroyDisplay)(priv->driDisplay);
priv->driDisplay = NULL;
+
if (priv->dri2Display)
(*priv->dri2Display->destroyDisplay)(priv->dri2Display);
priv->dri2Display = NULL;
@@ -596,10 +601,16 @@ static Bool AllocAndFetchScreenConfigs(Display *dpy, __GLXdisplayPrivate *priv)
psc->drawHash = __glxHashCreate();
if (psc->drawHash == NULL)
continue;
+
if (priv->dri2Display)
psc->driScreen = (*priv->dri2Display->createScreen)(psc, i, priv);
+
if (psc->driScreen == NULL && priv->driDisplay)
psc->driScreen = (*priv->driDisplay->createScreen)(psc, i, priv);
+
+ if (psc->driScreen == NULL && priv->driswDisplay)
+ psc->driScreen = (*priv->driswDisplay->createScreen)(psc, i, priv);
+
if (psc->driScreen == NULL) {
__glxHashDestroy(psc->drawHash);
psc->drawHash = NULL;
@@ -693,8 +704,9 @@ _X_HIDDEN __GLXdisplayPrivate *__glXInitialize(Display* dpy)
** (e.g., those called in AllocAndFetchScreenConfigs).
*/
if (getenv("LIBGL_ALWAYS_INDIRECT") == NULL) {
- dpyPriv->dri2Display = dri2CreateDisplay(dpy);
+ dpyPriv->dri2Display = dri2CreateDisplay(dpy);
dpyPriv->driDisplay = driCreateDisplay(dpy);
+ dpyPriv->driswDisplay = driswCreateDisplay(dpy);
}
#endif