summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-07-10 02:02:55 +0100
committerKeith Packard <keithp@keithp.com>2012-07-09 23:06:41 -0700
commitb86aa74cafddf9bca5addfeb458a23f46ddcf132 (patch)
treed00cbc8e3b3be064c2911d9f863cf68db2cdd08e
parent13552a5c4701097a1507a99ed8366ab1438844b6 (diff)
GLX: Insert swrast provider from GlxExtensionInit
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@fooishbar.org> Reviewed-by: Stéphane Marchesin <stephane.marchesin@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--glx/glxext.c8
-rw-r--r--glx/glxserver.h1
-rw-r--r--hw/dmx/glxProxy/glxext.c10
-rw-r--r--hw/xfree86/dixmods/glxmodule.c5
-rw-r--r--mi/miinitext.c5
5 files changed, 8 insertions, 21 deletions
diff --git a/glx/glxext.c b/glx/glxext.c
index 8d168d8a3..e506aec0b 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 24e3d626f..61c45c51e 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 b0710ccc6..95328373c 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 e72f3821a..4482cbc4f 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 13f554a3f..e60cc3f71 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