merzleckeier's reviews at 02:35, 02:47 and 02:58 and DeadlyChirp's 02:46 note:
1. The AMD/Intel card filter named NoDlss, NoFrameGen and SmoothMotion in
-Chosen, so a real PLAY rewrote leonida-settings.txt without the F1
menu's DLSS, DLSS frame generation and Smooth Motion. The launcher now
passes -CardMask (card_mask) instead; play-d3d12.ps1 hands it over and
play-nvidia.ps1 leaves those settings out of this start only, keeping
them in the menu file (and says so); the menu's FSR stays.
2. play-nvidia.ps1's automatic DLSS frame generation looked at every card:
with -Adapter it now judges the cards whose name holds it (all when none
does), so an AMD card chosen beside an RTX 4070 gets none; the card
mask's NoFrameGen also keeps it off.
3. Clear shader cache on Linux looked under the Windows data folder: it now
uses play-linux.sh's LEONIDA_CACHE_DIR or ${XDG_DATA_HOME:-~/.local/share}
/leonida/cache.
4. After the confirmation, clear_cache asks game_running() again, not only
its own process.
5. Linux PLAY passes the extra variables (the Controls page's binds, the
advanced options, Advanced winning) in play-linux.sh's environment
(`env NAME=value sh play-linux.sh ...`); none were passed before.
6. The Controls page keeps entries it cannot read beside its rows
(split_kbm_binds) and writes them back after them: adding a row no longer
drops a saved list with an unknown entry. Its note called t() with a
`text=` value, which crashed the page as soon as it showed one: the
placeholder is {entries} now, in de/es/fr/pt too.
Tests: test_card_mask_leaves_the_menus_nvidia_values_out_and_in_the_file
(dry runs, a real start with Start-Process stubbed keeping the menu file,
AMD + RTX 4070 with -Adapter each way and with the mask); card_mask and
-CardMask in play_command; LinuxPlayTests; SplitBindsTests with a guard
that no t() call passes text=. Launcher suite OK (1 skip), win launchers
12 OK, docs links, line endings, check_no_game_data. Counter-tests: the
mask ignored, the adapter filter off, the Linux env/cache, split and
card_mask reverted each fail their tests; the guard regex matches the old
source. Real window (isolated APPDATA): the game started during the
confirmation leaves the cache and says close the game first; adding H to
`both:G=Square;vehicle:N=FutureAction` saves G, H and the unknown entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep native status in both log modes and report explicit heights above the console output as failures. Verify both launch entry points with a synthetic Windows executable.
- arm_settings applies the space and length rules only to a value the runtime's settings line shows as it is:
one of ASCII letters, digits and " ._,:+=*-", the `plain` test of d3d12/apps/leonida/src/leonida.rs line 65,
mirrored and quoted in d3d12_ab_compare.py's new SOURCES, which a contract test checks against leonida.rs.
Any other value (a folder with a space, a long path) shows as "<hidden, N chars>", which `check` takes as
shown, so it can be an arm.
- A name given twice in one arm counts with its last value, as the gate keeps it.
- `settings` names an item by its position (and its LEONIDA_ name), never by its text, so no path is said back.
- The runner refuses a checkout inside -Out, where a re-run's clean-up could reach it.
- The files the runner writes are written beside themselves and moved over, so abba.json, rewritten after every
run, is never found cut short; an -Out whose abba.json exists but is not readable as this runner's is refused
as such ("no readable abba.json of this runner").
- docs/measuring_fps.md and the script's header say the same.
- A re-run deletes runs, abba.json and comparison.* only when -Out's abba.json is this runner's (its schema); an
-Out holding any of those without it is refused and kept. Each arm's scripts\game-gate.ps1, -Game,
-DataTemplate and the data folders are checked before anything is deleted (two-build mode needs the gate in
each checkout).
- -Out may not be -Game, -DataTemplate or a data folder, nor be inside one or hold one (full paths without an
ending separator, case ignored on Windows). -Retry is 0 or more.
- One reading of an arm's settings, d3d12_ab_compare.py's arm_settings(): the way game-gate.ps1 reads -More
(split at ";", name and value trimmed). The runner refuses before the first run what the runtime's settings
line could never show (not LEONIDA_NAME=value, a value with a space or over 120 characters), through the new
`settings` command, and passes the arm's text to `check --more`, which compares with the same reading.
- `check` builds on run_value, so a run that counts has one definition (a PASS without a frame rate is left out
and run again), and takes AFTER_WORLD_S from tools/game_gate.py. Its docstring no longer says it prints no
argument text.
- abba.json holds the folders and checkouts as well, and is written at the start and after each run, so an error
leaves it. abba.json, comparison.txt, comparison.json and ab-excluded.txt are LF with one final newline.
- An empty -More or -PlayArgs is not passed to the gate (PowerShell 7.0 to 7.2 drop an empty argument).
- Tests: the stand-in gate notes the parameters it gets and can end a run with another exe, another setting or
no frame rate; new cases for each point above, a slot left out on every try keeping its place, and the bytes
of the files written. test_d3d12_ab_compare.py removes its temporary folders.
- docs/measuring_fps.md: the refusals, the gate each checkout needs, the record and the re-run.
2 pairs are 2 runs a side, and `abba` needs 3 runs a side (side and linear trend) or 4 pairs (a verdict from
the pairs themselves): such a run could never give a comparison and would only say so, exit 1, after about an
hour of gate runs. The runner now refuses -Pairs below 3 before any run, and says why. The header comment and
docs/measuring_fps.md say the minimum; the dry-run tests that plan use 3 pairs, and the refusals cover 1 and 2.
- A run into an -Out used before first deletes what the earlier one wrote there (runs, abba.json,
comparison.*): a run folder of the same name kept its ab-excluded.txt, which left a good run out while
abba.json said left_out null, and its data copy.
- A warm-up or discarded run whose gate fails stops the runner at once, before the measured runs.
- Every call of d3d12_ab_compare.py (plan, check, abba) has its exit code checked before its output is
used: a failed comparator writes no comparison. The runner exits 1 when the runs left give no
comparison (too few runs, unbalanced pairs), 0 with one.
- abba.json records the arms' inputs (more, more_a, more_b, play_args, max_minutes, retry) and each run's
commit.
- The guard on -Out covers the runner's own checkout in two-build mode, appends
[IO.Path]::DirectorySeparatorChar, and -DataA/-DataB (and the checkouts) compare as full paths without an
ending separator, so "dir" and "dir\" are one folder.
- tests/test_game_abba.py runs the script over a stand-in gate that writes run.json and summary.json:
a failed and a cut-short run left out and retried, the outputs, a re-run into the same -Out, a failed
warm-up or discarded run, a failing comparator, too few runs left, and the record's fields.
- docs/measuring_fps.md: the re-run, the stop on a failed warm-up, the exit codes and abba.json's fields.
The runner takes the order from d3d12_ab_compare.py plan (warm-up runs, discarded runs, then ABBA pairs) and
runs each slot through scripts/game-gate.ps1, for one exe with two settings or for two builds (a checkout and
a data folder per arm). Each measured run is checked by the new `d3d12_ab_compare.py check`: its gate passed,
the pipeline cache was warm before the measured window, its exe is its arm's first one, and its arm's own
settings show in the runtime's settings line when there is one. A run that fails gets an ab-excluded.txt,
which `abba` now leaves out, and its slot runs again (-Retry, 1). The runner ends with the comparison in
<Out>/comparison.txt and comparison.json, and abba.json says what ran and what was left out. -DryRun prints
the plan and the gate commands. It needs PowerShell 7 (#Requires).
Review findings: upstream Wine has the userfaultfd and PAGEMAP_SCAN write watch from the
10.7 development release (not 10.6, not the stable 10.0), so the version rule is 10.7, and
only when no ntdll.so is found beside wine; a found one decides by its PAGEMAP_SCAN message.
Tests cover the lib, lib64 and Debian multiarch layouts and wine reached through a symbolic
link. docs/linux.md: Linux 6.7 is needed but not always enough, and which figures are a
native program's. The benchmark checks its arguments and allocations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
Wine 9.0 and 10.0, or any Wine on Linux before 6.7, track write-watched pages by making
them read-only and taking a SIGSEGV at the first write after each reset; Wine 11.0 and
Proton's Wine use userfaultfd's asynchronous write protection and PAGEMAP_SCAN instead.
Measured on a cloud VM: 2.3-3.8 us against 0.7-0.85 us per first write. The launcher now
says so in one line (LEONIDA_WINE_CHECK=0 leaves it out); docs/linux.md, "Which Wine", has
the numbers, and scripts/write_watch_bench.c measures them under any Wine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
Launcher.bat passes every option at every start, so play-d3d12.ps1 counted
all of them as typed (D3D12-MENU-LAST-CHOICE-WINS): an F1 choice of DLSS mode,
frame generation or Smooth Motion was replaced by the launcher's at the next
PLAY and dropped from the menu file, though nothing was changed there.
The launcher now keeps the switches of its last PLAY (launcher.json
last_switches) and passes -Chosen with those whose value changed since; only
they count as typed. Unchanged options leave the menu's values standing, an
option changed in the launcher wins as a typed switch does, and the first PLAY
(nothing to compare with) leaves the menu's. A start by hand, without -Chosen,
counts its typed switches as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
drop_bytecode skips a folder it may not list (Python cannot import from it either). A __pycache__ it cannot remove is now a usage error naming it (exit 2), and any such error during a run puts the tree back on the base, where before the undone hunk stayed. --mutate-timeout must also be finite. In a mutated run, a Python test stopped while running outweighs a cargo build that was stopped. job_of says once on stderr when it has no job object. docs/testing.md: one line rewrapped.
With the output in a file the run no longer waits for such a process, so only a mark it would write later shows that the job (the process group elsewhere) stopped it. drop_bytecode reads a folder's attributes only for folders.
A mutated cargo run that times out before its first Running line was still a build: it says nothing about the tests, so it is no longer counted as caught by timeout. A stub cargo that hangs in its build or in a test binary now covers the cargo timeout path, which no test reached before.
With more code hunks than --mutate-max, the report read as if every hunk was tried. The hunks left out are now in --json (mutations_skipped, file and line) and in the text (not tried, past --mutate-max).
code_hunks looked only at the lines a hunk adds, so a hunk that deletes an obsolete test inside a #[cfg(test)] module was mutated and read as not caught, while the red side took it as a test hunk. Both now use test_hunk_flags: every removed or added line is test code, blank or a comment, and one at least is test code.
A put-back that applies did not prove the tree green again: a test that wrote into a tracked file changed the result of the next hunk. The green merge is now committed with the tool's identity before its tests run, and each mutation resets the tree to it and cleans it before undoing its hunk. A hunk can no longer fail to go back, so mutations_stopped and its test are gone; a test that dirties the tree now has its own.
taskkill /T on a command that has already ended finds no tree: a child it left behind kept the output pipe open, the run waited for the timeout and a real caught read caught by timeout. A mutated run now writes its output to a temporary file and, on Windows, runs in a job object (kill on close) that its children join; once the command ends or times out, the job (the process group elsewhere) is stopped.
Path.rglob follows directory junctions on Windows, so a junction in the tree to an outside folder had that folder's __pycache__ deleted, and a link itself named __pycache__ made shutil.rmtree raise. The walk now skips symbolic links and every reparse point (junctions included).
A hunk that cannot be put back no longer drops the whole mutations section: the report and --json (mutations_stopped) name the hunk, the reason and how many hunks were not tried. With --mutate, mutations is always a list and mutations_not_run says why none was undone: nothing to undo (a test-only pull request), or no test went red then green. Files the pull request adds stay unmutated, and the report and --json (added_not_mutated) now list them. Verdicts and exit codes are unchanged.
Each command of a mutated run (cargo test, one Python test file) is stopped after --mutate-timeout seconds (600) together with the processes it started (taskkill /T on Windows, the process group elsewhere): a test binary or a process a test starts would otherwise keep the output pipe open. The hunk is then 'caught by timeout', apart from 'caught'. The red and green sides have no timeout, as before.
-B only stops writing bytecode. An ignored .pyc left in the work tree (git clean keeps it) ran instead of the reverted source: red passed and an undone hunk was not caught. -X pycache_prefix would cover the unittest process only, not the processes its tests start; removing the folders covers both.
Verifiers remove a line of the fix by hand on nearly every test pull request to see the new test fail.
--mutate does it for each hunk of the pull request's code outside its tests (Rust and Python files it
changes; hunks taken without context, so a test changed next to the code stays out): after the green
side, it undoes that hunk alone, runs the tests again and reports it as caught (a test that went red
then green fails), not caught, does not build or does not apply, up to --mutate-max hunks (10); the
hunk is put back after each run. Python tests now run with -B: an undone change of the same size within
the same second would otherwise run the stale bytecode.
A run that reached -WorldSeconds at the same poll as a memory limit was reported FAIL `memory_stop`.
It is a measurement, and its memory peaks are in the summary all the same, so the supervisor now
checks the target first. The poll's order is one function, Get-StopReason, which the test takes out
of the script and puts to PowerShell 7 with synthetic polls. The commit floor's boundary is now
tested at exactly 20 s, and the docs say what `stop.memory_why` holds: the gate's whole sentence.
With a large page file the commit limit is far above what a PC survives: two Windows crashes (0x10E)
came at about 100 GB private on a PC with 64 GB of memory and a 175 GB limit, where 90 % of the limit
is 158 GB. The default is now the lower of 90 % of the commit limit and 1.25 x the physical memory
(80 GB there, 36 GB here); the video memory stop stays on by default.
A memory pile-up has taken a PC's whole Windows down, not only the device, and a fixed 80 GB cap never
triggers on a PC with a 40 GB commit limit. The supervisor now asks `game_gate.py state` for a memory stop,
read from the runtime's latest memory lines: the game's private bytes past -StopPrivateMB (default 90 % of
this PC's commit limit), the PC under -StopCommitLeftMB left to commit for 20 s (default the larger of
128 MB and 0.25 % of the limit), or video memory over the system's budget for -StopOverBudgetSeconds (60).
0 turns one off. The run then stops the same clean way, with the reason `memory`; the limits go into
run.json and the summary, the limit passed into `stop.memory_why`, and the verdict is FAIL `memory_stop`.
`start` forwards the limits to the detached run.
The precompile makes only the pipelines earlier runs drew with (warm --used).
-PrecompileAll (launcher: "Precompile every pipeline", off by default) makes
every pipeline the title has created, as foxhound's launcher does: fewer
stalls in places not drawn in yet, at the cost of an hour or more and
gigabytes the first time. Kept across the F1 menu's restart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The preflight added in 218b0328b read -NoDlss out of -PlayArgs with a pattern over
the text. Two reviews of the pull request showed where that goes wrong:
- `-NoDlss: $true`, a space after the colon, binds true, and the gate refused the
run and asked for a DLSS rebuild (andrew-ai, PowerShell 7.6.9);
- `-Adapter 'Fixture -NoDlss Adapter'` binds no switch, and the gate let the run
go on into a build inside the run (merzleckeier, PowerShell 7.4.21).
The gate now asks PowerShell itself: Test-NoDlssBound takes the param block of
scripts\play-d3d12.ps1 and lets it bind the arguments the launch line gives the
script (-Game, -Data, -More, then -PlayArgs); nothing of the play script runs.
The first thing the probe writes is the answer, so text behind a `;` in
-PlayArgs cannot stand in for it. Arguments PowerShell cannot bind (an ambiguous
-No, a switch that does not exist, a value outside a ValidateSet) count as
-NoDlss not said, as the start itself fails on them, and the refusal then says
that they did not bind and with which error. The probe is reached only when the
build's note, the SDK and cargo already say the play script would build.
tests/test_game_gate.py takes the function out of the script and puts 19 lines of
-PlayArgs to PowerShell 7 against the real play script's parameters: bare,
shortened, :$true, : $true, :$false, : $false, alone and among other switches,
the quoted adapter name alone, with -NoDlss:$false and with a real -NoDlss, an
argument that does not bind, and a `; $true` behind the arguments (skipped where
there is no pwsh). A second test holds that no pattern is matched against
-PlayArgs any more.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
In place of -RayTracing (the title's structure builder and software traversal as translated
shaders): the title's XboxBvhBuilder calls become host DXR 1.1 bottom and top levels, and the
traversal loops of its trace programs become inline ray queries.
Ported from trustno1-coder/VIctory-NVIDIA (its #3706; from Leslie-d-a/VIctory-NVIDIA-HWRT 61e389e0
and 5f55bca8, original by dakisback2 ecc49d5b and 72f8316a), GPL-3.0, and fitted to this tree:
- leonida-shader: emit/rayquery.rs wired into lower.rs (the plan, the handles, TLAS root SRVs
t230..t241, the analyses that leave the lifted loops out). A program in the paired form is not
lifted. With LEONIDA_HW_RT=1 the node test of a loop left unlifted misses every node
(emit/intersect.rs bvh_miss): the console structures are never written then.
- leonida-gpu: hwrt.rs (and dxr.rs for its records); list::external with a LEONIDA_THIN op for the
structure work at its place in a title list; the TLAS views in the descriptor heaps;
Deferred::held; the ray queries in the shader cache's entries; counters in the frame log.
- leonida-hle: modules/xboxbvh.rs replaces the exports of the title's XboxBvhBuilder.dll when on.
- With it on the light stand-in stands aside and the passes left out without structures run.
Shader writes are not all copied back as VIctory-NVIDIA does (LEONIDA_HW_RT_COPY_BACK=1 asks for
it): here that stretched and flickered textures and cost 30 to 45 ms a frame.
- F1: HARDWARE RAY TRACING (TRIAL); play scripts: -HardwareRT (frame generation left off with it,
as with -RayTracing); launcher: a checkbox. Docs: fork-ray-tracing.md, README.md, switches.md.
One PC (RTX 4070 12 GB, driver 621.40, Series X profile, no frame generation): 22 to 25 frames a
second against 6 with -RayTracing; the run ended after six minutes with the card's memory full.
Co-authored-by: dakisback2 <90546900+dakisback2@users.noreply.github.com>
Co-authored-by: Leslie-d-a <70692092+Leslie-d-a@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Dropping -h from run_wine_session.sh or check_no_game_data.py now fails the
test that covers it, and play-linux.sh's usage lists LEONIDA_GAME_DIR with
the other path variables (it already honours it).
AI-assisted.
The gate refuses to run without a build, because the play script would make
it inside the run. Since the change before this one, play-nvidia.ps1 also
makes a build noted as made without DLSS again once NVIDIA's SDK is there,
whatever the start's switches ask for: on such a checkout that build too
would be made inside the run, after the gate wrote down the exe's hash and
what it was built with. The gate now refuses that run as well and names the
build script. Not with -NoDlss in -PlayArgs (shortened or with :$true too)
and not without cargo: the play script makes no build then.
That commit's message calls this guard a follow-up, for want of PowerShell 7
on the PC it was written on; it has been installed since, and this is it.
Checked with PowerShell 7.7.0: the guard's own lines against a synthetic
folder, eleven cases; and the whole script twice. With a build noted as made
without DLSS and the SDK there it refuses before anything starts (exit 1, no
run folder). With a build noted as made with DLSS it goes on as before:
run.json carries built_with, and the run ends at once with ERROR not_started,
there being no game in the folder.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>