[waffle] [PATCH 0/6] wflinfo: Make wflinfo understand OpenGL 3.1 profiles
Jordan Justen
jljusten at gmail.com
Wed Apr 30 21:36:53 PDT 2014
On Wed, Apr 30, 2014 at 7:36 PM, Chad Versace
<chad.versace at linux.intel.com> wrote:
> 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) {
> error_waffle();
> }
>
> 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)
> {
> X11_SAVE_ERROR_HANDLER
> Bool ok = glXMakeCurrent(dpy, drawable, ctx);
> X11_RESTORE_ERROR_HANDLER
> return ok;
> }
>
> Can you confirm if my guess is correct? Maybe by dropping this into the GLX function:
>
> if (!ok) {
> wcore_errorf(WAFFLE_ERROR_UNKNOWN,
> "Chad forgot to catch GLX errors");
> }
Yep, adding this into wrapped_glXMakeCurrent makes it print that error.
-Jordan
>
> 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