Files
mandy/d3d12/scripts/play.ps1
NotRexed fee07ff779 d3d12: Leonida's D3D12 runtime under its own name
What changed:
- victory/ is now d3d12/;
- its crates are leonida-* (leonida_* code paths);
- the program is leonida.exe;
- settings are LEONIDA_*, and the older VICTORY_* names still work through apps/leonida/src/leonida.rs;
- the config file is leonida.toml;
- log names and user-facing text say Leonida.

What did not change: lines that credit upstream projects or people, URLs, copyright notices and the
GPL-3.0 LICENSE. d3d12/README.md opens with a Leonida section that says the runtime grew from
Marvisak/VIctory through trustno1-coder/VIctory-NVIDIA. The rest of that README is labelled as
trustno1-coder's.

The launchers (scripts/play-d3d12.ps1, scripts/play-linux.sh), docs/linux.md and
scripts/sync_victory.py (prefix d3d12) follow the move. Future upstream merges will need a
mapping from upstream's names onto these.

Builds with `cargo build --profile diag -p leonida --features diagnostics`. The settings alias
tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 16:11:32 -05:00

39 lines
2.3 KiB
PowerShell

# Starts the title with the settings this fork is played with (README.md, "How to run it").
# scripts\play.ps1 -Exe <path of your own copy's executable>
# -Safe without the newer, faster ways (the first thing to try when something is wrong)
# -RayTracing the title's own ray-traced indirect light: lit interiors, about a third slower
# -Build target\diag (the default, the build all measurements are of) or target\release
# -More other settings: -More @{LEONIDA_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]$Safe,
[switch]$RayTracing,
[ValidateSet('diag', 'release')][string]$Build = 'diag',
[hashtable]$More = @{}
)
$settings = @{
LEONIDA_TEXTURE_NO_WAIT = '1'; LEONIDA_RELAY = '2'; LEONIDA_WIDE_BACK = '1'; LEONIDA_CARD_REHASH_RUNS = '1'
LEONIDA_JOIN_COPIES = '1'; LEONIDA_INDIRECT_WINDOW = '1'; LEONIDA_RELAY_COPY = '1'; LEONIDA_CARD_STEPS = '2'
LEONIDA_INDIRECT_BATCH = '2'; LEONIDA_MAP_THREADS = '1'; LEONIDA_TITLE_PRIORITIES = '0'; LEONIDA_CARD_AWAKE = '1'
LEONIDA_SHOW_AFTER = '1'; LEONIDA_AMBIENT = '0.8'; LEONIDA_D3D12_DRED = 'light'; LEONIDA_SKIP_PIPELINES = 'none'
}
if ($Safe) {
$settings.LEONIDA_UNDER_WIDE = '0'; $settings.LEONIDA_LAND_ECHO = '0'
} else {
$settings.LEONIDA_THIN = '1'; $settings.LEONIDA_JOIN_PARTS = '8'; $settings.LEONIDA_UPLOAD_AHEAD = '1'
}
if ($RayTracing) { $settings.LEONIDA_BVH_BUILDER = '1' }
foreach ($k in $More.Keys) { $settings[$k] = $More[$k] }
$leonida = Join-Path $PSScriptRoot "..\target\$Build\leonida.exe"
if (-not (Test-Path $leonida)) { Write-Host "No $leonida. Build it first (README.md)."; return }
if (-not (Test-Path $Exe)) { Write-Host "No $Exe."; return }
# (Other settings left over in this window go; where your files are stays.)
$paths = 'LEONIDA_CONFIG', 'LEONIDA_GAME_DIR', 'LEONIDA_CACHE_DIR', 'LEONIDA_DATA_DIR'
Get-ChildItem Env:LEONIDA_* | 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
Push-Location (Join-Path $PSScriptRoot '..') # leonida.toml is looked for here
try { & $leonida run $Exe --execute } finally { Pop-Location }