Is there a way to get double-buffering at 120Hz (ProMotion) instead of triple buffering? I'm trying to minimize UI latency.
When I use Xcode's iOS Game template (which renders a rotating cube), I still get triple-buffering at 120hz, despite the trivial amount of work. It's double-buffered at 60hz.
To reproduce:
GameViewController add mtkView.preferredFramesPerSecond = 120
Looking at the graph, it seems the GPU finishes well within the time required for double-buffering.
Here's a useful video to watch for some background: https://developer.apple.com/videos/play/wwdc2015/233/
Apps can control the max number Metal of drawables CAMetalLayer.maximumDrawableCount. Setting this to 2 will force double buffering (3 is the default). Be aware that this makes it more likely -[CAMetalLayer nextDrawable] (or MTKView equivalents) will return nil, forcing you to drop a frame.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With