From 6ddd933cc93bc5ecd7e88d46b06172c693cc9b21 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 89efe3a..f09af6f 100644 --- a/src/glx/x11/dri2_glx.c +++ b/src/glx/x11/dri2_glx.c @@ -433,9 +433,6 @@ 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 ab24bd8..94c990b 100644 --- a/src/glx/x11/dri_glx.c +++ b/src/glx/x11/dri_glx.c @@ -657,9 +657,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; - 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 15e1586..71442a9 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 de89e85..4efa4d9 100644 --- a/src/glx/x11/glxext.c +++ b/src/glx/x11/glxext.c @@ -619,6 +619,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.4.2