Skip to content

OptiLord v0.4.0 — CPU Contention & Frame Pacing

Pre-release
Pre-release

Choose a tag to compare

@Technoidvr Technoidvr released this 26 Nov 17:37
· 4 commits to main since this release

OptiLord v0.4.0 — CPU Contention & Frame Pacing

OptiLord is an independently versioned community performance fork (v0.1.0 → v0.2.0 → v0.3.0 → v0.4.0) maintained by TechnoidVR for Call of Duty: Modern Warfare 2 Campaign Remastered VR, built on Overlord VR Beta 8.

Huge thanks to Aeka0, original creator of Overlord VR, for the foundational VR mod.

SteamVR compatibility note: To keep existing SteamVR profiles, manifests, and bindings working seamlessly, the executable remains named overlord.exe (application_key: "overlord", overlord.vrmanifest).


What's New in v0.4.0

Guided directly by real vr_debugWaitTiming telemetry captures (mapname="arcadia", Meta Quest 3 via VirtualDesktopXR, Ryzen 7 5700X, Radeon RX 9070), this release eliminates critical CPU mutex contention and thread-scheduling stalls on the VR render/present pipeline while keeping everything from v0.3.0 (vr_renderScale, FidelityFX CAS, OpenXR Hidden Area Mesh), v0.2.0 (dense-scene CPU hot-path fixes), and v0.1.0 (streaming anti-stutter & Phases 1–4):

1. Lock-Free Runtime State & Capture Polling

  • src/client/component/vr/runtime_backend.cpp, openxr_runtime.cpp, openvr_runtime.cpp:
    • Added lock-free desired_enabled_atomic_ and applied_enabled_atomic_ mirrors (synchronized across every state transition and publish_status_locked()) so requested_enabled() and applied_enabled() execute via pure std::memory_order_acquire atomic loads with zero mutex locks.
    • Removed redundant runtime_backend facade/dispatch mutex_ locks on requested_enabled(), applied_enabled(), and poll_capture() (preserving choice_.valid guards).
    • Impact: Eliminates the measured 1.0–4.5 ms (up to 87.5 ms max) CPU stalls where H2's Frontend/Renderer thread (r_end_frame_stub) previously blocked behind xrWaitFrame holding mutex_ on the Present thread.

2. Critical VR Thread Priority Pinning

  • src/client/component/vr/vr_component.cpp:
    • Added boost_critical_vr_thread_priority(), setting THREAD_PRIORITY_ABOVE_NORMAL once per critical thread inside on_present_pre(...) (DXGI Present / D3D11 Backend / OpenXR thread) and on_renderer_frame(...) (H2 Frontend / Scene thread).
    • Reduces Windows scheduler preemption and cross-core jitter under heavy multi-core load.

3. Zero-Observer D3D11 Resource-Ops Fast-Path

  • src/client/component/vr/engine_stereo_resource_ops.cpp:
    • Added record_call_if_no_observers() across all 8 intercepted D3D11 resource stubs (CopySubresourceRegion, CopyResource, UpdateSubresource, CopyStructureCount, ClearUnorderedAccessViewUint, ClearUnorderedAccessViewFloat, GenerateMips, ResolveSubresource).
    • Skips _ReturnAddress() lookups, 80-byte event struct construction, and publish() overhead across 500,000+ D3D11 copy/update calls when active_observer_mask == 0 while keeping exact counters and observer semantics intact.

Quick Install Guide (5 Steps)

  1. Ensure you have a complete, legal installation of Call of Duty: Modern Warfare 2 Campaign Remastered (exit the game and close MSI Afterburner / RivaTuner).
  2. Download OptiLord-v0.4.0.7z below.
  3. Extract all files directly into your MW2CR root directory (beside MW2CR.exe), overwriting existing mod files (overlord.exe, openxr_loader.dll, overlord.vrmanifest, h2-mod/, steamvr/, vr_input/).
  4. Power on your VR headset and wake both controllers (OpenXR is recommended; OpenVR backup is available in VR Settings).
  5. Launch overlord.exe, disable risky settings (Shader Preloading, SSAA, shadow caches), keep debug probes off for normal play (VR Settings > Debug), and click Singleplayer.

Recommended Performance Settings (Wolverines! / Exodus)

Open VR Settings → Basics → Performance in the OptiLord Launcher:

  • Render scale (vr_renderScale): 100% (or 80%–90% if GPU-bound)
  • FidelityFX CAS sharpening (vr_sharpening): 35%–50%
  • Hidden area mesh (vr_hiddenAreaMesh): Enabled (default)

Archive Checksum (OptiLord-v0.4.0.7z)

  • Size: 45,212,978 bytes (125 files)
  • SHA-256: DA0166E0948A890CDDFF63FDF7FAB938810E09091EEC87531AFF728AFDF3CD54