It is implicit that visuals are suitable for use with a window.

Glean (for e.g.) assumes all visuals support window drawables.

glXChooseVisual() documentation also appears to perhaps mean that we should 
only create
visuals for fbConfigs which have drawableType containing GLX_PIXMAP_BIT if 
GLX_BUFFER_SIZE
is one of the Pixmap depths supported by the X server.

Signed-off-by: Jon TURNEY <[email protected]>
---
 glx/glxscreens.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index 58d8ee0..6eef9fc 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -450,6 +450,10 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr 
pScreen)
        if (i == pScreen->numVisuals)
            continue;
 
+        /* Make sure the FBconfig supports window drawables */
+        if (!(config->drawableType & GLX_WINDOW_BIT))
+          continue;
+
        /* Create a new X visual for our FBconfig. */
        visual = AddScreenVisuals(pScreen, 1, depth);
        if (visual == NULL)
-- 
1.7.0.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to