[PATCH xserver 2/8] dmx: Use noGlxExtension like other DDXes

Adam Jackson ajax at redhat.com
Wed Nov 1 20:31:30 UTC 2017


Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 hw/dmx/dmxinit.c         | 16 +++++-----------
 hw/dmx/glxProxy/glxext.c |  2 ++
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index 24bb875fb..d1ffcc538 100644
--- a/hw/dmx/dmxinit.c
+++ b/hw/dmx/dmxinit.c
@@ -532,12 +532,12 @@ dmxDisplayInit(DMXScreenInfo * dmxScreen)
     dmxGetPixmapFormats(dmxScreen);
 }
 
-static void dmxAddExtensions(Bool glxSupported)
+static void dmxAddExtensions(void)
 {
     const ExtensionModule dmxExtensions[] = {
         { DMXExtensionInit, DMX_EXTENSION_NAME, NULL },
 #ifdef GLXEXT
-        { GlxExtensionInit, "GLX", &glxSupported },
+        { GlxExtensionInit, "GLX", &noGlxExtension },
 #endif
     };
 
@@ -551,12 +551,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
     int i;
     static unsigned long dmxGeneration = 0;
 
-#ifdef GLXEXT
-    static Bool glxSupported = TRUE;
-#else
-    const Bool glxSupported = FALSE;
-#endif
-
     if (dmxGeneration != serverGeneration) {
         int vendrel = VENDOR_RELEASE;
         int major, minor, year, month, day;
@@ -676,17 +670,17 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
 #ifdef GLXEXT
     /* Check if GLX extension exists on all back-end servers */
     for (i = 0; i < dmxNumScreens; i++)
-        glxSupported &= (dmxScreens[i].glxMajorOpcode > 0);
+        noGlxExtension |= (dmxScreens[i].glxMajorOpcode == 0);
 #endif
 
     if (serverGeneration == 1)
-        dmxAddExtensions(glxSupported);
+        dmxAddExtensions();
 
     /* Tell dix layer about the backend displays */
     for (i = 0; i < dmxNumScreens; i++) {
 
 #ifdef GLXEXT
-        if (glxSupported) {
+        if (!noGlxExtension) {
             /*
              * Builds GLX configurations from the list of visuals
              * supported by the back-end server, and give that
diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c
index ca9780f99..49848bbff 100644
--- a/hw/dmx/glxProxy/glxext.c
+++ b/hw/dmx/glxProxy/glxext.c
@@ -47,6 +47,8 @@
 #include "extinit.h"
 #include "glx_extinit.h"
 
+int noGlxExtension;
+
 /*
 ** Forward declarations.
 */
-- 
2.14.3



More information about the xorg-devel mailing list