From a1849fac28d0db89680e05cfb62612310af6134c Mon Sep 17 00:00:00 2001 From: trustno1-coder Date: Wed, 25 Nov 2026 15:44:30 -0800 Subject: [PATCH] scripts/play-nvidia.ps1: NVIDIA Series S launcher, Smooth Motion by default scripts\play-nvidia.ps1 -Exe : the fork's play set plus PIPELINE_WAIT_MS=10000, DYNAMIC_SLOTS=524288, RENDER_SCALE=0.5, OWN_UPSCALER=1, BVH_MISS=1, CARD_BUFFERS_MIN_MB=1, CARD_BUFFERS_MB=1536, COMPOSE=1, Series S. Starts a victory_sm.exe copy of the build so an NVIDIA App Smooth Motion profile for that exe applies (-NoSmoothMotion: victory.exe; -SeriesX: the Series X profile). --- scripts/play-nvidia.ps1 | 58 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 scripts/play-nvidia.ps1 diff --git a/scripts/play-nvidia.ps1 b/scripts/play-nvidia.ps1 new file mode 100644 index 0000000..2759108 --- /dev/null +++ b/scripts/play-nvidia.ps1 @@ -0,0 +1,58 @@ +# Starts the title on an NVIDIA card with the Series S settings measured on an RTX 5070 (about 20-22 fps, no device loss). +# scripts\play-nvidia.ps1 -Exe +# -NoSmoothMotion run target\\victory.exe itself. By default a copy named victory_sm.exe is started instead, +# so a Smooth Motion profile set for that exe in the NVIDIA App applies every time. +# -SeriesX the Series X profile instead (slower: about 7 fps at half scale) +# -Build target\diag (the default, the build all measurements are of) or target\release +# -More other settings: -More @{VICTORY_PANEL='1'} +# Run it from a normal window, not as administrator: the driver then keeps its shader cache elsewhere. +param( + [Parameter(Mandatory)][string]$Exe, + [switch]$NoSmoothMotion, + [switch]$SeriesX, + [ValidateSet('diag', 'release')][string]$Build = 'diag', + [hashtable]$More = @{} +) +$settings = @{ + # This fork's play set (scripts\play.ps1, not -Safe). + VICTORY_TEXTURE_NO_WAIT = '1'; VICTORY_RELAY = '2'; VICTORY_WIDE_BACK = '1'; VICTORY_CARD_REHASH_RUNS = '1' + VICTORY_JOIN_COPIES = '1'; VICTORY_INDIRECT_WINDOW = '1'; VICTORY_RELAY_COPY = '1'; VICTORY_CARD_STEPS = '2' + VICTORY_INDIRECT_BATCH = '2'; VICTORY_MAP_THREADS = '1'; VICTORY_TITLE_PRIORITIES = '0'; VICTORY_CARD_AWAKE = '1' + VICTORY_SHOW_AFTER = '1'; VICTORY_AMBIENT = '0.8'; VICTORY_D3D12_DRED = 'light'; VICTORY_SKIP_PIPELINES = 'none' + VICTORY_THIN = '1'; VICTORY_JOIN_PARTS = '8'; VICTORY_UPLOAD_AHEAD = '1' + # Wait for new shaders rather than skip their draws (a hitch the first time a place is seen). + VICTORY_PIPELINE_WAIT_MS = '10000' + # NVIDIA caps the shader-visible view heap at 1,000,000: without more dynamic slots thousands of draws a frame + # are dropped (descriptor/host.rs dynamic_slots). + VICTORY_DYNAMIC_SLOTS = '524288' + # Half render scale with the title's own upscaler (Series S needs it with a scale below 1; victory-loader hooks.rs). + VICTORY_RENDER_SCALE = '0.5'; VICTORY_OWN_UPSCALER = '1' + # Ray walks end at the root while the structure builder is off (emit/intersect.rs). + VICTORY_BVH_MISS = '1' + # Memory compares on the card instead of the CPU: 11 -> about 22 fps on Series S. + VICTORY_CARD_BUFFERS_MIN_MB = '1'; VICTORY_CARD_BUFFERS_MB = '1536' + # Series S presents the interface as a second plane: laid over the game (compose.rs), else black before gameplay. + VICTORY_COMPOSE = '1' +} +foreach ($k in $More.Keys) { $settings[$k] = $More[$k] } + +$victory = Join-Path $PSScriptRoot "..\target\$Build\victory.exe" +if (-not (Test-Path $victory)) { Write-Host "No $victory. Build it first (README.md)."; return } +if (-not (Test-Path $Exe)) { Write-Host "No $Exe."; return } +if (-not $NoSmoothMotion) { + # A copy under the name the NVIDIA App's Smooth Motion profile is set for, refreshed when the build changes. + $sm = Join-Path (Split-Path $victory) 'victory_sm.exe' + if (-not (Test-Path $sm) -or (Get-Item $sm).LastWriteTime -lt (Get-Item $victory).LastWriteTime) { + Copy-Item $victory $sm -Force + } + $victory = $sm +} +# (Other settings left over in this window go; where your files are stays.) +$paths = 'VICTORY_CONFIG', 'VICTORY_GAME_DIR', 'VICTORY_CACHE_DIR', 'VICTORY_DATA_DIR' +Get-ChildItem Env:VICTORY_* | Where-Object { $_.Name -notin $paths } | ForEach-Object { Remove-Item "Env:$($_.Name)" } +foreach ($k in $settings.Keys) { Set-Item "Env:$k" $settings[$k] } +$Exe = (Resolve-Path $Exe).Path +$runArgs = @('run', $Exe, '--execute') +if (-not $SeriesX) { $runArgs += @('--console', 'series-s') } +Push-Location (Join-Path $PSScriptRoot '..') # victory.toml is looked for here +try { & $victory @runArgs } finally { Pop-Location }