[Mesa-dev] [Bug 30172] GL_EXT_framebuffer_blit function required

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Sep 16 22:00:10 PDT 2010


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

--- Comment #21 from Tom Fogal <tfogal at alumni.unh.edu> 2010-09-16 22:00:10 PDT ---
bugzilla-daemon at freedesktop.org writes:
> --- Comment #19 from Luca Barbieri <luca.barbieri at gmail.com> 2010-09-16 21:18
> :31 PDT ---
> > ELF weak symbols do not allow one to decide behavior (OpenGL
> > library) at runtime -- mangling aside.
>
> AFAIK, glXGetProcAddress also doesn't, because you can call it
> without a context bound, and thus libGL has no more information than
> the one it has at compilation time.

The issue with ELF weak symbols is that there can only be one of them.
Or rather, if one is normal and one is weak, you get the normal one
and the weak one is forgotten, but in at least my case you cannot know
until runtime which you need.

Though I forgot that this is still an issue w/ glXGetGPA, see below.

> > We *still* have to support systems that do not have dlsym =(
>
> I'm curious, how can such a system exist?  Surely a system with
> dynamic linking must have something like dlsym (perhaps with another
> name, like GetProcAddress in Windows).

These systems don't have dynamic linking.

The architecture is getting popular on very large scale supercomputers,
particularly those being sold by IBM.  There are rumors that there's
some technical reason why a 'real' operating system doesn't work on
so many nodes.  Personally I'd rather just drop support for such
systems...

Anyway what you get is a 'real' head node, and then on all the compute
nodes you basically just have a loader.

> And if dynamic linking is not supported, then you'll be limited to a
> single GL implementation and thus you don't need dlsym since you know
> exactly what is available

Technically, one could still use two because of Mesa's support for name
mangling. e.g.:

  typedef void*(*GPA)(const GLubyte*);
  static GPA __glewXGetProcAddress = NULL;
  if(mesa) {
    __glewXGetProcAddress = mglXGetProcAddress;
  } else {
    __glewXGetProcAddress = glXGetProcAddress;
  }

  __glewGetString = __glewXGetProcAddress("glGetString"); /* ish */

> (and it's better to fail at build time in this case).

yes, that's back to my original point w/ exporting the bare minimum: I
*want* to know that there's no possibility of using a function which
might not be exported -- at build time.  The alternative is exhaustive
testing on all platforms I support, which is technically possible --
the best kind of possible -- but also quite challenging.

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