[Mesa-dev] [Bug 32254] EGL+OpenGL API failed to work

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Dec 9 19:25:42 PST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=32254

--- Comment #8 from Chia-I Wu <olvaffe at gmail.com> 2010-12-09 19:25:41 PST ---
(In reply to comment #6)
> It looks like st_GL has been built with tls enabled, but the EGL loader has not
> been(In reply to comment #5)
Not exactly.  The missing symbol is in libGL*.so.  st_GL.so should link to one
of them.  The problem is that it does not know which one.  So it relies on the
application linking to the right one.  This sure will break if the app loads
libGL*.so without RTLD_GLOBAL, or loads after the creation of the EGLContext.

A sane fix is to move _glapi_tls_Context (and other _glapi_* symbols) to
another library, say libglapi.so, where all libGL*.so can link to.  It is then
safe for st_GL.so to link to libGL.so.  But that might create other issues that
I don't see now.
> > Created an attachment (id=40975)
 View: https://bugs.freedesktop.org/attachment.cgi?id=40975
 Review: https://bugs.freedesktop.org/review?bug=32254&attachment=40975

> > Link st_GL to libGL
> > 
> > Does this patch help?
> > 
> > _glapi_tls_Context is defined in libGL.so, libGLESv1_CM.so, and libGLESv2.so. 
> > But since st_GL.so can support all 3 APIs, it cannot link to any of them at
> > compile time.  If the patch works, I will look into if there is any dlopen
> > trick that may help the situation.
> 
> I don't quite see how you can actually use the OpenGL API in the EGL without
> having a libGL built for EGL use like libGLES* are.  As far as I can tell, none
> of the GL entry points are actually exported for you to link with, and
> eglGetProcAddress shouldn't let you query for core GL functions (I suspect that
> mesa's eglGetProcAddress will, but that's not guaranteed by the spec).  I must
> be missing something.
dlopen and dlsym?
> If mesa built such a libGL.so that could define the _glapi_tls_Context symbol
> in the same way that libGLES*.so currently do.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the mesa-dev mailing list