Many extension functions exported by libGL.so.1
Submitted by Alexander Monakov
Assigned to mes..@..op.org
Description
Created attachment 70035 GL exports checking script
Current OpenGL ABI specifies that libraries need not export functions beyond GLX 1.4, OpenGL 1.2 and GL_ARB_multitexture. Anything else must be obtained via glXGetProcAddress. Current Mesa exports a lot more than that, and I was told today on #dri-devel IRC that it's a bug that ought to be reported.
I'm attaching a simple script that has a whitelist of OpenGL functions corresponding to the above ABI subset, and prints exported functions that are not from that subset. The whitelist counts 494 functions, and running the script on my git build of Mesa produces a list of 848 functions.
Known (to me) applications that ignore the OpenGL ABI and explicitely link against extension functions:
- Braid. My bugreport here: https://bugzilla.icculus.org/show_bug.cgi?id=5759#c0
- Trine 2. No public bugzilla, reported to developers in private e-mail.
- Enemy Territory: tries to use dlopen instead of glXGetProcAddress.
- Waking Mars. Not reported yet.
- Steam for Linux. List of imported extensions here: https://github.com/amonakov/primus/issues/21#issuecomment-10185661
- Some Webkit-related library used in Linux Steam attempts to load extensions with dlopen. Not analyzed, not reported yet.
Attachment 70035, "GL exports checking script":
checkglapi.sh
Version: git