From 2b74949ad02bd916c3ac502db3f28057f12a8117 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Thu, 12 Jul 2012 00:36:43 +0100 Subject: [PATCH] Restore GLX extension to XWin - Add an XwinExtensionInit(), similar in spirit to QuartzExtensionInit() and xf86ExtensionInit() - Load the GLX extension (I'm guessing XQuartz needs this adding somewhere as well) - Also, since we now have a proper place to install the native GL provider where it will take priority over the the swrast provider, do so Signed-off-by: Jon TURNEY Reviewed-by: Daniel Stone Reviewed-by: Colin Harrison --- hw/xwin/InitOutput.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) 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);