On 11/18/2013 04:33 PM, Dave Airlie wrote:
From: Dave Airlie <airl...@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 <airl...@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 <bri...@vmware.com>

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to