[Xcb] GLX

Jamey Sharp jamey at minilop.net
Thu Feb 10 01:16:41 PST 2005

On Mon, Jan 17, 2005 at 09:54:44PM -0500, Patrick Guimond wrote:
> Jeremy Kolb wrote:
> | I've decided to sit down and XCBify GLX.
> If you can make your current XCB-XML file and API code available on a
> repository, I'll do my part on helping to port GLX to XCB.

On Mon, Jan 17, 2005 at 10:19:21PM -0800, Barton C Massey wrote:
> Presumably the next piece is to wire the Mesa API to call
> into this stuff instead of Xlib?

So this evening I sat down for a while with Eric Anholt, who knows a lot
more about 3D than I do, and we looked at how to re-write libGL to use
XCB instead of Xlib. There are some straight-forward changes that both
make the code a lot shorter and clearer, and make an XCB port easy. We
were kind of amazed.

The big thing is that the Mesa folks have been moving toward doing code
generation from an XML description of the GL protocol. Gee... Where have
we seen *that* strategy before? Apparently this code generation so far
has only been applied to the X server implementation, but it looks
complete enough for a client-side libGL implementation too. (So far
they've been using Python scripts to process the XML, which might not be
a bad precedent to follow.)

That aside, re-factoring the Xlib macro invocations in libGL down to a
small set of XCB-like functions would lead to a patch that I'd expect
the Mesa developers to accept without too much argument; and of course
the XCB port would be really easy then.

So Patrick and Jeremy: If you want a libGL on XCB, the first step is to
grab the Mesa source from
and look at src/glx/x11 and src/mesa/glapi. Joining the mesa3d-dev list
might not be a bad idea either. (I guess "idr" is the person responsible
for the XML GL descriptions, for what it's worth.) Josh, obviously
there's a lot you could contribute to this effort; I hope you could be
available to answer questions, at least.

With great anticipation,

More information about the xcb mailing list