Hey guys. We have random spikes in our StreamVR game. I cant for the life of me find out why, it never occurs on the same spot in the scene so its not scene related it seems. Our scripts takes almost nothing so its not that Hardware: AMD 5950x Nvidia 3090 drivers: 526.98
The highlighted frames GPU seems to take up the most. Can be anything from drivers, to nvidia settings, etc If it's not noticable in-game I wouldn't worry too much about it
In the upper left you can enable the gpu profiler module - it might give you some more details on what's going on.
Looks broken? Says 14.080 ms is spent in Device.Present but if I expand that node the children says 0? Does this tell you anything?
What it's doing during that time period is blitting eye texture to the main window (the one that shows up on your 2d monitor), and presenting that. It's strange to me that that's stalling at all - it's like vsync is on.. the syncing should be coming from steamvr not d3d present. What render pipeline are you using? can you try to disable vsync somehow (should automatically be disabled when VR is on but maybe there is a bug)? can you repro this in an empty project?
Is your monitor refresh rate 120hz (looks ~8ms in above image)? another thing to try to confirm/disprove vsync suspicion is switch your monitor to 60hz and see if the device.present time grows.
My main monitor is a 144hz screen. And the valve Index runs in 90hz. The spikes magnitude is pretty much random. It doesn't seem to be tied to a fixed refresh rate. Edit: i will try to see if I can repro.
Here is a example of a less severe lag And here is another example of a more severe lag This is with 144hz display rate on main monitor. Will try to lower refrshrate now.
Same thing in an empty project with onlyxr and steamvr xr plugin edit: by mistake did this in 2021 LTS while our game for now uses 2020 LTS
The highest I'm seeing for Device.Present is 1.5ms , usually < .7ms on OpenXR plugin. I'll try with SteamVR plugin in a bit.
With steamVR I was able to reproduce high Device.Present times, like you're seeing (~27ms in my case). I used the superluminal profiler to see what's happening deeper in those cases - it turns out it's related to capturing the extra GPU profiler data (d3d timer queries) - steam VR adds a bunch of these so I think that's why it's looking worse on steamVR vs other runtimes. When the profiler isn't attached, superluminal capture looks good. Perhaps it's a red herring then?
Thanks for taking your time. Thing is if i just run the game without profiling i get these spikes to, i can both see them in. SteamVR frametime window in headset and I can observe the actual lag.
I recorded this little demo without profiling, though recording with OBS which skews the result a little bit. You can see both pink spikes (reprojection) and the smaller yellow spikes thats just a smal lag but still noticble. edit: Funny enough my benchmarking thats going on in the background (this is a precorded path) does not notice a big impact on the perf, though I do remove the top and min 1% frames from the result and those spikes are probably not in the statstics because of that With OBS: Highest Frametime: 2.7177 Lowest Frametime: 1.3324 Avg framerate: 1.832094 Without OBS: Highest Frametime: 2.6185 Lowest Frametime: 1.2623 Avg framerate: 1.75618 Though I must give you guys credit that GFX jobs finally does a difference, above is with gfx jobs and below without. A 10% increase in perf! Without OBS and without GFX jobs: Highest Frametime: 2.8731 Lowest Frametime: 1.3738 Avg framerate: 1.937669