DMX: Add DMX and GLX extensions
Unfortunately this also got lost in the extmod fallout, leaving the DMX server not exposing the DMX or GLX extensions. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
3556d43010
commit
353b14ea77
|
@ -407,4 +407,6 @@ extern DevPrivateKeyRec dmxGlyphSetPrivateKeyRec;
|
||||||
|
|
||||||
#define dmxGlyphSetPrivateKey (&dmxGlyphSetPrivateKeyRec) /**< Private index for GlyphSets */
|
#define dmxGlyphSetPrivateKey (&dmxGlyphSetPrivateKeyRec) /**< Private index for GlyphSets */
|
||||||
|
|
||||||
|
void DMXExtensionInit(void);
|
||||||
|
|
||||||
#endif /* DMX_H */
|
#endif /* DMX_H */
|
||||||
|
|
|
@ -68,10 +68,13 @@
|
||||||
#include <GL/glx.h>
|
#include <GL/glx.h>
|
||||||
#include <GL/glxint.h>
|
#include <GL/glxint.h>
|
||||||
#include "dmx_glxvisuals.h"
|
#include "dmx_glxvisuals.h"
|
||||||
|
#include "glx_extinit.h"
|
||||||
#include <X11/extensions/Xext.h>
|
#include <X11/extensions/Xext.h>
|
||||||
#include <X11/extensions/extutil.h>
|
#include <X11/extensions/extutil.h>
|
||||||
#endif /* GLXEXT */
|
#endif /* GLXEXT */
|
||||||
|
|
||||||
|
#include <X11/extensions/dmxproto.h>
|
||||||
|
|
||||||
/* Global variables available to all Xserver/hw/dmx routines. */
|
/* Global variables available to all Xserver/hw/dmx routines. */
|
||||||
int dmxNumScreens;
|
int dmxNumScreens;
|
||||||
DMXScreenInfo *dmxScreens;
|
DMXScreenInfo *dmxScreens;
|
||||||
|
@ -586,6 +589,20 @@ dmxExecHost(void)
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dmxAddExtensions(Bool glxSupported)
|
||||||
|
{
|
||||||
|
const ExtensionModule dmxExtensions[] = {
|
||||||
|
{ DMXExtensionInit, DMX_EXTENSION_NAME, NULL },
|
||||||
|
#ifdef GLXEXT
|
||||||
|
{ GlxExtensionInit, "GLX", &glxSupported },
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(dmxExtensions); i++)
|
||||||
|
LoadExtension(&dmxExtensions[i], TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
/** This routine is called in Xserver/dix/main.c from \a main(). */
|
/** This routine is called in Xserver/dix/main.c from \a main(). */
|
||||||
void
|
void
|
||||||
InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
|
InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
|
||||||
|
@ -594,7 +611,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
|
||||||
static unsigned long dmxGeneration = 0;
|
static unsigned long dmxGeneration = 0;
|
||||||
|
|
||||||
#ifdef GLXEXT
|
#ifdef GLXEXT
|
||||||
Bool glxSupported = TRUE;
|
static Bool glxSupported = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (dmxGeneration != serverGeneration) {
|
if (dmxGeneration != serverGeneration) {
|
||||||
|
@ -725,6 +742,9 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
|
||||||
glxSupported &= (dmxScreens[i].glxMajorOpcode > 0);
|
glxSupported &= (dmxScreens[i].glxMajorOpcode > 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (serverGeneration == 1)
|
||||||
|
dmxAddExtensions(glxSupported);
|
||||||
|
|
||||||
/* Tell dix layer about the backend displays */
|
/* Tell dix layer about the backend displays */
|
||||||
for (i = 0; i < dmxNumScreens; i++) {
|
for (i = 0; i < dmxNumScreens; i++) {
|
||||||
|
|
||||||
|
|
|
@ -68,10 +68,6 @@ extern _X_EXPORT Bool noDbeExtension;
|
||||||
extern void DbeExtensionInit(void);
|
extern void DbeExtensionInit(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DMXEXT
|
|
||||||
extern void DMXExtensionInit(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(DPMSExtension)
|
#if defined(DPMSExtension)
|
||||||
#include <X11/extensions/dpmsconst.h>
|
#include <X11/extensions/dpmsconst.h>
|
||||||
extern _X_EXPORT Bool noDPMSExtension;
|
extern _X_EXPORT Bool noDPMSExtension;
|
||||||
|
|
Loading…
Reference in New Issue