This is an example where everything is complete well before vsync and yet everything just decides to wait for another 8ms. The encoder and the GPU work is completing on the verge of 8 ms. This happens regularly.
In the examples given, the encoder is running and the frame starts / ends when the command buffer is committed, but if you have the vsync enabled but the sync is to get the drawable, then the encoder has to eat up GPU time to be done by the next vsync.
If I go to three drawables to "fix" this timing issue, then it holds back a frame rather than going as early as possible.
I am currently call presentDrawableAfterMinimumDuration with a 4ms duration to try and trick it to release early, but it doesn't seem to make much of a difference
Topic:
Graphics & Games
SubTopic:
Metal
Tags: