Login  Register

Re: Cannot initialize JOGL on Mesa swrast after upgrade

Posted by Sven Gothel on Feb 06, 2014; 11:57am
URL: https://forum.jogamp.org/Cannot-initialize-JOGL-on-Mesa-swrast-after-upgrade-tp4031458p4031477.html

On 02/06/2014 12:16 PM, Dolda2000 [via jogamp] wrote:> In continuation on that
gdb attempt, it seems that, in this case,

> glXGetConfigAttrib dispatches to "Fake_glXGetFBConfigAttrib" in
> src/mesa/drivers/x11/fakeglx.c, which indeed returns -1 on having a NULL
> config passed in:
>
>    if (!dpy || !config || !value)
>       return -1;
>
> I just wanted to mention it, since it is congruent with the Exception message
> saying "Unknown error code -1".
>
That would mean that the call to

  GLX.glXChooseFBConfig(display, screen, null, count);

[jogamp.opengl.x11.glx.X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationFBConfig(..)
in line 327]

returns an array of PointerBuffer but one (1st and only one?) is a NULL ptr ?

On 02/06/2014 12:42 PM, Dolda2000 [via jogamp] wrote:

> Actually, I'm now inclined to ascribe this problem to some kind of bug in
> Mesa. I traced it back to glXChooseFBConfig, and Mesa actually seems to return
> a list with NULLs in it:
>
>
> Sorry for wasting your time with something that doesn't seem to have with JOGL
> to do at all. I just assumed JOGL did something weird, since glxinfo worked
> properly, but looking at it, those NULLs correspond to lines from glxinfo
> where all attributes are zeroes, so glxinfo probably just doesn't check the
> return code from glXGetFBConfigAttrib.
We came to the same conclusion - see above :)

Surely some issue with that Mesa release .. hmm,
and surely not wasting our time!

+++

However, we could attempt a workaround, i.e. handle it upstream.

Maybe you can test to catch the exception from glXGetFBConfig
and return zero at FBCfgDrawableTypeBits ?

It probably will result in zero found FBConfigs .. and using the XVisual instead.

Can you test this ?

> If anything, you guys may want to check for this condition and signal it
> specifically, but if you decide not to, I understand entirely, since it's
> clearly pathological. :)

We are used to driver bugs :)

+++

BTW, is 'libgl1-mesa-swx11' the right choice for software rendering in the
first place ?

I thought the gallium llvm provides software rendering .. hmm

~Sven




signature.asc (894 bytes) Download Attachment