On 05/09/17 02:52 PM, Mario Kleiner wrote: > 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, >
This is not correct. This X server, running at depth 24, supports the following pixmap depths according to xdpyinfo: number of supported pixmap formats: 7 supported pixmap formats: depth 1, bits_per_pixel 1, scanline_pad 32 depth 4, bits_per_pixel 8, scanline_pad 32 depth 8, bits_per_pixel 8, scanline_pad 32 depth 15, bits_per_pixel 16, scanline_pad 32 depth 16, bits_per_pixel 16, scanline_pad 32 depth 24, bits_per_pixel 32, scanline_pad 32 depth 32, bits_per_pixel 32, scanline_pad 32 It sounds like this doesn't list depth 30 for you, which indicates an issue with the Xorg (driver) changes for depth 30 support. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit