XCreatePixmap doesn't like that. Fixes piglit regression if the GL implementation exposes RGB10 depth 30 FBConfigs, but the X-Screen is set to default DefaultDepth of 24 bits, and therefore the root window only supports depth 24 pixmaps.
On RGB10 enabled Mesa fixes these tests on depth 24 screen: glx-visuals-depth -pixmap glx-visuals-stencil -pixmap Signed-off-by: Mario Kleiner <mario.kleiner...@gmail.com> --- tests/util/piglit-glx-util.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/util/piglit-glx-util.c b/tests/util/piglit-glx-util.c index 95e33ae..643692a 100644 --- a/tests/util/piglit-glx-util.c +++ b/tests/util/piglit-glx-util.c @@ -273,6 +273,7 @@ piglit_glx_iterate_pixmap_fbconfigs(enum piglit_result (*draw)(Display *dpy, bool any_fail = false; bool any_pass = false; Window root_win; + int root_depth; Display *dpy = XOpenDisplay(NULL); if (!dpy) { @@ -281,6 +282,7 @@ piglit_glx_iterate_pixmap_fbconfigs(enum piglit_result (*draw)(Display *dpy, } screen = DefaultScreen(dpy); root_win = RootWindow(dpy, screen); + root_depth = DefaultDepth(dpy, screen); configs = glXGetFBConfigs(dpy, screen, &n_configs); if (!configs) { @@ -305,6 +307,10 @@ piglit_glx_iterate_pixmap_fbconfigs(enum piglit_result (*draw)(Display *dpy, glXGetFBConfigAttrib(dpy, config, GLX_BUFFER_SIZE, &depth); + + if (depth > root_depth) + continue; + ctx = glXCreateNewContext(dpy, config, GLX_RGBA_TYPE, NULL, true); pix = XCreatePixmap(dpy, root_win, -- 2.7.4 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit