On Tuesday, June 12, 2007 7:53:13 Ian Romanick wrote:
> If an app is running with swap buffers synchronized to vblank, won't
> it go through the following:
>
> - Render scene.
> - Start to wait for vblank.
> - Enable vblank int.
> - Wait.
> - Disable vblank int.
> - Do swap.
> - Repeat.
>
> Isn't there some cost associated with the extra enable / disable of
> the vblank interrupt?

Yeah, but it's typically just one additional write as Michel pointed 
out.

> In addition, the "fake" wall clock based vblank counter might have
> accuracy problems with periods of only one or two vblanks.
> Unfortunately, these are the cases where apps will care the most
> about accuracy.

Really?  Refresh rates aren't very high relative to the event accuracy 
we have in the kernel; we should be able to schedule an event with good 
granularity, hopefully more than enough to hit a vblank window.  But 
like I said in my original post, drivers that don't have a vblank 
counter register have a couple of options:
  1) never disable interrupts, continue tracking events as usual
  2) use a timer to keep the vblank counter accurate across interrupt
     off periods

If it turns out that accuracy really is an issue, we can easily add the 
delay Ville talked about to keep things easy for those drivers, but I 
suspect option (1) is probably the best one for such hardware anyway.

Jesse

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to