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 says: "There is no direct filter for picking only visuals that support GLXPixmaps. GLXPixmaps are supported for visuals whose GLX_BUFFER_SIZE is one of the pixmap depths supported by the X server." This appears to perhaps mean that we should also only create visuals from fbConfigs which have a GLX_BUFFER_SIZE which is one of the Pixmap depths supported by the X server if drawableType contains GLX_PIXMAP_BIT. 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 b75aea6..79d2e56 100644 --- a/glx/glxscreens.c +++ b/glx/glxscreens.c @@ -422,6 +422,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
