4 ms·
Is there a reason DWM doesn't triple buffer? I'm not skilled in the dark arts of graphics, but it would seem to me if you triggered compositing to a backbuffer
by toast0 6y ago
Is there a reason DWM doesn't triple buffer? I'm not skilled in the dark arts of graphics, but it would seem to me if you triggered compositing to a backbuffer on vsync and to a separate backbuffer when a window flipped its swap chain, on the next vsync you could use the flip triggered buffer if it finished or the vsync triggered one if the flip triggered didn't finish on time.
If the flip triggered composite finishes before vsync, you could also let a second flip trigger a new composite, etc. If your windows do a lot of flipping between vsyncs, you could burn a lot of cpu/gpu time compositing, but latency improvement would be worth it, at least for some applications.
Edit: I have seen a lot of negative opinions on tripple buffering, but they seem to be related to increased latency as a result of implementations that wouldn't drop rendered frames, even when two frames were rendered between vsyncs. That's a silly thing to do, so I assume a triple buffered DWM wouldn't do that.
- modeless 6y agoThey just don't prioritize low latency enough to implement such a feature. They're probably more focused on power efficiency. The overlay solution is better (although it's not free wrt power consumption either). It's just lame that Nvidia and AMD don't support it. To be fair, it is difficult for applications to support <1 frame of latency even when the compositor allows it. It requires precise timing and very predictable rendering performance. Even VR applications struggle with this, despite the fact that the consequence of latency and/or missed frames isn't just a floaty feel to the mouse pointer, but literal nausea.