GFX.WaitForPresent (yes, another one...)

Hey All,

So I’ve been pouring over the forums to try and understand what potentially ‘Gfx.WaitForPresent’ actually means / represents, and I’m still not entirely clear. See the screenshot below:


This is taken from a Samsung S6 ADB connection to profiler (ie build and run). Project has VSync set to off.

As you can see, the gpu is doing very little (find it hard to believe that it’s actually that fast), but the cpu has varying degrees of ‘Gfx.waitforpresent’ going on. It does however correlate with when there’s a lot going on on screen : the more characters there are, the higher the GFx.waitforpresent and the lower the framerate. What I want to know is what’s hidden inside this ‘black box’? Is this just a limitation of a the profiler? Are there any explanations anywhere that don’t just say ‘it’s vsysnc’?

Many thanks for any help,

Jules

Man that’s a recurring problem

Ah ah

You should only see Gfx.WaitForPresent when you are using the threaded renderer.
It means that the main thread is waiting for the render thread to finish the previous frame (in terms of API calls, not synchronizing with the GPU).
So you are either CPU limited on the render thread (too many or too expensive or stalling API calls, not likely) or some API call (typically SwapBuffers or Clear) is blocked by the driver because the GPU is the bottleneck (more likely).

Ok, so I did a standalone Linux built using Unity 5.6.0b10 and also see Gfx.WaitForPresent. Note: I don’t have a GPU. See attached profiler. Any ideas as to what I should/can do about it?

Ahhh. Thanks for that info.