[Mesa-dev] [PATCH] glxinfo: handle no fbconfigs case better

Brian Paul brianp at vmware.com
Wed Nov 20 08:47:49 PST 2013


On 11/18/2013 04:33 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> If we get a server that has only GLX1.2 and no SGIX_fbconfig, we can
> print stuff we shouldn't. If we have no fbconfigs then we don't have core
> profile, so don't bother trying visual path when doing core profile.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>   src/xdemos/glxinfo.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/src/xdemos/glxinfo.c b/src/xdemos/glxinfo.c
> index bb9e100..25967f7 100644
> --- a/src/xdemos/glxinfo.c
> +++ b/src/xdemos/glxinfo.c
> @@ -862,13 +862,14 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect,
>         visinfo = glXGetVisualFromFBConfig(dpy, fbconfigs[0]);
>         XFree(fbconfigs);
>      }
> -   else {
> +   else if (!coreProfile) {
>         visinfo = choose_xvisinfo(dpy, scrnum);
>         if (visinfo)
>   	 ctx = glXCreateContext(dpy, visinfo, NULL, allowDirect);
> -   }
> +   } else
> +      visinfo = NULL;
>
> -   if (!visinfo) {
> +   if (!visinfo && !coreProfile) {
>         fprintf(stderr, "Error: couldn't find RGB GLX visual or fbconfig\n");
>         return False;
>      }
>

This and the other glxinfo patch looks ok to me.

Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the mesa-dev mailing list