play-nvidia.ps1: windows BAR cap on by itself under 24 GB of RAM

PR #8 made VICTORY_WINDOWS_BAR_MB opt-in (-WindowsBarMB). Without the
switch, a 16 GB PC was back to the 0x8007000E crash about a minute into
the world that PR #6 fixed: Windows lets the card share at most half the
RAM, and the windows fill that. Now, when -WindowsBarMB is not given, PCs
with under 24 GB of RAM get 3072 and larger ones keep the runtime default
(off). -WindowsBarMB (0 included) and -More still decide when given; if
the RAM can't be read, nothing is set.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
trustno1-coderandClaude Opus 5.5 committed 2026-11-26 09:57:50 -08:00
1 parent 3ffa47f534
commit 85a529b61a
2 files changed
+17 -5

No files matched your search

+6 -4
View File
@@ -290,14 +290,16 @@ What to expect:
memory. Use 720p or lower on Series S.
- Series S cannot go above 1080p: its output is 1080p, and the script says so
and stops if asked for more.
- **On 16 GB PCs, try `-WindowsBarMB 3072` with resizable BAR enabled.**
- **16 GB PCs: turned on for you, best with resizable BAR enabled.**
On the tested 16 GB PC with an RTX 3060, shared GPU memory approached its
limit about a minute into the world (`0x8007000E`, then a driver fault).
The 3072 MiB cap from [PR #6](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/6)
let eligible title memory windows use CPU-mapped VRAM while the card had room.
The launcher leaves this off by default. Pass a cap in MiB to
`play-nvidia.ps1` or any resolution wrapper. `-WindowsBarMB 0` disables it,
and `-More @{VICTORY_WINDOWS_BAR_MB='...'}` takes precedence.
The launcher sets it by itself on PCs with under 24 GB of RAM (Windows lets
the card share half the RAM) and leaves it off on larger ones. Pass a cap in
MiB to `play-nvidia.ps1` or any resolution wrapper to choose for yourself:
`-WindowsBarMB 0` disables it, and `-More @{VICTORY_WINDOWS_BAR_MB='...'}`
takes precedence.
### More than one card, and other cards
+11 -1
View File
@@ -12,7 +12,8 @@
# (-Adapter '#1'). Default: Windows' default card (the one the main display is on).
# -Build target\diag (the default, the build all measurements are of) or target\release
# (the release build ignores the ray-tracing skip list: VICTORY_SKIP_PIPELINES is a diagnostics switch)
# -WindowsBarMB maximum MiB of title memory windows in CPU-mapped VRAM (0 by default).
# -WindowsBarMB maximum MiB of title memory windows in CPU-mapped VRAM (by default 3072 on PCs with under
# 24 GB of RAM, else 0; -WindowsBarMB 0 turns it off).
# -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(
@@ -85,6 +86,15 @@ if ($Resolution) {
if ($Adapter) { $settings.VICTORY_ADAPTER = $Adapter }
if ($PSBoundParameters.ContainsKey('WindowsBarMB')) {
$settings.VICTORY_WINDOWS_BAR_MB = $WindowsBarMB.ToString([Globalization.CultureInfo]::InvariantCulture)
} else {
# Without -WindowsBarMB, PCs with under 24 GB of RAM get 3072 (PR #6). Windows lets a card share at most half
# the RAM, and the windows filled that on a 16 GB PC (RTX 3060) about a minute into the world (0x8007000E, then
# a driver fault). 32 GB and more never got there, so they keep the runtime default (0, off).
$ram = try { (Get-CimInstance Win32_ComputerSystem -ErrorAction Stop).TotalPhysicalMemory } catch { 0 }
if ($ram -gt 0 -and $ram -lt 24GB) {
$settings.VICTORY_WINDOWS_BAR_MB = '3072'
Write-Host "$([math]::Round($ram / 1GB)) GB of RAM: title memory windows in the card's memory the CPU maps, up to 3 GB (-WindowsBarMB 0 turns this off)"
}
}
foreach ($k in $More.Keys) { $settings[$k] = $More[$k] }
$scale = [double]::Parse($settings.VICTORY_RENDER_SCALE, [Globalization.CultureInfo]::InvariantCulture)