Login  Register

Re: Cannot initialize JOGL on Mesa swrast after upgrade

Posted by Sven Gothel on Feb 06, 2014; 1:13pm
URL: https://forum.jogamp.org/Cannot-initialize-JOGL-on-Mesa-swrast-after-upgrade-tp4031458p4031481.html

On 02/06/2014 01:35 PM, Dolda2000 [via jogamp] wrote:

>>That would mean that the call to [glXChooseFBConfig] returns an array of
> PointerBuffer but one (1st and only one?) is a NULL ptr ?
>
> No; as you can see from glxinfo, it returns 6 GLXFBConfigs, two of which are
> NULL.
>
>> 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 ?
>
> I find JOGL's build process a bit strange and weird, and must admit I am
> uninclined to try and understand it. :)
>
Ah .. the little bit of ant shall not hurt :)

  <http://jogamp.org/jogl/doc/HowToBuild.html>

> I did fix the bug in Mesa instead. It turns out that it maps XVisualInfos
> through a function that may return NULL for visuals that aren't usable for GL,
> so I simply made glXGetFBConfigs not include those NULL results in its list,
> and installed my fixed Mesa. The result is a list of usable GLXFBConfigs only,
> and that made JOGL continue properly. (I have also reported the bug to Debian
> now.)

Great, I like to add this workaround as well ..

I will open a bug report for this one.

>
>
> However, having continued, it happened into a new problem:
> javax.media.opengl.GLException: main-SharedResourceRunner: Error making temp
> context(1) current
>
> I'm not sure if I should start a new thread for this, as it seems to be a
> separate problem. Either way, here's a new test_dbg.log which traces this
> problem: <http://www.dolda2000.com/~fredrik/tmp/test_dbg-2
> <http://www.dolda2000.com/%7Efredrik/tmp/test_dbg-2>>

We surely have a problem, the returned FBConfigs are not >= 15 bits-per-pixel.

I am surprised that it even went this far, sine we require an RGB[A] surface .. hmm.

+++

X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: got configs: 4
0: GLCaps[glx vid 0x22, fbc 0x22: rgba 2/3/3/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 16/8/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]
1: GLCaps[glx vid 0x24, fbc 0x24: rgba 3/3/2/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 16/8/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]
2: GLCaps[glx vid 0x25, fbc 0x25: rgba 3/3/2/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 16/8/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]
3: GLCaps[glx vid 0x26, fbc 0x26: rgba 2/3/3/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 16/8/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]
chooseCapabilities: Chosen idx 0
X11GLXGraphicsConfiguration.chooseGraphicsConfigurationStatic(visualID 0x0, X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :6, unitID 0, handle 0x10454e0, owner true, ResourceToolkitLock[obj 0x1ebcda2d, isOwner true, <66100363, 254e8cee>[count 1, qsz 0, owner <main-SharedResourceRunner>]]], idx 0],GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]): X11GLXGraphicsConfiguration[X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :6, unitID 0, handle 0x10454e0, owner true, ResourceToolkitLock[obj 0x1ebcda2d, isOwner true, <66100363, 254e8cee>[count 1, qsz 0, owner <main-SharedResourceRunner>]]], idx 0], visualID 0x22, fbConfigID 0x22,
        requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]],
        chosen    GLCaps[glx vid 0x22, fbc 0x22: rgba 2/3/3/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 16/8/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]]
main-SharedResourceRunner: setRealized: drawable X11OnscreenGLXDrawable, surface WrappedSurface, isProxySurface true: false -> true

+++

Context and FBConfig doesn't get along ..

There must be much more broken, i.e. GLX/Mesa-X11SW doesn't work together somewhat.

~Sven




signature.asc (894 bytes) Download Attachment