Re: [AD] Patches

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


Peter Wang <tjaden@xxxxxxxxxx> writes:
> Here's what I think the changes are:
> 
> (1) vbeaf.c: do hardware scrolling without waiting for vertical retrace
> (2) vga.c: ditto
> (3) vesa.c: not sure, but probably the same thing as previous two
> (4) graphics.c: ignore clipping checks for scroll_screen
> (5) wjoyw32.c: more joystick buttons (16)
> 
> Anyone know if not waiting for vertical retrace is generally ok?

Absolutely not! It is very dangerous, one of those things where it's easy 
for people to say "it works for me", but it will fail horribly on some 
machines.

The only time it is safe to do a page flip without waiting for retrace is 
if either:

    - Your card changes the display address instantly, rather than the 
      setting only taking affect at the next retrace. Most cards don't do 
      this, though, and there's no way to detect it.

or:

    - Your rendering code always takes more than a frame to complete, so 
      you can be sure the previous page flip will have taken place before 
      you request the next one. But this is obviously very dependent on 
      machine speed, what works today will fail the next time clock 
      speeds double...

So, it can be a useful option to have (eg. lots of Quake players disabled 
retrace sync in order to get a framerate boost), but needs to be an 
option, and needs to default to waiting for retrace unless the user 
specifically says there is no need to bother.


    Shawn.



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