ignoring the hacky clockspeed workaround for a sec, as someone who demands vsync in games/compositors/videos, i dont see how any compositor can exist without triple buffering (dynamic or otherwise)
with vsync, if the rendering load is too demanding to complete a frame within refresh, it wont appear until the next refresh cycle, but the problem with double buffering is that the next potential frame WAITS to render since there's no available buffer, resulting in a halving of the framerate if the demanding load is prolonged
triple buffering at least lets the next frame start rendering, so for example a steady 20ms load on a 60hz screen can be an average of 50fps rather than being locked to 30fps
yes it's merely bouncing 33 16 16 33 16 33 16 16 33 16 33 ms, but that's perceptually less jarring than even half a second of sudden 30fps such as during a visual effect or animation
the other alternative is not syncing in such a situation, but tearing is also jarring especially if the framerate is near the refresh rate
"but the desktop is not a demanding game", it still needs to run on phones or ultra low power tinker hardware, what about games displayed in a window, what about demanding websites, what about content creation, what about a file manager displaying thousands of items, etc
hardware cursors do not have extra latency nor are they tied to the framerate (imagine a separate transparent layer dedicated to displaying the cursor), so it actually doesnt matter how slow the game or interface is as long moving the mouse is snappy, only a few wrongly designed games or desktop environments still use software cursors
end-to-end latency is a lot more complex than the render time (mouse to pc, pc to game engine, game engine tick rate, game engine to gpu, gpu to display controllers, display controllers to crystals/leds changing), most everyone has dozens of ms latency at minimum
in the last few years, nvidia and amd gpu (windows) drivers have worked on reducing this total latency, sometimes with game dev or even monitor hardware involvement, but i never familiarized myself with the low level details of how that was done (almost always per game, imagine from 70ms to 40ms total latency at similar already high average framerate)
i've never used an amiga, but in those days either vsync was not common OR everything was tied to processor clockspeeds and scanouts (vsync without the safety of duplicating frames?), so devs focused on consistent framerate and not exceeding frame time budgets
but freesync and gsync definitely solve the problem of displaying when ready without additional latency
EDIT: fun observation of (composited, aero enabled) windows: when click holding to drag a window, you can visibly see the cursor shift its position backwards and then letting go of the click shifts the cursor forwards, which shows that the composited desktop is lagging behind by a frame compared to the cursor, so they actually put in the effort to hide this visual discrepancy while (composited, vsynced) xfce by comparison has the cursor shifting around relative to the window being dragged (i havent checked the latest windows versions to see if this is still the case, and i havent squinted at gnome/kde/weston/wayfire to look for this effect, plus i'm inclined to force vsync globally in mesa then turn off compositor vsync so i'd need to confirm if xfce still acts the same)
with vsync, if the rendering load is too demanding to complete a frame within refresh, it wont appear until the next refresh cycle, but the problem with double buffering is that the next potential frame WAITS to render since there's no available buffer, resulting in a halving of the framerate if the demanding load is prolonged
triple buffering at least lets the next frame start rendering, so for example a steady 20ms load on a 60hz screen can be an average of 50fps rather than being locked to 30fps
yes it's merely bouncing 33 16 16 33 16 33 16 16 33 16 33 ms, but that's perceptually less jarring than even half a second of sudden 30fps such as during a visual effect or animation
the other alternative is not syncing in such a situation, but tearing is also jarring especially if the framerate is near the refresh rate
"but the desktop is not a demanding game", it still needs to run on phones or ultra low power tinker hardware, what about games displayed in a window, what about demanding websites, what about content creation, what about a file manager displaying thousands of items, etc
Originally posted by stompcrash
View Post
end-to-end latency is a lot more complex than the render time (mouse to pc, pc to game engine, game engine tick rate, game engine to gpu, gpu to display controllers, display controllers to crystals/leds changing), most everyone has dozens of ms latency at minimum
in the last few years, nvidia and amd gpu (windows) drivers have worked on reducing this total latency, sometimes with game dev or even monitor hardware involvement, but i never familiarized myself with the low level details of how that was done (almost always per game, imagine from 70ms to 40ms total latency at similar already high average framerate)
i've never used an amiga, but in those days either vsync was not common OR everything was tied to processor clockspeeds and scanouts (vsync without the safety of duplicating frames?), so devs focused on consistent framerate and not exceeding frame time budgets
but freesync and gsync definitely solve the problem of displaying when ready without additional latency
EDIT: fun observation of (composited, aero enabled) windows: when click holding to drag a window, you can visibly see the cursor shift its position backwards and then letting go of the click shifts the cursor forwards, which shows that the composited desktop is lagging behind by a frame compared to the cursor, so they actually put in the effort to hide this visual discrepancy while (composited, vsynced) xfce by comparison has the cursor shifting around relative to the window being dragged (i havent checked the latest windows versions to see if this is still the case, and i havent squinted at gnome/kde/weston/wayfire to look for this effect, plus i'm inclined to force vsync globally in mesa then turn off compositor vsync so i'd need to confirm if xfce still acts the same)
Comment