mirror of
https://github.com/gamingwithhomie/larp.git
synced 2026-12-06 15:48:53 +00:00
* Allow retaining warmed graphics pipelines in memory (cherry picked from commit 6d3919be27cb679b7eeaec3c5c07e06eb49da122) * Warn when resident pipelines have low Windows commit headroom * Pass the Windows commit query size explicitly
19 KiB
19 KiB
CLI Commands & Environment Variables Reference
1. CLI Subcommands (larp.exe)
| Command | Description |
|---|---|
larp.exe run "<game_exe>" --execute [--console series-x|series-s] [--stream-budget <MB>] |
Runs the title (normally invoked via series-s.cmd / series-x.cmd). |
larp.exe nv-profile |
Shows the current NVIDIA driver shader heap (0x001ABC0F) setting for larp.exe (no Admin needed). |
larp.exe nv-profile --mb 2048 (or 1024) |
Creates/updates the "Larp (shader heap)" NVIDIA driver profile (run from Administrator PowerShell/CMD). |
larp.exe nv-profile --remove |
Removes the "Larp (shader heap)" NVIDIA profile (requires Administrator). |
larp.exe zip-logs |
Bundles logs/*.log, options.ini, controls.ini, crashes.log, and settings.ini into Larp\logs\larp-logs-<timestamp>.zip with your Windows username stripped out. |
larp.exe config |
Displays active LARP_GAME_DIR, LARP_CACHE_DIR, and LARP_DATA_DIR paths. |
2. Environment Variables (LARP_*)
Set these in Larp\bin\launch.ps1 (or in your shell before running larp.exe run):
Input, Mouse & DualSense
| Variable | Values | Default | Description |
|---|---|---|---|
LARP_CONTROLS |
auto, mnk, pad |
auto |
mnk forces PC Mouse & Keyboard mode; pad disables Raw Input mouse capture; auto uses KB+M until a gamepad is used. |
LARP_MOUSE_SENS |
float (e.g. 1.0, 1.5) |
1.0 |
Mouse look sensitivity multiplier (can also be set in controls.ini). |
LARP_MOUSE_INVERT_Y |
0, 1 |
0 |
Inverts vertical mouse look when 1. |
LARP_WHEEL_SCROLL_INVERT |
0, 1 |
0 |
Inverts scroll-wheel weapon/radio cycling direction. |
LARP_VEHICLE_AUTO_CENTER |
0, 1 |
1 |
Set 0 to keep the vehicle camera where you left it (no auto-center; build 1.0.2.1). Also vehicle_auto_center in controls.ini. |
LARP_KEYBOARD_DRIVING |
0, 1 |
0 |
Set 1 for keyboard driving: at the wheel W / S are gas / brake, Shift / Ctrl lean, right / left mouse buttons are LB / RB (build 1.0.2.1). Also keyboard_driving in controls.ini. |
LARP_PROMPTS |
auto, playstation, keys, xbox |
auto |
In-game button icon style, chosen once at start. auto = key caps with LARP_CONTROLS=mnk or when no controller is connected, PlayStation symbols if a DualSense/DS4 is connected, otherwise Xbox; keys = PC keyboard key caps. |
LARP_DS_TRIGGERS |
0, 1 |
0 (1 in launch.ps1) |
Enables DualSense adaptive triggers over USB & Bluetooth. |
LARP_DS_TRIGGER_RUMBLE |
0, 1 |
0 |
Mirrors controller rumble onto DualSense triggers. |
LARP_DS_LIGHTBAR |
RRGGBB hex or off |
blue | Custom DualSense LED lightbar color (e.g. FF0080) or off. |
Display, HDR, Upscaling & Frame Generation
| Variable | Values | Default | Description |
|---|---|---|---|
LARP_RESOLUTION |
<WxH> |
title default | Selects the output at startup. On retail build 1.0.2.1, 3440x1440 and 5120x1440 enable native ultrawide output. LARP_NATIVE_OUTPUT and LARP_NATIVE_SIZE take precedence, in that order. |
LARP_DISPLAY_MODE |
windowed, borderless, fullscreen |
windowed |
Automatically enters Borderless or Exclusive Fullscreen at startup. |
LARP_DISPLAY_REFRESH |
<Hz> (24..500) |
desktop | Target refresh rate when LARP_DISPLAY_MODE=fullscreen. |
LARP_DARK_TITLE |
auto, 1, 0 |
auto |
Applies Windows 10/11 dark title bar (auto follows system theme). |
LARP_SKIP_INTRO |
0, 1 |
0 |
Skips the intro movie at start (the 3840x2160, 450-frame first movie), straight to the menu. No later movie is skipped. |
LARP_SKIP_BINK |
0, 1, all |
0 |
Skips Bink movies: 1 those that play once (logos, intros), all the looping ones too (menu backgrounds, which then stay dark). Movies looked up by GetProcAddress are not wrapped. |
LARP_EXPOSURE |
-2.0 .. +2.0 |
0.0 |
Live brightness offset in EV (also adjustable live in the F10 menu). |
LARP_HDR |
0, 1 |
0 |
Enables native HDR10 (DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020) when Windows HDR is on. |
LARP_HDR_MAX_NITS |
200..10000 |
EDID | Overrides display peak luminance reported to the title in HDR10 mode. |
LARP_HDR_PAPER_WHITE |
80..500 |
150 |
SDR HUD / UI brightness in nits when LARP_HDR=1. |
LARP_MFG_UNLOCKER |
0, 1 |
0 |
Loads winmm.dll from mfg\ before D3D12/NGX init to unlock DLSS Frame Gen on RTX 30-series GPUs (also the F10 Start → MFG Unlocker row). The unlocker only works through NVIDIA Streamline: with LARP_FG_BACKEND unset, the streamline backend is picked automatically when sl.interposer.dll, sl.common.dll, sl.dlss_g.dll, sl.reflex.dll and sl.pcl.dll are found (see LARP_STREAMLINE_DIR) and the unlocker's winmm.dll is found. Otherwise the backend stays as it is and one warning in the log names the missing file and the folders searched. |
LARP_DLSS_LOG |
0, 1 |
0 |
For 1, include NVIDIA NGX library log messages in play.log at info level (also works in ordinary release builds). |
LARP_MFG_UNLOCKER_DLL |
<path> |
unset | Explicit path to MFGUnlocker winmm.dll. |
LARP_CVV |
0, 1, off, on |
0 (off) |
Opt-in NVIDIA NVAPI CPU-Visible VRAM (CVV) for NVIDIA GPUs with Resizable BAR / expanded BAR1 (> 256 MiB) when D3D12 GPU_UPLOAD is unavailable (e.g. RTX 20 Turing or Windows 10 / pre-24H2 RTX 30/40/50; also toggleable in F10 -> nvapi_cvv, applies on next start). |
LARP_FRAME_GENERATOR |
dlss, fsr, mvfg, ditto (or 1..4, in that order) |
unset: DLSS where it can generate, else FSR | What generates the frames between the title's (also the F10 Frame generator row; the variable wins over it): NVIDIA DLSS frame generation, AMD FSR's, MVFG (the layer's own, any card) or DittoSR's. A generator named here is not replaced when it fails: frame generation then stays off for the run. |
LARP_FG_HUDLESS |
0, off, false, no to disable |
on | Frame generation excludes the title's interface (DLSS-G HUDLess / FSR HUDLessColor) by capturing the frame before the UI composite. Set to 0 only if that capture misbehaves; frame generation then works as before it existed. |
LARP_FG_PACE_MADE |
0 to disable |
on | Frame generation paces the shown frames from when the GPU has made the first generated one, not from the title's present. Before, the generated frame reached the screen a generation's GPU time late while the title's own frame kept its slot, so the gaps alternated short and long (judder at an even frame count). 0 restores the old timing. |
LARP_FG_BACKEND |
ngx, streamline |
ngx |
Backend of DLSS frame generation. ngx is larp's own path (Windows and Wine alike). streamline is opt-in: NVIDIA Streamline (sl.interposer.dll + sl.dlss_g/sl.reflex/sl.pcl/sl.common, nvngx_dlssg.dll) is loaded before the device, the direct queue and swap chain are made through its proxies, and DLSS-G generates and paces frames at each present; Reflex then goes through Streamline. Without it, nothing of Streamline is loaded (except when it is picked for LARP_MFG_UNLOCKER, see there; setting this variable, to ngx too, always wins over that pick). Anything missing: a warning and the plain present. |
LARP_STREAMLINE_DIR |
<path> |
first holding sl.interposer.dll of <exe>\streamline, <exe>\dlss, LARP_DLSS_PATH |
Streamline's folder (LARP_FG_BACKEND=streamline, or the automatic pick for LARP_MFG_UNLOCKER). |
LARP_STREAMLINE_VERIFY |
0 to skip |
on | Authenticode signature check of sl.interposer.dll before it is loaded (Streamline backend only). |
LARP_STREAMLINE_LOG |
<folder> |
unset | Streamline's own verbose log in that folder (Streamline backend only). |
LARP_SL_BUFFERS |
2..8 |
4 |
Back buffers of the swap chain while Streamline owns it (Streamline backend only). |
LARP_DLSS_PATH |
<folder> |
unset (the launchers set bin\dlss) |
The model folder: where NGX looks for DLSS's models (nvngx_dlss.dll, and nvngx_dlssg.dll for DLSS frame generation) after larp.exe's own folder. Also one of the folders Streamline is looked for in (LARP_STREAMLINE_DIR). |
LARP_REFLEX_SLEEP |
0, off, false, no to disable |
1 (on) |
Controls whether reflex::tick_begin() calls the driver's pre-tick Reflex CPU sleep. Setting 0 skips only the pre-tick sleep while keeping Streamline Reflex and PCL frame markers active for DLSS Frame Generation. Not a free throughput switch: skipping the pre-tick sleep can keep ~1 additional frame queued on the host, trading input-to-photon latency for copy/graphics queue overlap (observed under Linux Proton / vkd3d-proton; native Windows untested). |
LARP_DITTOSR_PATH |
<folder> |
dittosr\ beside larp.exe |
Folder holding DittoSR's amd_fidelityfx_dx12.dll (and its dittosr.ini): the upscaler dittosr and the frame generator ditto in the F10 menu. DittoSR's frame generation is given the frame without the interface and the interface is put back over its frames unmoved (off with LARP_FG_HUDLESS=0). |
LARP_MOUSE_CAMERA |
direct, 1, native |
unset (right stick) | Opt-in direct 1:1 mouse camera (no stick deadzone/smoothing) ported from Darner; LARP_MOUSE_CAMERA_SENS sets radians per mouse count (default 0.0015). |
LARP_MAP_MOUSE |
0 to disable |
on (mouse & keyboard) | Mouse on the world map: click = waypoint, drag = pan, wheel = zoom, right click = back. |
LARP_FIRST_PERSON |
0, 1 |
0 |
The title's own first-person view (also the F10 first_person row and F7 in game). Game build 1.0.2.1 only. |
Mods, AMD Workarounds, Performance & Diagnostics
| Variable | Values | Default | Description |
|---|---|---|---|
LARP_NO_MODS |
0, 1 |
0 |
Skips loading .dll/.asi files from mods\ when 1. |
LARP_HOST_NAME |
<file name> (e.g. host.exe) |
unset | From the start of run --execute until the mods are loaded (a winmm.dll proxy beside larp.exe, MFG Unlocker, mods\; a library loaded early, such as NVIDIA's, can pull the proxy in on its own), the process' main module goes by this file name, in the same folder, for mods that only start in a host program they know (GetModuleFileNameW(NULL) in their DllMain). Put back right after, so larp's own path is unchanged. winmm.dll is delay-loaded, so a proxy beside larp.exe is loaded by full path at that point instead of at process start; the log and the run summary name the winmm.dll in use. |
LARP_AGILITY |
0 |
unset (Agility SDK 1.620 from bin\D3D12\) |
0 runs on Windows' own D3D12 runtime instead of the bundled Agility SDK; buffer views then fall back to by-element. Without a bin\D3D12\D3D12Core.dll, or with one of another version, larp also asks Windows for that runtime or version. For bisecting 0x887A0005. |
LARP_TRAINER |
0, 1 |
0 |
Maps Z-ROX shared controller-hold page at 0x5A52_4F58_0000. |
LARP_AMD_GLASS_PREPASS |
0, 1 |
0 |
Keeps breakable-glass shader cad3ecfdcdcf2a7d on AMD GPUs when 1 (skipped by default on AMD to prevent amdxc64 crash). |
LARP_LEAVE_OUT |
<hash1>,<hash2> |
unset | Comma-separated 16-hex-char shader hashes whose pipelines should be skipped. |
LARP_PRELOAD_THREADS |
low, medium, high, max, <1..32> |
by processors and memory | Worker thread count for background shader/pipeline compilation. Unset: 75% of the logical processors (2 to 24), and one per logical processor while the game is held at its menu for the first compilation; both capped by installed memory (4 workers up to 16 GB, 6 up to 24 GB, 12 up to 32 GB, 16 up to 64 GB, 24 above). A value here sets one count for both. Each worker adds about 0.5 GB to larp.exe while compiling. |
LARP_PIPELINE_HOLD_PRIORITY |
below, normal |
below |
Priority of the compilation workers while the game is held at its menu. normal competes with everything else running on the PC for the whole first compilation, for a gain of about 3% in the one measured pair of runs; after the hold the workers are always below normal. |
LARP_PRELOAD |
0, 1 |
0 |
Pipeline preload run: makes the pipelines earlier runs listed, saves the list and blobs, then exits before any input, so the next start's menu hold is short. LARP_PRELOAD_FLUSH_S (default 120) is the longest wait for the blob writer before exiting; the run leaves as soon as every blob is written. |
LARP_WORKER_STACK_MB |
0, <1..1024> |
64 under Wine, Rust default elsewhere |
Stack size of the pipeline worker threads. Under Wine, vkd3d-proton's DXIL to SPIR-V translation can recurse past the 2 MiB default. Reserved, not committed. 0 = Rust default (2 MiB). |
LARP_GUARD_HOT |
<ms>, 0 |
20 under Wine, 0 elsewhere |
A guarded memory block the title writes again within this time of its guarding stays unguarded that long and is re-copied at each refresh instead. Fewer write faults and protection changes, which are far more costly under Wine. 0 = off. |
LARP_WINE_NO_SPARSE |
0, 1 |
1 under Wine, 0 elsewhere |
No reserved (tiled) buffers: ray tracing structure memory, the positions pool and streamed geometry buffers are made whole. Works around an NVIDIA driver GPU VA mapping failure under Proton + vkd3d-proton (intermapRegisterDmaMapping: Failed to insert new mapping node) that took the whole PC down. 0 = keep reserved buffers. |
LARP_PIPELINE_CACHE_DIR |
<folder> |
unset (pipelines\ under LARP_CACHE_DIR) |
Folder for the compiled pipeline cache only (blobs-windows-v1-*, created-pipelines.bin, created-shaders.bin, quad-pipelines.txt), e.g. on another drive; everything else stays under LARP_CACHE_DIR. Created if missing. Also pipeline_cache_dir = <folder> in data\<title id>\settings.ini; the variable wins over the file. A folder that cannot be created (or is inside the larp source tree) is reported with one warning and the default is used. Moving the folder does not move existing files: copy them, or the pipelines are compiled again. |
LARP_PIPELINE_BLOBS |
0, 1 |
1 |
0 keeps no compiled pipelines on disk (pipelines\blobs-*) and loads none from there: every pipeline is compiled anew each run, while the lists of earlier runs' pipelines are kept. A workaround for corruption from cached blobs under Wine with Mesa RADV (#732). |
LARP_PIPELINE_WAIT_MS |
<ms> (e.g. 8) |
0 (off) |
Opt-in per-frame wait budget (ms) for non-lasting graphics pipelines to eliminate shader-compilation hitches while driving. |
LARP_KEEP_GRAPHICS_PIPELINES |
0, 1 |
0 (off) |
Keeps warmed graphics pipelines in system RAM to reduce first-use hitches. Enable only with 64 GB or more of installed system RAM and sufficient Windows commit headroom. The page file and memory committed by other processes affect that headroom. The log reports current commit and the limit at startup, warns below 64 GiB of startup headroom, and checks every 30 seconds for headroom below 8 GiB during play. Set keep_graphics_pipelines = on under [layer] in data\<title id>\settings.ini for a persistent setting. The environment variable takes precedence when set. Restart to apply. |
LARP_LANGUAGE |
auto, en, de, fr, es, pl, pt-BR, tr, zh-CN, zh-TW |
auto (OS UI) |
UI/overlay/CLI language (also switchable live in the F10 menu or via --lang). |
LARP_DSTORAGE_WORKERS |
<1..64> |
logical cores | Worker thread count for DirectStorage decompression. |
LARP_DSTORAGE_STAGING_MB |
<16..512> |
32 |
DirectStorage staging buffer size in MiB for fast NVMe drives. |
LARP_STACKS_AT_KILL |
0, 1 |
0 |
1 prints every thread's stack when the title's 30 s watchdog kills the run (write to address 0, +0x23cf683), to name what the frame loop was stuck in. |
LARP_TITLE_WATCHDOG |
0 |
unset (left alone) | 0 tells the title's 30 s watchdog to quit (1.0.2.1 only), so a long stall is not ended as a crash at +0x23cf683. A real hang then stays a hang. |
LARP_MEMORY_ORPHANS |
0, 1 |
0 |
Experimental (#468): releases the host copies of buffers the game has freed that only the address table of memory-reading shaders still holds, once idle for 8 frames, instead of keeping them until all 1,023 numbers are in use. Not yet checked in play; the memory: lines in the log (once a minute) show what it lets go. |
LARP_NO_ADVISOR |
0, 1 |
0 |
Silences startup NVIDIA shader heap and XMP/EXPO RAM speed warnings. |
LARP_D3D12_DEBUG |
0, 1 |
0 |
Enables the Windows D3D12 debug layer (requires Graphics Tools optional feature). |
LARP_D3D12_DRED |
set / unset | unset | Device-removed data: on a device removal the log names the command each list stopped at and the faulting GPU address. Small CPU cost. |
LARP_BYTE_VIEWS |
0 |
unset (on where supported) | 0 makes every buffer view by element instead of ID3D12Device15::TryCreateShaderResourceView byte-offset views. For bisecting 0x887A0005. |
LARP_SHADER_REPLACE |
<folder>, 0 |
bin\shader-replace |
Folder of replacement shaders; 0 runs every shader as translated (no folder needed). For bisecting 0x887A0005. |
LARP_OWNERLESS_VIEWS |
<n>, 0 |
1048576 |
How many view-table entries with no resource to free them are kept. A placed view that no longer fits a shape record becomes one, and nothing else frees it: about 15,000 a second once the shapes are full, 16.7 GB after 70 minutes, and the frame time doubles. 0 keeps them all, as before. The oldest past the cap are dropped. A slot still naming a dropped entry reads as no view until the title writes that slot again. |
LARP_KEPT_MIPS_MB |
<MiB> |
unset (as much as the card's budget leaves) | The most memory of the card the store of kept texture mip levels may hold. Unset, kept levels are only dropped when the texture heaps have less free space than the budget asks for, and that free space counts holes a texture may not fit (#889: growth to the ceiling on 8-12 GB cards). 512 is a reasonable value to try on such a card; too low and textures are read again when an area is revisited. |
LARP_FAST_HEAP_TABLES |
0/off to disable (takes effect on restart) |
on | Fast-path (list.id(), heaps) cache check in draw::State::heap_buffers and view_shifts. |
LARP_OPT_COPY_BATCH |
0/off to disable (takes effect on restart) |
on | Unifies disjoint pieces_send + small_send + heapfeed copies into one copy_send, sorts/coalesces contiguous copies, and orders overlapping runs on one ID3D12GraphicsCommandList7 with a COPY_DEST global enhanced barrier. |
LARP_OPT_VIEW_MIRROR |
0/off to disable (takes effect on restart) |
on | Skips redundant null_for D3D12 calls via per-slot null_kind, shadows strides to avoid no-op WC GPU memory flushes, and uses a lock-free is_buffer bitset in HostHeap::note_buffer (on top of 64-stripe HostHeap::made). |
LARP_OPT_LIST_REUSE |
0/off to disable (takes effect on restart) |
on | Skips redundant HostList::clear() in HostList::reset() on already-released lists, guards empty own_back(), and batches SPARE_STATES/IDLE locks in list::recycle(). |
LARP_OPT_RELEASE_HELD |
0/off to disable (takes effect on restart) |
on | Skips contending on RELEASING during speculative queue::release_held calls (try_lock + RECHECK handoff), and drops completed release-only COM uploads/shadows on a bounded low-priority larp-reaper thread. |
LARP_AUDIO_LOCK |
1 to enable, 0/off to disable |
off | Locks APU heap pages (XMA input and rings) in the process's working set, up to 1 GiB, so a long session that has paged most of larp's committed memory out does not make a burst of new voices wait on those pages and miss the mixer's deadline. |