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:
1 parent
3ffa47f534
commit
85a529b61a
2 files changed
+17
-5
No files matched your search
+11
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user