Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
CodingJar's avatar
CodingJar
Protege
10 years ago

5.3.0f4 Profiling - Slow - OculusWaitForGPU

Hello!

I'm new to Gear VR development and we're trying to push our game out before Christmas so all the boys and girls have more fun games to play when they unwrap their presents. However, we want the game to be really high quality and that means hitting 60fps at all times. What I'm noticing is that we're constantly hitting 30fps, not 60fps according to the Unity 5.3.0f4 profiler. Digging into the issue reveals that it's waiting for OculusWaitForGPU.

Now before you jump the gun and say "that's your rendering performance!" That was also what I first looked at, but no matter what I do, I can't seem to get it back to 60fps. Here's a screenshot of what I'm seeing before I start explaining what I've gone through:

Profiler.jpg

Now most other posts say it's because you're rendering too much and waiting for the GPU thread to finish before continuing, but the wait time is above 19ms, with a whole frame being 16.6ms that means we've waited an entire frame! So am I rendering too much? Well, if I look at the GPU chart (just below the CPU one) it appears my Camera.Render time is 0.5ms! Here is the picture to show I'm not making this up:

GPU.jpg

Now this is with all of the 'optimizations' as suggested by Oculus (multithreaded rendering, GPU Skinning, static and dynamic batching, etc.) I've also tried IL2CPP and .NET, no difference.

Now I'm a pretty experienced Unity dev (5+ years, shipped titles, etc.) so I'm aware that not all of those optimizations apply to every game... and my hunch was that the multi-threaded rendering with profiling is enforcing a frame lock-step, killing the performance. So I tried disabled multi-threaded rendering (and dynamic batching, since that sometimes can hurt performance if you're drawing large meshes). The results are fairly different:

Single-Threaded.jpg

This seems to indicate it's the submission of the geometry/draw calls rather than the rendering that is slowing the application down, and this time the OculusWaitForGPU is never over 16.6ms. Is this the correct interpretation? Why am I not seeing the geo/draw submission time in multi-threaded rendering? Isn't multi-threaded rendering supposed to help with this by overlapping the update/submission with rendering, and how come I can't see the advantage?

And the big question: How do I get my performance back up to 60fps. If those GPU times are correct, it seems like it's spending almost no time rendering, but all of its time getting ready to render?

Thanks!

11 Replies

Replies have been turned off for this discussion