monkeylashes
← Diablo II: Resurrected in VR

D2R PCVR 0.3.10: fixing a stall that hit every ten seconds

This is the first release that’s all about performance. I’m calling it phase 1 because there’s a lot more to do.

The stall came from my own diagnostics

Every ten seconds, the mod’s CPU diagnostics grabbed a snapshot of every thread on the system and sorted through it, inside Present, right as a frame was being handed off. On my PC that froze rendering for about 53 ms. At 90 Hz you only get 11 ms per frame, so you really notice it.

It’s easy to miss because it’s regular enough to look like the game, and it was coming from the same tool I was using to hunt for stalls.

The fix was to move that work onto its own thread. Now Present just asks for a report and picks it up when it’s ready. I ran three captures of 360 stereo frames each. The scans still take 58 to 63 ms, but they happen on their own thread now, and the stall is gone.

The first preview had the same kind of problem with its logging.

Smaller fixes

  • World draws were taking a lock on the HUD registry that they didn’t need. They skip it now.
  • Resource descriptions that never change are cached, with checks so a cached one can’t outlive the resource it describes.
  • The logs now show time spent waiting on the headset runtime separately from time spent drawing each eye. That’s the first thing I need to know for almost any performance problem.

100% resolution by default

New installs now set the game’s resolution scale to 100%, with FXAA on, DLSS off and medium shadows. A repair keeps your existing settings, so if an older install is at 80% it’ll stay there until you change it in the game’s video options.

What’s still slow

The game still gets drawn twice for every frame, once for each eye, and each of those is a full pass of the engine. That’s the expensive part, and fixing it is a much bigger job.

On my PC (Ryzen 9 5950X, RTX 5090, Steam Frame at 90 Hz), a minute of walking and turning held about 45 fps. That was with an optional GPU-overlap setting turned on, which is off by default.

So this update removes one stall and trims some overhead. It doesn’t make the game faster across the board, and it doesn’t fix the RTX 5080 performance report, which is still open.