summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-07-12 15:10:51 -0700
committerKeith Packard <keithp@keithp.com>2012-07-12 15:10:51 -0700
commit746193a7f10f11cccae05c98b933aadf58fc7375 (patch)
tree764b1351d313499fec04667f58dec27f80114a6f
parenta2d0829531249e24dbca25fc20ed30a2bb2d8ed8 (diff)
parent2b74949ad02bd916c3ac502db3f28057f12a8117 (diff)
Merge remote-tracking branch 'jturney/xwin-extmod-removal-fixes'
-rw-r--r--glx/glxext.c3
-rw-r--r--glx/glxserver.h2
-rw-r--r--hw/xwin/InitOutput.c23
3 files changed, 21 insertions, 7 deletions
diff --git a/glx/glxext.c b/glx/glxext.c
index a1f9d42e9..70f0df892 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -339,9 +339,6 @@ GlxExtensionInit(void)
if (!__glXContextRes || !__glXDrawableRes)
return;
- if (serverGeneration == 1)
- GlxPushProvider(&__glXDRISWRastProvider);
-
if (!dixRegisterPrivateKey
(&glxClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(__GLXclientState)))
return;
diff --git a/glx/glxserver.h b/glx/glxserver.h
index d9b106b82..1021aec80 100644
--- a/glx/glxserver.h
+++ b/glx/glxserver.h
@@ -97,7 +97,7 @@ struct __GLXprovider {
const char *name;
__GLXprovider *next;
};
-__GLXprovider __glXDRISWRastProvider;
+extern __GLXprovider __glXDRISWRastProvider;
void GlxPushProvider(__GLXprovider * provider);
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 4d0df110f..538b2e101 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -147,15 +147,30 @@ winClipboardShutdown(void)
}
#endif
-void
-ddxPushProviders(void)
+static const ExtensionModule xwinExtensions[] = {
+#ifdef GLXEXT
+ { GlxExtensionInit, "GLX", &noGlxExtension },
+#endif
+};
+
+/*
+ * XwinExtensionInit
+ * Initialises Xwin-specific extensions.
+ */
+static
+void XwinExtensionInit(void)
{
+ int i;
+
#ifdef XWIN_GLX_WINDOWS
- if (g_fNativeGl) {
+ if ((g_fNativeGl) && (serverGeneration == 1)) {
/* install the native GL provider */
glxWinPushNativeProvider();
}
#endif
+
+ for (i = 0; i < ARRAY_SIZE(xwinExtensions); i++)
+ LoadExtension(&xwinExtensions[i], TRUE);
}
#if defined(DDXBEFORERESET)
@@ -885,6 +900,8 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[])
{
int i;
+ XwinExtensionInit();
+
/* Log the command line */
winLogCommandLine(argc, argv);