VL.StandardLibs icon indicating copy to clipboard operation
VL.StandardLibs copied to clipboard

Document vsync/presentation-interval

Open joreg opened this issue 3 years ago • 7 comments

https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dpresent

  • in overview patch
  • in pin tooltip

joreg avatar Nov 17 '22 11:11 joreg

new suggestion:

  • show VSync pin on TextureWindow, RenderWindow, SceneWindow
  • Enable VSync on RenderWindow, SceneWindow
  • show runtime warning if VSync is on on more than one running window
  • make sure help patches have VSync turned off

gregsn avatar Nov 17 '22 13:11 gregsn

maybe just show the warning next to perfmeter. thats where you look for stutters

tgd-git avatar Nov 18 '22 19:11 tgd-git

yet another suggestion:

  • have an own enum, which somehow acknowledges that sometimes we have several windows that need to cooperate
    • No VSync
    • Wait For One Frame
    • Two
    • Three
    • Cooperative
  • Cooperative is our default

Cooperative means:

  • If all windows are cooperative, one of them gets picked to do the VSync automatically (-> no tearing).
  • If one window is on explicit wait (one, two, ..) this one gets picked as the one that waits. The other ones are not explicitly set to vsync by the user. Thus we can do whatever feels right. E.g. don't sync

gregsn avatar Nov 30 '22 13:11 gregsn

or could it be just a global setting VSYNC on/off on the MainLoop node and the system makes sure max one renderer (even between skia and stride) has vsync set. and we could even get rid of the vsync inputs on renderers?

joreg avatar Nov 30 '22 14:11 joreg

or could it be just a global setting VSYNC on/off on the MainLoop node and the system makes sure max one renderer (even between skia and stride) has vsync set. and we could even get rid of the vsync inputs on renderers?

There might be situations where you want to sync to a specific screen. How would that work?

bj-rn avatar Nov 30 '22 14:11 bj-rn

@bj-rn please detail that situation

joreg avatar Nov 30 '22 14:11 joreg

For example the main output is some LED-screen and another output is a connected to a preview monitor. The timings of those two most likely differ and in that case one certainly wants to sync to the main output.

bj-rn avatar Nov 30 '22 14:11 bj-rn