[Xcb] more on the libGL port to XCB
Jamey Sharp
jamey at minilop.net
Tue Mar 29 14:41:14 PST 2005
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.
Yeah, a <request> tag for each one.
> >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."
The combine-adjacent attribute currently has no effect, so I suppose
it'd be easy to forget about.
Only Render should get combine-adjacent. RenderLarge can't be combined,
because that would require changing the request_total field for all the
requests in the sequence, which wouldn't be possible in general.
> >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.
> >Hope some of that's useful.
>
> YES!
Sweet, good to hear it. :-)
--Jamey
More information about the xcb
mailing list