Re: [AD] Triple Buffering under X?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Evert Glebbeek wrote:
Does anyone think it could be useful to pursue this further?

I'm not sure if this is a good idea. For one, X doesn't even really do page flipping (it just emulates it), so emulating a page flip method on top of an emulated page flip is just heading for trouble. Plus, this looks to be exactly why the retrace simulator was there in DOS (to provide triple buffering when the driver wasn't capable), which was recently deprecated. Except the retrace simulator could actually attach to the hardware vsync to better emulate it.

I personally wouldn't even like X to do page flipping or allow for extra "VRAM" access, although it seems that too many Allegro programs rely on it and the X11 driver doesn't do a half-bad implementation of it.

I'd like to have triple buffering or triple buffering emulation under X so that I can test my programs that are supposed to use it.

Triple Buffering is just timed page flipping with an extra VRAM page. To your prgram, all it would need is:

do {
} while(poll_scroll());
request_video_bitmap(...);

instead of:

show_video_bitmap(...);

and the driver handles the rest. The only reason it wouldn't work is if it's a buggy driver implementation. Besides, a quick look at the source reveals that DGA2 can do triple buffering, so why not use that when testing?

> Triple buffering gives the same FPS as page flipping for me now.

Of course. Both (are supposed to) wait for vsync, so it makes sense that they'd get the same FPS count.

- Kitty Cat




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/