xserver: Branch 'master' - 4 commits

Keith Packard keithp at kemper.freedesktop.org
Thu Jul 12 15:11:21 PDT 2012


 glx/glxext.c         |    3 ---
 glx/glxserver.h      |    2 +-
 hw/xwin/InitOutput.c |   23 ++++++++++++++++++++---
 3 files changed, 21 insertions(+), 7 deletions(-)

New commits:
commit 746193a7f10f11cccae05c98b933aadf58fc7375
Merge: a2d0829... 2b74949...
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jul 12 15:10:51 2012 -0700

    Merge remote-tracking branch 'jturney/xwin-extmod-removal-fixes'

commit 2b74949ad02bd916c3ac502db3f28057f12a8117
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Thu Jul 12 00:36:43 2012 +0100

    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 <jon.turney at dronecode.org.uk>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>

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);
 
commit 06ac7937fc37cdf073b77386bed47e14cff23628
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Thu Jul 12 12:37:05 2012 +0100

    Restore extern to the declaration of __glXDRISWRastProvider
    
    b86aa74 dropped the 'extern' from the declaration of __glXDRISWRastProvider
    
    This turns out to be important to me, as without it, the final link only gets
    the tentative definition of __glXDRISWRastProvider implied by the declaration,
    and not the proper one from glxdriswrast.c, presumably because nothing else
    references anything in the object that file generates.
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>

diff --git a/glx/glxserver.h b/glx/glxserver.h
index d9b106b..1021aec 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);
 
commit bcbf95b1bafa6ffe724768b9309295e2fdb4b860
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Thu Jul 12 00:36:10 2012 +0100

    Revert bogus GlxPushProvider() in commit a1d41e3
    
    a1d41e3 "Move extension initialisation prototypes into extinit.h"
    also includes a change to GlxExtensionInit to install the swrast GLX
    provider.
    
    Since b86aa74 "GLX: Insert swrast provider from GlxExtensionInit"
    already does this (correctly, by installing the swrast provider
    at the end of the chain, rather than at the beginning), and since this
    would seem to have the effect of making the swrast provider the most
    preferred provider, I'm guessing this wasn't intended.
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
    Reviewed-by: Daniel Stone <daniel at fooishbar.org>
    Reviewed-by: Colin Harrison <colin.harrison at virgin.net>

diff --git a/glx/glxext.c b/glx/glxext.c
index a1f9d42..70f0df8 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;


More information about the xorg-commit mailing list