[Xcb] XPutImage and context switches / roundtrips?

Barton C Massey bart at cs.pdx.edu
Thu Sep 11 02:48:58 PDT 2008

In message <194f62550809101503x1db44cb3lbf1f0245a877b4a8 at mail.gmail.com> you wrote:
> SHM is no real option for me, because after every 32x32
> tile the higher-level framework expects the rendering to
> be done.  This would mean for every 32x32 tile (or even
> smaller) I would have to force a sync.

I don't think I understand what your constraint is here.

The only way the high-level framework can guarantee a tile
is actually visible on screen is via a round-trip.  If each
tile has to be visible before the next one is rendered,
nothing on earth will save you. :-)
If all the tiles just have to be rendered at the end of some
high-level op, you should be able to use a bunch of SHM
tiles concurrently to accelerate your rendering...

> > I'm not so up for having some run-time
> > mechanism to be able to configure the buffer size, because
> > it introduces some complications and is almost never needed,
> > but there probably should be a config option to change it
> Well, compile-time would mean all applications would have
> to use the fixed-size buffer, regardless wether they need
> it or not.

Yes.  All applications and clients of the library would have
to agree on a buffer size for the platform.  On a modern
platform, that can usually be pretty large without anyone
caring.  I forget what the default Xlib buffer size is, but
it's way bigger than 4K.

> With an API (or a non-api based hack) it would be possible
> for apps to specify their preferred buffer size, which
> still could be limited by a compile-time constant.

Yes.  I'm concerned because some things (cough Xlib cough)
may know a little more than they should about the buffer
size and other internals of XCB.  We can provide an API for
this, but I personally don't want to unless there's no other
way to go.


More information about the Xcb mailing list