[Mesa-dev] [Bug 41999] GL_OES_mapbuffer is advertised but calling glMapBufferOES throws a warning

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 21 07:40:50 PST 2011


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

--- Comment #2 from Neil Roberts <neil at linux.intel.com> 2011-11-21 07:40:50 PST ---
Created attachment 53741
  --> https://bugs.freedesktop.org/attachment.cgi?id=53741
Standalone test case

I still have the issue but actually the situation is more complicated than I
first thought. The problem is showing up in Cogl. Cogl is careful to dlopen
either libGL or libGLESv2 to get the right GL API depending on an environment
variable. All of the GL symbols it uses are queried using eglGetProcAddress or
if that returns NULL it will use dlsym with the module handle of the GL
library.

However, Cogl is also linking against Cairo which is linking against libGL. I'm
guessing that means that Mesa is assuming we want to use the GL API maybe
because it finds the _glapi_get_proc_address symbol from libGL first. That
makes eglGetProcAddress return NULL for glMapBufferOES.

What is expected to happen when there are two libraries providing a GL API
linked into a process? Ie, libGL and libGLESv2.

Here's a standalone test case simulating what Cogl does. If you link it with
just -lEGL -lX11 -ldl then it works and draws a red triangle, but if you add in
-lGL then it fails to find glMapBufferOES and gives up.

-- 
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