From c57f63829f0077b5a3e5968f8405e087a4490485 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 13 Sep 2017 15:44:15 -0400 Subject: [PATCH] dmx: Use noGlxExtension like other DDXes Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson --- 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. */