Commit 79a71375 authored by Adam Jackson's avatar Adam Jackson 🎧
Browse files

glx: Require depth > 12 for GLX visuals

fb is happy to do TrueColor to 8bpp drawables, but mesa is not. Depth 12
is the biggest pseudocolor anyone ever really did, and 15 is the least

Without this Xvfb at depth 8 would "have" GLX, but no vendors
would actually back any of the screens. libGL will attempt to call
GLXQueryServerString to figure out the GLX version, and vnd will throw
an error because there's no vendor to dispatch that to, and then clients
Signed-off-by: Adam Jackson's avatarAdam Jackson <>
parent 818885e6
......@@ -289,8 +289,9 @@ checkScreenVisuals(void)
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)
if ((screen->visuals[j].class == TrueColor ||
screen->visuals[j].class == DirectColor) &&
screen->visuals[j].nplanes > 12)
return TRUE;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment