RealNC wrote:DWM still has at least 1 frame of input lag because composition is still happening. (Composition is the combination of all application output into a final image, which happens into a separate buffer.)
This is very true, but this should not need to exist anymore.
Technologically, in a properly designed OS compositing pipeline, DWM lag can be made to become as little as ~0.25 or 0.5ms on modern NVIDIA/Radeon GPUs.
I wish Microsoft would get with this program (if they haven't already started making moves towards reduced-lag compositing).
Today, modern GPU's now and enough memory throughput to composite multiple 2D framebuffers into a single framebuffer in less than 1 millisecond now -- theoretically it could now be all completed in the middle of a blanking interval
There are new compositing algorithms that allows sub-frame-lag compositing even on older 8-year old Intel GPUs (e.g. 1/4th frame lag) -- just enough margin to give time for compositing overhead while retaining the same fluidity. It could be dynamically calibrated based on GPU performance. A GTX Titan can composite a bunch of framebuffers into one frame in just mere hundreds of milliseconds -- you could literally squeeze compositing into the blanking interval between refresh cycles!
From rendering workflow basis on an unpredictable-performance GPU, it is much easier to just double-vsync it -- the application then the compositing (vsync the application for proper application fluidity, then vsync the compositing for proper compsositing fluidity). When in reality it could nowadays be single-vsync'd with just a small renderahead margin, to get the same application fluidity AND compositing for just barely more than one wait-for-vsync delay nowadays.
One lower-lag DWM compositing algorithm (for VSYNC ON gaming) is a virtualized VSYNC trigger that triggers 1 millisecond ahead of the real VSYNC. This allows the game (VSYNC ON) to flip the buffer which is then immediately composited and delivered to the monitor on time for the real VSYNC. In a modernized DWM API of any new OS running on Titan-league GPUs, all applications should deliver their framebuffers for DWM compositing approximately 1ms before the real VSYNC. Goodbye DWM lag. This is much better than the 1-additional-frame-lag added by double-VSYNC over VSYNC.
For chrissakes, there are web browsers with 1 frame less lag on Mac than on Windows 10! Apple already does low-latency compositing with their iDevices to reduce touchscreen lag between finger & scrolling.
I really look forward to jorim's benchmarking of latest drivers on GSYNC in fullscreen -vs- bordered windowless mode. Now that jorimt is writing the Blur Busters GSYNC 101 series
, he now finally has one computer mouse modifications for input-lag-testing of G-SYNC via high speed camera, so he's now armed and dangerous -- I'm now very curious to see whether Microsoft+NVIDIA has yet successfully eliminated the technologically solvable 1-frame-penalty for windowed GSYNC mode. Eventually they should solve that, technologically that lag doesn't need to be there. DWM makes it more complicated, but intrisinically it is not unsolvable.