[PATCH 00/11] GLX dispatch cleanup

Adam Jackson ajax at redhat.com
Thu Mar 3 11:07:14 PST 2011


In trying to figure out why the clutter FBO tests simply fell over in
indirect contexts, I got to discover exactly how disgusting this code is.
The glapi code appears to have been cargo-culted in from Mesa, but is
over-general for our purposes.  In particular, glapi goes through some
contortions to support the corner case semantics of glXGetProcAddress,
which is a thing that simply can not happen in xserver, and contains
much more threading support than can happen in xserver.

This patchset attempts to simplify some of that.  I've lightly tested it,
in the sense that glxinfo and glxgears still work in indirect contexts, but
I've not tried anything as robust as piglit yet.  There's more to come, in
the form of fixing and simplifying _glapi_add_dispatch for the xserver
environment, but that's proving a little tricker than I was hoping.

Nonetheless, the before-and-after is very pretty already:

   text	   data	    bss	    dec	    hex	filename
1833530	  69920	  49664	1953114	 1dcd5a	Xvfb-before
1741772	  62928	  49640	1854340	 1c4b84	Xvfb-after

 b/glx/Makefile.am          |    2 
 b/glx/glapi.c              |  417 --
 b/glx/glapi.h              |   28 
 b/glx/glthread.c           |  162 -
 b/glx/glthread.h           |   69 
 b/hw/xquartz/GL/indirect.c |    9 
 glx/glapitemp.h            | 6655 ---------------------------------------------
 7 files changed, 19 insertions(+), 7323 deletions(-)

- ajax



More information about the xorg-devel mailing list