cancel
Showing results for 
Search instead for 
Did you mean: 

VR.WaitForGPU killing performance in Unity3D. Very difficult to profile other issues. Video Example

RaveTZ
Level 3
Here is a video showing what the issue is
https://youtu.be/n5ngEzZSKH0

I'm trying to release an update to Vanguard V but perforance has become a real issue.  The game runs at 150fps on my laptop but the framerate tanks when I touch the Oculus headset.  I get these nasty yellow spikes and the FPS tanks to the 50s, even on my desktop (980 GTX TI).  I then created a new scene with nothing but a camera and the default Directional Light.  The framerate goes into the 800s until I touch the headset.  It then tanks again to 90-100fps.  This is an empty scene.

Now, if this is by "design" it has made it very difficult to isolate any real issues in the profiler.  Any help would be great.

Unity 5.5.1f1 and observed in Unity 5.5.2 as well
Windows 10 x64




11 REPLIES 11

RaveTZ
Level 3
I believe this is caused by Asynchronous Space Warp locking the framerate to 45 if it dips below 90.  This is problematic because ASW stays on for a duration and causes the game to slow down for a notable period.  Is there any way to disable ASW?  This all or nothing approach is not working well for us.



delphinius81
Level 8
VR.WaitForGPU basically means that your frames are taking too long to render. To maintain 90fps, you need to be < or about equal to 11.1 ms per frame (1000ms/s / 90 frames/s = 11.11111). Both your CPU and GPU values are above that. So VR.WaitForGPU is not killing performance - that function is actually the CPU saying that it needs to wait some amount of time for rendering to finish before it can send new data to the GPU. If you want to address this, you need to look at how much you are trying to render each frame and reduce/optimize where possible. 

RaveTZ
Level 3


VR.WaitForGPU basically means that your frames are taking too long to render. To maintain 90fps, you need to be < or about equal to 12ms per frame (1000ms/s / 90 frames/s = 11.11111). Both your CPU and GPU values are above that. So VR.WaitForGPU is not killing performance - that function is actually the CPU saying that it needs to wait some amount of time for rendering to finish before it can send new data to the GPU. If you want to address this, you need to look at how much you are trying to render each frame and reduce/optimize where possible. 


Then why is it still there in an empty scene with nothing to render at all?

RaveTZ
Level 3
Here is a video of the title in action with the issue at hand
https://youtu.be/wMvn_KTPfb8

delphinius81
Level 8
When the headset is active, frame-rate is being locked/synched to 90fps, even if your cpu/gpu could push further. It's a similar principle to having v-sync enabled on a monitor.

RaveTZ
Level 3


When the headset is active, frame-rate is being locked/synched to 90fps, even if your cpu/gpu could push further. It's a similar principle to having v-sync enabled on a monitor.


And there is the problem.  ASW is locking it to 45 for a duration every time it has a slight dip below 90.

bali33
Level 2
Hi guys,

I'm experiencing the same issue here. I have a scene in which nothing is happening, the FPS is something like 160 FPS. As soons as I wear the Oculus headset the FPS drop to 45 FPS. Nothing has changed in the scene, no events have been triggered, no animations have been played, nothing. Just wearing the Oculus headset make the FPS drop.

Any idea why ?

Thanks

blackant
Level 4
same problem for me, this is locking me the possibility to pass check test on the store.
any answer is welcome !

Florian_Brink
Level 3

RaveTZ said:

Then why is it still there in an empty scene with nothing to render at all?

And why are builds so much faster as well (~40% increase) ?
 
Same problem here with a Vive/Unity 2017.2.
Fixing that issue would make my daily routine much much more enjoyable...