[PATCH 11/54] GLX: Insert swrast provider from GlxExtensionInit

Daniel Stone daniel at fooishbar.org
Mon Jul 9 18:02:55 PDT 2012


Rather than making poor old miinitext.c do it, including making DMX
have fake symbols just to keep it happy.

Signed-off-by: Daniel Stone <daniel at fooishbar.org>
---
 glx/glxext.c                   |    8 +++++++-
 glx/glxserver.h                |    1 +
 hw/dmx/glxProxy/glxext.c       |   10 ----------
 hw/xfree86/dixmods/glxmodule.c |    5 -----
 mi/miinitext.c                 |    5 -----
 5 files changed, 8 insertions(+), 21 deletions(-)

diff --git a/glx/glxext.c b/glx/glxext.c
index 8d168d8..e506aec 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -322,9 +322,15 @@ GlxExtensionInit(void)
     ExtensionEntry *extEntry;
     ScreenPtr pScreen;
     int i;
-    __GLXprovider *p;
+    __GLXprovider *p, **stack;
     Bool glx_provided = False;
 
+    if (serverGeneration == 1) {
+        for (stack = &__glXProviderStack; *stack; stack = &(*stack)->next)
+            ;
+        *stack = &__glXDRISWRastProvider;
+    }
+
     __glXContextRes = CreateNewResourceType((DeleteType) ContextGone,
                                             "GLXContext");
     __glXDrawableRes = CreateNewResourceType((DeleteType) DrawableGone,
diff --git a/glx/glxserver.h b/glx/glxserver.h
index 24e3d62..61c45c5 100644
--- a/glx/glxserver.h
+++ b/glx/glxserver.h
@@ -99,6 +99,7 @@ struct __GLXprovider {
     const char *name;
     __GLXprovider *next;
 };
+__GLXprovider __glXDRISWRastProvider;
 
 void GlxPushProvider(__GLXprovider * provider);
 
diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c
index b0710cc..9532837 100644
--- a/hw/dmx/glxProxy/glxext.c
+++ b/hw/dmx/glxProxy/glxext.c
@@ -46,16 +46,6 @@
 #include "glxswap.h"
 
 /*
-** Stubs to satisfy miinitext.c references.
-*/
-typedef int __GLXprovider;
-__GLXprovider __glXDRISWRastProvider;
-void
-GlxPushProvider(__GLXprovider * provider)
-{
-}
-
-/*
 ** Forward declarations.
 */
 static int __glXSwapDispatch(ClientPtr);
diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c
index e72f382..4482cbc 100644
--- a/hw/xfree86/dixmods/glxmodule.c
+++ b/hw/xfree86/dixmods/glxmodule.c
@@ -84,11 +84,6 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin)
 
     setupDone = TRUE;
 
-    provider = LoaderSymbol("__glXDRISWRastProvider");
-    if (provider == NULL)
-        return NULL;
-    GlxPushProvider(provider);
-
     xf86Msg(xf86Info.aiglxFrom, "AIGLX %s\n",
             xf86Info.aiglx ? "enabled" : "disabled");
     if (xf86Info.aiglx) {
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 13f554a..e60cc3f 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -172,9 +172,6 @@ extern void XFree86VidModeExtensionInit(void);
 extern void XFree86DGAExtensionInit(void);
 #endif
 #ifdef GLXEXT
-typedef struct __GLXprovider __GLXprovider;
-extern __GLXprovider __glXDRISWRastProvider;
-extern void GlxPushProvider(__GLXprovider *impl);
 extern void GlxExtensionInit(void);
 #endif
 #ifdef XF86DRI
@@ -449,8 +446,6 @@ InitExtensions(int argc, char *argv[])
 #endif
 
 #ifdef GLXEXT
-    if (serverGeneration == 1)
-        GlxPushProvider(&__glXDRISWRastProvider);
     if (!noGlxExtension)
         GlxExtensionInit();
 #endif
-- 
1.7.10.4



More information about the xorg-devel mailing list