[PATCH] glx: Fix fbconfigs with no corresponding visual
Jon TURNEY
jon.turney at dronecode.org.uk
Tue Apr 12 11:34:28 PDT 2011
On 11/04/2011 16:29, Adam Jackson 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 <ajax-H+wXaHxf7aLQT0dZR+AlfA at public.gmane.org>
> ---
> 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);
Would you consider combining this with the patch [1] I posted a while ago to
check that GLX_WINDOW_BIT is actually set in the fbConfig before we create a
visual
[1] http://patchwork.freedesktop.org/patch/374/
In any case, Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>
More information about the xorg-devel
mailing list