Mesa 17.2.0 renderer driver name change error, causes GLProfile not mapped initialization error

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Mesa 17.2.0 renderer driver name change error, causes GLProfile not mapped initialization error

zeno
Hello all,
I've got some issues regarding jogl context initialization while using new Mesa 17.2.0 on my arch linux machine. To make some short summary, while using slightly older Mesa (17.1.5), GL renderer was named:
Gallium 0.4 on AMD HAWAII (DRM 3.15.0 / 4.12.12-1-ARCH, LLVM 4.0.1)
and all was working well, while the new renderer is named:
AMD Radeon R9 200 Series (AMD HAWAII / DRM 3.15.0 / 4.12.12-1-ARCH, LLVM 4.0.1)
GLContext would therefore not recognize by this new name that it is actually Mesa renderer/driver - context and profile initialization fails and things does not work at all.

Its quite easy, anyway here are some informations regarding my machine and jogl:
OS/Distro: Linux/Archlinux (up to date)
Graphics card: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii XT / Grenada XT [Radeon R9 290X/390X]
Video drivers: xf86-video-amdgpu-1.4.0-1-x86_64 (radeon module is blacklisted because of OpenCL incompatibility, so amdgpu module is used in all setups.)
jogl version and package is from: http://jogamp.org/deployment/v2.3.2/archive/jogamp-fat-all.7z
All other important informations could be found in all of the following debug outputs....

debug output of GLProfile.get(GLProfile.GL2) on Mesa 17.1.5 - mesa driver recognized:
https://pastebin.com/PQ1jrmtZ

debug output of GLProfile.get(GLProfile.GL2) on Mesa 17.2.0 - mesa driver NOT recognized:
https://pastebin.com/3SAuNfv7

debug output of GLProfile.get(GLProfile.GL2) on Mesa 17.2.0 with modified GLContextImpl - mesa driver recognized:
https://pastebin.com/cJJ6cp1x

I was able to recognize the problem just by diffing first two debug outputs (lines 212-216 quirks...) where renderer names are shown (or missing in the buggy case). After putting some breakpoints to quirks init, the issue immediately shown itself.

To sum it up, actual problem lies in function setRendererQuirks in class GLContextImpl.java on line 2116 (alternatively https://github.com/sgothel/jogl/blob/master/src/jogl/classes/jogamp/opengl/GLContextImpl.java#L2136) where:
final boolean isDriverMesa = glRenderer.contains(MesaSP) || glRenderer.contains("Gallium ");
needs to be changed to:
final boolean isDriverMesa = glRenderer.contains(MesaSP) || glRenderer.contains("Gallium ") || glRenderer.startsWith("AMD ");
this causes the context to be correctly initialized and things work well again. It even looks like there was already some intention to implement this Mesa AMD renderer - as seen commented 8 lines above the culprit, where:
// final String MesaRendererAMDsp = " AMD ";
I do not know whether this is the best solution as I do not see too deep to JOGL internals, so I am just documenting my findings for you this way. Hope this helps.

Have a nice day.
Zeno
Reply | Threaded
Open this post in threaded view
|

Re: Mesa 17.2.0 renderer driver name change error, causes GLProfile not mapped initialization error

gouessej
Administrator
Hi

The suggested fix would cause a regression as a renderer can contain AMD and can have nothing to do with Mesa.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Mesa 17.2.0 renderer driver name change error, causes GLProfile not mapped initialization error

gouessej
Administrator
In reply to this post by zeno
You should fill a bug report. I'll try to reproduce this bug on my own machine under Mageia Linux 6.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Mesa 17.2.0 renderer driver name change error, causes GLProfile not mapped initialization error

zeno
In reply to this post by gouessej
Hi,
glVersion string could be of some help then, (loaded at GLContextImpl.java:1634 -> glGetStringInt(GL.GL_VERSION, glGetStringPtr)), returns following:
OpenGL ES 3.1 Mesa 17.2.0
Well, to be honest, it is quite a mess, according to: https://www.khronos.org/opengl/wiki/OpenGL_Context#OpenGL_version_number 
this could change to anything anytime as it depends on specific GL implementations.
Have a nice day.
Zeno
Reply | Threaded
Open this post in threaded view
|

Re: Mesa 17.2.0 renderer driver name change error, causes GLProfile not mapped initialization error

gouessej
Administrator
I'm currently using Mesa 17.1.4. I'll fill a bug report soon. Thank you for the hints.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Mesa 17.2.0 renderer driver name change error, causes GLProfile not mapped initialization error

Xerxes Rånby
There are two ways to fix this issue
 A ) the best option: fix all outstanding issues with mesa 3d so that we no longer require any quirks, this would fix mesa 3d initialization in combination with the current jogamp version.

B) add yet another workaround in jogamp, this will only push the issue into the future

2017-09-14 9:43 GMT+02:00 gouessej [via jogamp] <[hidden email]>:
I'm currently using Mesa 17.1.4. I'll fill a bug report soon. Thank you for the hints.
Julien Gouesse | Personal blog | Website



To start a new topic under jogl, email [hidden email]
To unsubscribe from jogamp, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Mesa 17.2.0 renderer driver name change error, causes GLProfile not mapped initialization error

gouessej
Administrator
The option A seems to be infeasible to me. I can't fix Mesa itself and there are still buggy versions installed on numerous computers.

In my humble opinion, it will force us to release a maintenance version because the impact is quite big. We can't stay with such an important unfixed bug affecting GNU Linux.
Julien Gouesse | Personal blog | Website