glx: use glFunction()

Ian Romanick idr at
Mon Mar 1 13:56:45 PST 2010

Hash: SHA1

George Sapountzis wrote:

> This is about using glFunction() calls instead of the CALL_Function(
> GET_DISPATCH(), () ) macros. Obviously, this is code clarity vs. call
> overhead and RSS overhead, hopefully, it can be done on a case-by-case
> basis where it makes sense. I put patches at
> for an example conversion of
> glxcmds.c and glxdri.c, the patches are on top of the glapi sync
> patches at . I am posting
> because I thought it may be useful in some cases.

I haven't reviewed these patches yet, but I do have a couple general
comments.  We considered doing this initially, but rejected it for a
couple of reasons.  Most of the places where GL functions are called are
automatically generated.  The script doesn't care if it's generating
glFoo or CALL_Foo(GET_DISPATCH(), ()).  On the client-side, the loader
provides, with some effort, the static dispatch functions.  On the
server-side, the only use of GL functions *is* the loader.  It didn't
seem to make much sense to bring all that mechanism into the server just
for the server to use.

I seem to recall some discussion about creating a set of wrapper macros

#define glFoo(x, y, z) CALL_Foo(GET_DISPATCH(), (x, y, z))

for use in the server.  Given that most of the calls are generated by
scripts, there didn't seem to be much benefit.
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the xorg-devel mailing list