Open kvark opened 5 years ago
These all sounds pretty reasonable, and I can't think of anything else it would be off the top of my head. CAMetalLayer
has always been tuned for mobile, "no wasted frames" situations (last time I looked at the internals it interacted with CVDisplayLink
even when you turn vsync off), so it being responsible via 1/2 wouldn't surprise me at all.
Short info header:
I happen to benchmark gfx-portability a lot on macOS. This involves running the same scenario over and over many times under different conditions, like changing the command recording policy, or switching the game settings. For the most part, the runs are consistent to each other, however in some rare cases, I observed unusually high frame rates over considerable time spans.
This happened on different GPUs for different versions of gfx-portability and even for MoltenVK, so it is likely related to macOS itself.
For example, a game may show 75 fps regularly, but then something kicks in, and I see 100+ fps rock solid for 1-10 seconds. Eventually the performance goes back to normal. I'm very curious on what those spikes could be, and if we can make it so we spike 100% of the time :) My wild guesses:
CAMetalLayer
part responsible for display synchronization (or the window server):cc @mstange @JohnColanduoni