SteamVR Developer Hardware

SteamVR Developer Hardware

18 ms latency on SteamVR_Render.RenderLoop()[Coroutine: MoveNext]
This spike happens even in an empty scene in an empty project, and causes a visible frame drop every time.

Here is a screenshot of the profiler:
http://imgur.com/tm2bNde

the dark green spike that happens later on is Gfx.WaitForPresent

Tried reimporting SteamVR, restarting the whole system, reimporting project.

Anyone know whats going on here?
Im in Unity 5.2.2f1
Windows 10

Also vrmonitor is telling me to update the firmware on my controllers, not sure if that could be part of it as well.
< >
1-11 van 11 reacties weergegeven
aaron.leiby  [ontwikkelaar] 4 nov 2015 om 14:38 
You can click the "Deep Profile" button, which will recompile your scripts and give you some more details to dig further. That render loop function is where all the rendering happens for the left and right eyes, and is also where the app waits for running start so it doesn't ever get ahead.

Gfx.WaitForPresent is the game window (a.k.a. companion window) waiting for vsync on your main monitor, which likely runs at 60hz. You don't want Unity applying vsync to its game window. The SteamVR plugin should be disabling this for you automatically in SteamVR_Render.Update, but it's possible that something else is re-enabling it later?

aaron.leiby  [ontwikkelaar] 4 nov 2015 om 14:41 
I responded before looking at your profile screenshot.

My guess those hitches are coming from the gpu running over budget and WaitGetPoses blocking until the start of the next frame. Maybe bring up SteamVR's Frame Timing and see if there is a corresponding spike there.

https://developer.valvesoftware.com/wiki/SteamVR/Frame_Timing
OK Here is Frame Timing and profiler running together.
http://imgur.com/xKNyfD8
http://imgur.com/baUQDUD

Looks like the spikes sometimes correspond on the gpu, but consistently corresponds with cpu. In raw mode it shows spikes on cpu Application and cpu Frame, with downward spikes on cpu Prediction.
Laatst bewerkt door Aaron; 5 nov 2015 om 9:04
aaron.leiby  [ontwikkelaar] 5 nov 2015 om 11:48 
I wonder if maybe those hitches are from garbage collection.

If you want to capture a gpuview trace and send it my way, I can take a deeper look to see if I can spot what's going on.

https://developer.valvesoftware.com/wiki/SteamVR/Installing_GPUView

Was this issue resolved? Still happening on unity 5.3 with an empty scene. And it is getting worse, when a Scene is full of objects.
FYI: I did some more profiling with an empty scene (save for the SteamVR Camera Rig and a plane) and activated "deep profile". It showed that calls to Texture.GetNativeTexturePtr() seem to be the culprit. The unity manual has this to say on the matter: "Note that calling this function when using multi-threaded rendering will synchronize with the rendering thread (a slow operation), so best practice is to set up needed texture pointers only at initialization time." (Source: http://docs.unity3d.com/ScriptReference/Texture.GetNativeTexturePtr.html) I wonder if this is related?
Been seeing this also and figured I should pipe up to show this is not an isolated case.
aaron.leiby  [ontwikkelaar] 23 mei 2016 om 18:25 
Yes, we use GetNativeTexturePtr to synchronize Unity's main thread with the render thread. All the relevant work happens on the render thread - specifically WaitGetPoses, which synchronizes with the headset vsync. If you feed too much gpu work for a given frame, it'll miss vsync and wait until the next. This ensures your predicted poses are not too old.

Here's the relevant bit from SteamVR_Render.cs:
// Hack to flush render event that was queued in Update (this ensures WaitGetPoses has returned before we grab the new values). SteamVR.Unity.EventWriteString("[UnityMain] GetNativeTexturePtr - Begin"); SteamVR_Camera.GetSceneTexture(cameras[0].GetComponent<Camera>().hdr).GetNativeTexturePtr(); SteamVR.Unity.EventWriteString("[UnityMain] GetNativeTexturePtr - End");
https://github.com/ValveSoftware/openvr/blob/master/unity_package/Assets/SteamVR/Scripts/SteamVR_Render.cs
Laatst bewerkt door aaron.leiby; 23 mei 2016 om 18:25
aaron.leiby  [ontwikkelaar] 23 mei 2016 om 18:26 
Also, you may want to give the native integration in Unity 5.4 beta a try (the above only applies in the earlier versions that did everything in script).
Laatst bewerkt door aaron.leiby; 23 mei 2016 om 18:27
Seeing this as well with latest plugin and 5.3.4p5. If I turn off everything in my scene it still occurs. If I use the sample scene (sea of cubes), still occurs. GTX 980 Ti, NVIDIA Driver 368.22, Windows 10.
Also seeing this. Any resolution as I'm unable to use 5.4 beta due to OpenVR using an off center asymmetric projection matrix and breaking required image effect.
< >
1-11 van 11 reacties weergegeven
Per pagina: 1530 50

Geplaatst op: 4 nov 2015 om 10:39
Aantal berichten: 11