diff options
author | George Sapountzis <[email protected]> | 2008-06-13 15:54:08 +0300 |
---|---|---|
committer | George Sapountzis <[email protected]> | 2008-06-13 15:54:08 +0300 |
commit | 1087cc61b3776f4cdc991dcd95ee59dbd26307f3 (patch) | |
tree | c74d06f6a51495af96299f694b40daf662d1af62 /src/glx/x11/glxext.c | |
parent | 7ffb1230b3287a72d9ac59c5d830f7a4155cbdf9 (diff) |
glx: load swrast_dri.so
caveats:
- does not work with old (i.e. libGLcore) xserver:
- made unbindContext a noop
- extensions:
GLX_SGI_make_current_read
GLX_EXT_texture_from_pixmap
GLX_MESA_copy_sub_buffer
Diffstat (limited to 'src/glx/x11/glxext.c')
-rw-r--r-- | src/glx/x11/glxext.c | 14 |
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 |