Am Donnerstag, 30. April 2009 23:25:54 schrieb Ville Syrjälä: > > > Your interval handling seems to be too harsh. In case you wanted > > > something that can implement GLX_SGI_swap_control then AFAICS the > > > interval should only specify the minimum number of frames that must > > > pass between two swaps. Your code appears to always delay the flip by > > > exactly interval frames. > > > > The completion won't happen until at least 'interval' frames have > > passed since the flip was queued, so I think the semantics match? > > Well I guess it satisfies the requirement that flips will never happen > less than interval frames apart but if the application is flipping at a > slower rate anyway you still delay each flip by interval frames even > though there is no real need to do so. So it increases the latency a > bit. Also if/when you add support for queueing multiple flips the code > needs to be changed anyway to use the previous flip rather than when the > current flip was queued as the reference. I just want to chime in and note that the behavior Ville describes is the default Direct3D behavior. Ie, if you perform a flip *after* the vertical blank since the last flip, the flip occurs immediately. Only if the flip happens before the next vblank it is delayed. To support this, wine needs GLX_SGI_swap_control support. (Luckily very few apps depend on it - so far I only know Need For Speed 3)
The behavior for the user is that if vsync is enabled at a refresh rate of, say, 60 HZ, the framerate will be capped at 60 HZ. However, if the game renders slower, e.g. at 48 FPS, it still gets the 48 FPS(+tearing). The GLX_SGI_video_sync behavior would force the game down to 30 FPS(-tearing) to wait for the next vblank after the delayed sync. One could argue which one is better, it's just that D3D behaves the way it behaves and Wine needs GLX_SGI_swap_control to properly support it. So there are braindead apps out there that need it :-) ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel