On Mon, 11 Apr 2011 11:29:48 -0400, Adam Jackson <a...@redhat.com> wrote: > There are, in general, more fbconfig depths than visual depths. > fbconfigs need not support Window rendering, however any that do must > have an associated visual ID (which we got right), and any that do not > must not claim GLX_WINDOW_BIT in GLX_DRAWABLE_TYPE (which we got wrong). > > Fixes piglit/glx-fbconfig-sanity, assuming you have a sufficiently > recent piglit, as that test formerly wrongly required pixmap-capable > fbconfigs to have a visual. > > Signed-off-by: Adam Jackson <a...@redhat.com> > --- > glx/glxscreens.c | 7 ++++++- > 1 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/glx/glxscreens.c b/glx/glxscreens.c > index 496cf9e..1969aa3 100644 > --- a/glx/glxscreens.c > +++ b/glx/glxscreens.c > @@ -395,8 +395,13 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr > pScreen) > if (depth == pScreen->visuals[i].nplanes) > break; > } > - if (i == pScreen->numVisuals) > + /* If it can't, fix up the fbconfig to not advertise window support > + * XXX should really do this when creating the fbconfig > + */ > + if (i == pScreen->numVisuals) { > + config->drawableType &= ~(GLX_WINDOW_BIT); > continue; > + } > > /* Create a new X visual for our FBconfig. */ > visual = AddScreenVisuals(pScreen, 1, depth);
I think that this place (matching fbconfigs with visuals if possible) is the also right place to also mask off drawabletype for this requirement. I'd drop XXX comment.
pgp25NbXkjwNz.pgp
Description: PGP signature
_______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel