[Xcb] more on the libGL port to XCB

Josh Triplett josh.trip at verizon.net
Tue Mar 29 16:43:09 PST 2005

Jamey Sharp wrote:
> On Tue, Mar 29, 2005 at 05:19:00PM -0500, Jeremy Kolb wrote:
>>Jamey Sharp wrote:
>>>Jeremy, you'll need to work out the correct descriptions of these 52
>>>requests, get them into glx.xml, and then make the appropriate
>>>indirect.c functions call those XCB functions directly. I expect the
>>>code will become a lot clearer if you do that.
>>Okay, I distinctly remember being told that I didn't have to do these,
>>but I don't remember by whom.  But in light of recent developments I
>>probably should do this.  You mean generate requests for each?  I think
>>I can handle that.  It should make everything else fit.

That was probably me.  I figured that libGL would already be doing all
the necessary work to package each GL call, and so the XCB-based libGL
would just take those packaged calls and stuff them into the
one-size-fits-all request.

> Yeah, a <request> tag for each one.

That may well be a more elegant solution, and would probably simplify libGL.

>>>List of variable-length structures aside, there's something interesting
>>>about the GLXRender-using code in libGL: it keeps a large buffer around
>>>to write the render commands into, so that it can avoid writing the
>>>8-byte GLXRender request header over and over for each rendering
>>>operation. Well, the core X protocol has some requests where that's a
>>>good idea too, and they're tagged with a combine-adjacent="true"
>>>attribute in the XCB protocol description. If we (if I?) implement
>>>support for actually combining those requests inside of XCB, then libGL
>>>needn't do any buffering of its own. I've been meaning to re-implement
>>>that anyway (it worked a long time ago, but I broke it). So don't bother
>>>using the gc->pc buffer when you implement the GLrop calls, but do add
>>>combine-adjacent="true" to the XML for the Render request.
>>For Render and RenderLarge?  I don't remember seeing combine-adjacent in
>>the docs.
> To quote ajax from our little chat the other day: "haha. docs."

Actually, from doc/xml-xcb in xcb-proto:
> <request name="identifier" opcode="integer" [combine-adjacent="true"]>
>   structure contents
>   [<reply>structure contents</reply>]
> </request>
>   If the optional combine-adjacent attribute is true, multiple adjacent
>   requests of the same type may be combined into a single request without
>   affecting the semantics of the requests.


>>>Having finally reviewed it somewhat, I have some comments on the XCB
>>>description of GLX, for whatever they're worth, which may not be much.
>>> ...
>>I'll take a look, you're probably right.  Actually there are probably
>>places in the other extensions that I've done where things can be changed :P
> If you can think of ways to improve the documentation (or the XML, or
> something) so that other people can write extension descriptions more
> easily, it'd be great if you'd write them down.

Seconded; ideas for changes to the format are welcome.

- Josh Triplett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20050329/b3ea5a2f/signature.pgp

More information about the xcb mailing list