Re: [Mesa-dev] [PATCH] glxinfo: handle no fbconfigs case better
On 11/18/2013 04:33 PM, Dave Airlie wrote: From: Dave Airlie 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 --- 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 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] glxinfo: handle no fbconfigs case better
From: Dave Airlie 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 --- 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; } -- 1.8.4.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev