GLX: allow skipping of visual init wrapping
* GL/glx/glxvisuals.c: added boolean to disable calling init_visuals(). This gives a chance to Xephyr to take over visuals manipulation and avoid a crash at server shutdown in __glXMesaScreenDestroy(), due to the fact that mesa might sees more visual than what it has actually created in init_visuals(). It might see more visuals because Xephyr can augment the number of visuals, dynamically. * os/utils.c: the boolean is actually defined here.
This commit is contained in:
parent
ffe9ce6a84
commit
6307ee7709
|
@ -55,6 +55,7 @@
|
||||||
|
|
||||||
void GlxWrapInitVisuals(miInitVisualsProcPtr *);
|
void GlxWrapInitVisuals(miInitVisualsProcPtr *);
|
||||||
|
|
||||||
|
extern Bool noGlxVisualInit;
|
||||||
#include "glcontextmodes.h"
|
#include "glcontextmodes.h"
|
||||||
|
|
||||||
struct ScreenVisualsRec {
|
struct ScreenVisualsRec {
|
||||||
|
@ -452,14 +453,15 @@ Bool GlxInitVisuals(VisualPtr *visualp, DepthPtr *depthp,
|
||||||
/*
|
/*
|
||||||
* Setup the visuals supported by this particular screen.
|
* Setup the visuals supported by this particular screen.
|
||||||
*/
|
*/
|
||||||
init_visuals(nvisualp, visualp, defaultVisp,
|
if (!noGlxVisualInit) {
|
||||||
*ndepthp, *depthp, *rootDepthp);
|
init_visuals(nvisualp, visualp, defaultVisp,
|
||||||
|
*ndepthp, *depthp, *rootDepthp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -160,6 +160,7 @@ _X_EXPORT Bool noFontCacheExtension = FALSE;
|
||||||
#endif
|
#endif
|
||||||
#ifdef GLXEXT
|
#ifdef GLXEXT
|
||||||
_X_EXPORT Bool noGlxExtension = FALSE;
|
_X_EXPORT Bool noGlxExtension = FALSE;
|
||||||
|
_X_EXPORT Bool noGlxVisualInit = FALSE;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SCREENSAVER
|
#ifdef SCREENSAVER
|
||||||
_X_EXPORT Bool noScreenSaverExtension = FALSE;
|
_X_EXPORT Bool noScreenSaverExtension = FALSE;
|
||||||
|
|
Loading…
Reference in New Issue