diff options
author | marha <marha@users.sourceforge.net> | 2014-05-23 19:43:56 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-05-23 19:43:56 +0200 |
commit | 1c96f09adce1625dcbae5fe303d7c551a6c1bad3 (patch) | |
tree | 70b5bbde90432287ae91513b8a4edcc55fcf9e9e /xorg-server/glx/glxext.c | |
parent | 697c9a1917acd36a1b99e0d263baf2514446ca11 (diff) | |
parent | 63bfcd0be46413dda8c22b914d12f66ea5d5c66d (diff) | |
download | vcxsrv-1c96f09adce1625dcbae5fe303d7c551a6c1bad3.tar.gz vcxsrv-1c96f09adce1625dcbae5fe303d7c551a6c1bad3.tar.bz2 vcxsrv-1c96f09adce1625dcbae5fe303d7c551a6c1bad3.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mapi/glapi/gen/gl_gentable.py
xorg-server/include/servermd.h
Diffstat (limited to 'xorg-server/glx/glxext.c')
-rwxr-xr-x | xorg-server/glx/glxext.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c index f95b4e339..64fa0ba55 100755 --- a/xorg-server/glx/glxext.c +++ b/xorg-server/glx/glxext.c @@ -321,6 +321,23 @@ GlxPushProvider(__GLXprovider * provider) __glXProviderStack = provider; } +static Bool +checkScreenVisuals(void) +{ + int i, j; + + for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr screen = screenInfo.screens[i]; + for (j = 0; j < screen->numVisuals; j++) { + if (screen->visuals[j].class == TrueColor || + screen->visuals[j].class == DirectColor) + return True; + } + } + + return False; +} + /* ** Initialize the GLX extension. */ @@ -339,6 +356,10 @@ GlxExtensionInit(void) *stack = &__glXDRISWRastProvider; } + /* Mesa requires at least one True/DirectColor visual */ + if (!checkScreenVisuals()) + return; + __glXContextRes = CreateNewResourceType((DeleteType) ContextGone, "GLXContext"); __glXDrawableRes = CreateNewResourceType((DeleteType) DrawableGone, |