From c72d4cacdfa934981b136f4565becf653716f2ec Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Wed, 1 Jul 2009 21:18:13 +0100 Subject: [PATCH] Move initialization of ext_list_first_time out of DRI driver It needs to get set when the psc is created even if DRI is forced off, so psc->direct_support is initialized correctly, otherwise __glXExtensionBitIsEnabled() always returns FALSE Signed-off-by: Jon TURNEY --- src/glx/x11/dri2_glx.c | 3 --- src/glx/x11/dri_glx.c | 3 --- src/glx/x11/drisw_glx.c | 3 --- src/glx/x11/glxext.c | 3 +++ 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c index f4865ae..084b6a8 100644 --- a/src/glx/x11/dri2_glx.c +++ b/src/glx/x11/dri2_glx.c @@ -421,9 +421,6 @@ static __GLXDRIscreen *dri2CreateScreen(__GLXscreenConfigs *psc, int screen, if (psp == NULL) return NULL; - /* Initialize per screen dynamic client GLX extensions */ - psc->ext_list_first_time = GL_TRUE; - if (!DRI2Connect(psc->dpy, RootWindow(psc->dpy, screen), &driverName, &deviceName)) return NULL; diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c index 3ce410d..ce7a835 100644 --- a/src/glx/x11/dri_glx.c +++ b/src/glx/x11/dri_glx.c @@ -618,9 +618,6 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen, if (psp == NULL) return NULL; - /* Initialize per screen dynamic client GLX extensions */ - psc->ext_list_first_time = GL_TRUE; - if (!driGetDriverName(priv->dpy, screen, &driverName)) { Xfree(psp); return NULL; diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c index 1c229dd..dc9feb4 100644 --- a/src/glx/x11/drisw_glx.c +++ b/src/glx/x11/drisw_glx.c @@ -363,9 +363,6 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen, if (psp == NULL) return NULL; - /* Initialize per screen dynamic client GLX extensions */ - psc->ext_list_first_time = GL_TRUE; - psc->driver = driOpenDriver(driverName); if (psc->driver == NULL) goto handle_error; diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c index a5077b4..75ad128 100644 --- a/src/glx/x11/glxext.c +++ b/src/glx/x11/glxext.c @@ -612,6 +612,9 @@ AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv) if (psc->drawHash == NULL) continue; + /* Initialize per screen dynamic client GLX extensions */ + psc->ext_list_first_time = GL_TRUE; + if (priv->dri2Display) psc->driScreen = (*priv->dri2Display->createScreen) (psc, i, priv); -- 1.6.3.2