On Tue, 2007-06-12 at 07:53 -0700, Ian Romanick wrote: > > Michel Dänzer wrote: > > On Mon, 2007-06-11 at 15:20 -0700, Jesse Barnes wrote: > > > >> - add vblank_get/put calls so interrupts are enabled at the right time > >> > >> I haven't implemented Ville's suggestion of adding a short timer before > >> disabling interrupts again, but it should be easy now that the get/put > >> routines are in place and we think it's worth it (might make vblank > >> calls a little cheaper, but it would probably be hard to detect). > > > > Yeah, I'm doubtful. Ville, can you explain some use cases you're > > thinking of? > > 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?
Should generally be one register write for each transition, no big deal. > 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. You mean the hypothetical fake counter? :) Does disabling vblank interrupts matter for any hardware that doesn't have hardware counters? > My guess is that only some drivers, most likely those that lack a > hardware vblank counter, will care about the disable delay timer. > Perhaps this could be added later...when the need actually arises? That's what I'm thinking. That said, one possible solution would be for the core to wait for the same number of interrupts as the duration of the last wait before disabling the interrupt. -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer ------------------------------------------------------------------------- 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