diff options
Diffstat (limited to 'src/glx/glxext.c')
-rw-r--r-- | src/glx/glxext.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/glx/glxext.c b/src/glx/glxext.c index dc87fb9e16..0c2f73fea0 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -264,6 +264,13 @@ glx_display_free(struct glx_display *priv) (*priv->dri3Display->destroyDisplay) (priv->dri3Display); priv->dri3Display = NULL; #endif /* GLX_USE_DRM */ + +#if defined(GLX_USE_WINDOWSGL) + if (priv->windowsdriDisplay) + (*priv->windowsdriDisplay->destroyDisplay) (priv->windowsdriDisplay); + priv->windowsdriDisplay = NULL; +#endif /* GLX_USE_WINDOWSGL */ + #endif /* GLX_DIRECT_RENDERING && !GLX_USE_APPLEGL */ free((char *) priv); @@ -800,6 +807,12 @@ AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv) if (psc == NULL && priv->driDisplay) psc = (*priv->driDisplay->createScreen) (i, priv); #endif /* GLX_USE_DRM */ + +#ifdef GLX_USE_WINDOWSGL + if (psc == NULL && priv->windowsdriDisplay) + psc = (*priv->windowsdriDisplay->createScreen) (i, priv); +#endif + if (psc == NULL && priv->driswDisplay) psc = (*priv->driswDisplay->createScreen) (i, priv); #endif /* GLX_DIRECT_RENDERING && !GLX_USE_APPLEGL */ @@ -907,6 +920,12 @@ __glXInitialize(Display * dpy) return NULL; } #endif + +#ifdef GLX_USE_WINDOWSGL + if (glx_direct && glx_accel) + dpyPriv->windowsdriDisplay = driwindowsCreateDisplay(dpy); +#endif + if (!AllocAndFetchScreenConfigs(dpy, dpyPriv)) { free(dpyPriv); return NULL; |