On Fri, Nov 01, 2002 at 10:41:33PM +0100, [EMAIL PROTECTED] wrote: > > I guess I'm proposing some sort of X extension that allows a > > particular X request to be tagged as "synced to vblank." For example a > > XCopyArea request could be preceded by another request (call it > > XRequestVerticalSync) that indicates to the server that the operation > > shouldn't be performed until a vblank period. > > If one knew the time until vblank, one could simply wait that time, > and then do a xsync. > > It could really be that simple.
You can't sleep with that level of precision. Even if you could, there will be latency between when your timer expires and when you wake up. You also don't know how much latency there was from the time you asked until the time you went to sleep, so you've added two unknown latencies together. If you assume the worst-case latency of even a low-latency patched system is ~1.5ms, then adding two together gives you ~3ms. The vertical blanking period itself is in this range of time. You also don't know how accurate the timer counting to the next vblank is. Perhaps it's off. The only reasonable interface here is to grab a kernel object directly, and somehow block until the vblank (probably best all around), or schedule a signal to be delivered after the vblank interrupt goes off. That way, you trigger directly off the event, and you only incur one unavoidable period of latency. -J _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
