[waffle] [PATCH 0/6] wflinfo: Make wflinfo understand OpenGL 3.1 profiles

Chad Versace chad.versace at linux.intel.com
Wed Apr 30 19:36:25 PDT 2014

On Wed, Apr 30, 2014 at 07:25:39PM -0700, Chad Versace wrote:
> On Mon, Apr 28, 2014 at 11:23:13PM -0700, Jordan Justen wrote:

> > These results (on nvidia with GL 4.4) could be better:
> > 
> > $ bin/wflinfo -p glx -a gl -V 3.1 --profile=core
> > Waffle error: 0x0 WAFFLE_NO_ERROR
> > 
> > $ bin/wflinfo -p glx -a gl -V 3.1 --profile=compat
> > Waffle error: 0x0 WAFFLE_NO_ERROR
> > 
> > Removing -V works as expected though.

My best guess is that waffle_make_current() fails here.

    // The user cares about the profile. We must bind the context to inspect
    // its profile.
    // Skip window creation. No window is needed when binding an OpenGL >= 3.0
    // context.
    ok = waffle_make_current(dpy, NULL, ctx);
    if (!ok) {

On GLX, that doesn't set waffle_error because this code in glx_platform.c is stupid:

    static inline Bool
    wrapped_glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx)
        Bool ok = glXMakeCurrent(dpy, drawable, ctx);
        return ok;

Can you confirm if my guess is correct? Maybe by dropping this into the GLX function:

  if (!ok) {
                  "Chad forgot to catch GLX errors");

Well... I may have forgot to catch GLX errors, but it used to be worse. Xlib's
default error handler would kill the process on GLX error.

More information about the waffle mailing list