[PATCH 3/3] Restore GLX extension to XWin

Jon TURNEY jon.turney at dronecode.org.uk
Thu Jul 12 05:30:23 PDT 2012


- 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 an proper place to install the native GL provider
where it will take priority over the the swrast provider, do so
---
 hw/xwin/InitOutput.c |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 4d0df11..538b2e1 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);
 
-- 
1.7.9



More information about the xorg-devel mailing list