Commit Graph

18375 Commits

Author SHA1 Message Date
f6dd2242e0 Merge pull request #3083 from MoonEyes/carry/340
test: unit tests for tools/gen_gdk_runtime_classes.py (TEST-GEN-GDK-RUNTIME, carry of #340)
2026-12-02 12:03:46 +00:00
f9d4ca9074 Merge pull request #3106 from MoonEyes/carry/1346
tests: RBF0 report outputs that differ only in letter case (carry of #1346)
2026-12-02 11:58:54 +00:00
9b4d718992 Merge pull request #3092 from MoonEyes/carry/2136
studio: scale the camera's near and far planes with the model fit (carry of #2136)
2026-12-02 11:31:44 +00:00
7569895a5c Merge pull request #2804 from TheGeogeo/d3d12-game-abba
scripts: game-abba.ps1 runs an in-game ABBA comparison over gate runs (D3D12-GAME-ABBA)
2026-12-02 11:30:24 +00:00
40ac041833 Merge pull request #3101 from MoonEyes/carry/1121
x64_recomp: a buffer that ends inside a VEX/EVEX prefix is a DecodeError (X64-RECOMP-VEX-BOUNDS, carry of #1121)
2026-12-02 11:08:52 +00:00
3df7430e3f tests: test_game_abba.py reads paths and errors the same on a CI runner (review)
The Windows runner of the `check` job failed three of these tests; the script was right.

- Its TEMP is an 8.3 short path (C:\Users\RUNNER~1\...), and [IO.Path]::GetFullPath, which the script uses for
  every folder it compares and records, expands short names: the printed gate path and abba.json's folders were
  the long spelling of what the tests gave. The tests now take the real path of their temporary folders and
  compare paths after realpath and normcase.
- Its console colours PowerShell's error text and wraps it with the escape sequences inside the wrap, which
  unwrapped() did not join. The tests now run pwsh with NO_COLOR=1, and unwrapped() removes colour sequences
  before it joins the wrapped lines.
2026-12-02 12:04:48 +01:00
af89a79c10 scripts: game-abba.ps1 takes a value the settings line hides as an arm, keeps a name's last value, refuses a checkout in -Out (review)
- 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.
2026-12-02 12:04:48 +01:00
9253877875 scripts: game-abba.ps1 deletes only its own -Out, refuses what can never be checked, writes LF records as it goes (review)
- 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.
2026-12-02 12:04:48 +01:00
45841e40e7 scripts: game-abba.ps1 refuses fewer than 3 pairs (review)
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.
2026-12-02 12:04:48 +01:00
d80442e6a9 scripts: game-abba.ps1 starts a re-run clean, stops on a failed warm-up, checks the comparator and records the arms (review)
- 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.
2026-12-02 12:04:48 +01:00
3278ba15ae tools: d3d12_ab_compare.py leaves a run with an unreadable summary.json out (review)
A summary.json cut short (a gate stopped while writing it), not JSON, or not an object made `check` and
`abba` raise. Both now read it through read_summary() and give "unreadable summary" as the reason the run
is left out, so the runner retries the slot instead of recording nothing and comparing without it.
2026-12-02 12:04:48 +01:00
a1b44f0b66 scripts: game-abba.ps1 runs an in-game ABBA comparison over gate runs (D3D12-GAME-ABBA)
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).
2026-12-02 12:04:48 +01:00
fff970e616 Merge origin/main into carry/1346 2026-12-02 11:51:40 +01:00
6d918ef46e Merge #1121 (kett1m) into main: keep main's tests and the PR's truncated VEX/EVEX tests
Carry of #1121 (X64-RECOMP-VEX-BOUNDS). The conflict in tests/test_x64_recomp.py only placed the PR's two new tests after main's existing ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 11:44:50 +01:00
a252854a27 Merge pull request #3059 from MoonEyes/carry/2872
d3d12-shader: make chains() and loop-counter lowering deterministic (D3D12-SHADER-DETERMINISTIC-EMIT, carry of #2872)
2026-12-02 10:40:05 +00:00
895c472faa Merge pull request #3078 from MoonEyes/carry/934
awc_shorts: refuse a catalog that would overwrite an input bank (carry of #934)
2026-12-02 10:26:51 +00:00
7a8fbc8235 Merge pull request #3060 from MoonEyes/carry/693
pe_inspect: parse and validate PE export forwarders table (OLD-9768, carry of #693)
2026-12-02 10:26:33 +00:00
b83249219d Merge remote-tracking branch 'origin/main' into carry/340 2026-12-02 11:26:02 +01:00
3a3c008228 Merge pull request #2817 from TheGeogeo/test-red-green-mutation
scripts: red_green.py --mutate checks that the tests catch the change itself (TEST-RED-GREEN-MUTATION)
2026-12-02 10:25:40 +00:00
5ec08c383f Merge pull request #2813 from TheGeogeo/d3d12-gate-memory-series
gate: memory.csv and a pile-up's numbers beside the summary (D3D12-GATE-MEMORY-SERIES)
2026-12-02 10:17:22 +00:00
beb6cee903 Merge commit 'refs/pr-all/2136' into carry/2136
# Conflicts:
#	tests/test_viewer_studio.cjs
2026-12-02 11:08:49 +01:00
e7e75ac62a test: keep gen_gdk_runtime_classes test output quiet
Reviewers on #340 (Oliwettoo, aslan2142) noted that the in-process gen.main
tests print the tool's progress line and its 'no COM folder' error into the
test output. Redirect stdout and stderr around those two calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 11:04:12 +01:00
16f30af4ff Merge commit 'refs/pr-all/340' into carry/340
# Conflicts:
#	tests/test_gen_gdk_runtime_classes.py
2026-12-02 11:01:36 +01:00
7c245a359b Merge commit 'refs/pr-all/1346' into carry/1346 2026-12-02 10:59:56 +01:00
80910637f1 Merge pull request #2812 from TheGeogeo/d3d12-gate-memory-stop
gate: a memory stop ends a run before memory runs out (D3D12-GATE-MEMORY-STOP)
2026-12-02 09:49:18 +00:00
2948cf3e49 awc_shorts: refuse a catalog collision before creating the output folder
Review follow-up from #934: the bank export directory check ran after
os.makedirs, so a refused run left an empty output folder. Both
collision checks now run first, and a test checks that out/ is not
created.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 10:47:43 +01:00
92c713e762 Merge commit 'refs/pr-all/934' into carry/934
# Conflicts:
#	tests/test_awc_shorts.py
2026-12-02 10:47:42 +01:00
8d942ae214 tests: an export RVA at the end of the export directory is not a forwarder
The directory is [begin, end), as in runtime/src/pe_loader.cpp. A mutation that made
the end inclusive survived. Reported by enlighted-agent on the carry PR.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 08:30:47 +01:00
a990504ee6 Record the commits of #693 (abnalstlll-byte) in the history of this carry
The tree is the one already resolved on top of main; this merge only keeps the
author's four commits as ancestors, as CONTRIBUTING.md asks for a carry.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 08:29:57 +01:00
a917c54d6a Merge pull request #3057 from OreoFR/feat/launcher-update
launcher: check for updates at start and update in one click (LAUNCHER-UPDATE)
2026-12-02 07:24:23 +00:00
c681cd9261 Merge main into #693: keep resources, unverified imports and system-DLL notes next to forwarders and pdata
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 08:12:56 +01:00
d9ac7f6f0c Merge remote-tracking branch 'origin/main' into feat/launcher-update
# Conflicts:
#	tools/leonida_launcher.py
2026-12-02 08:07:23 +01:00
229d352ee3 Merge pull request #3058 from OreoFR/carry/hwrt-2972
d3d12: hardware ray tracing on DXR 1.1 (LEONIDA_HW_RT, off: a trial) - carry of #2972
2026-12-02 06:54:01 +00:00
d94e764d62 Merge pull request #3056 from OreoFR/fix/launcher-precompile-all-needs-prepare
launcher: Precompile every pipeline ticks Prepare shaders (LAUNCHER-PRECOMPILE-ALL-NEEDS-PREPARE)
2026-12-02 06:45:52 +00:00
094be1f323 launcher: show an update beside PLAY, not only in the status bar
The first window test showed the bar line at the very bottom, easy to
miss, and its text pointed at a button "above" that was beside it. An
update now shows as a framed "Update available: N new commits" with its
Update button next to PLAY. The bar keeps the other notes (zip copy, no
git, a failed check).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:44:39 +01:00
43af833d19 Merge remote-tracking branch 'origin/main' into carry/hwrt-2972
# Conflicts:
#	d3d12/docs/switches.md
2026-12-02 07:40:14 +01:00
52e2eae670 launcher: check for updates at start and update in one click (LAUNCHER-UPDATE)
At start the launcher runs git fetch in its folder. When the clone is
behind its upstream, the Play page says how many new commits there are
and shows an Update button. Update runs this file's own --update mode:
git pull --ff-only, then a rebuild of the runtime when d3d12/ changed,
with the output streamed like the other tools.

A copy downloaded as a zip has no .git; the launcher says that updating
needs a git clone. A Settings box turns the check off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:38:08 +01:00
5d47d4f576 Merge remote-tracking branch 'origin/main' into carry/2872 2026-12-02 07:31:14 +01:00
c43f309985 launcher: Precompile every pipeline ticks Prepare shaders (LAUNCHER-PRECOMPILE-ALL-NEEDS-PREPARE)
switch_args passes -PrecompileAll only with the shader preparation on, so the
new box did nothing when Prepare shaders before starting was off. A player hit
this right after #2986. Ticking the first box now ticks the second, and turning
the preparation off clears the first. A note line under the options says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:25:20 +01:00
daf7242f2e Merge remote-tracking branch 'origin/main' into carry/hwrt-2972
# Conflicts:
#	d3d12/scripts/play-nvidia.ps1
#	scripts/play-d3d12.ps1
2026-12-02 06:57:33 +01:00
f37c4a87d6 Merge pull request #2756 from IgorAntunes66/pr/seriesx-dlss-black-world
d3d12: leave FidelityFX maximum-size vtable patch off by default (D3D12-SERIESX-FSR-MAX-SCALED)
2026-12-02 05:52:36 +00:00
5b005f8bb9 d3d12/docs/switches.md: list LEONIDA_FSR_MAX_SCALED
The merge queue's tests found the page out of date once this branch met main.
Regenerated with tools/d3d12_switches.py after merging main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:31:19 +01:00
87ef956700 Merge remote-tracking branch 'origin/main' into pr2756fix 2026-12-02 06:30:45 +01:00
0ae5a2664b Merge pull request #2986 from TheStonedGamer/precompile-all
d3d12: opt-in precompile of every known pipeline (-PrecompileAll); never-drawn pipelines stay out of the library
2026-12-02 05:13:18 +00:00
bf65aa4505 scripts: red_green.py skips a folder it cannot list, stops with the tree put back on a __pycache__ it cannot remove, and four smaller fixes (review)
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.
2026-12-02 05:19:44 +01:00
673ac44a1b tests: red_green.py checks that the process a mutated run leaves behind is stopped, not only that it does not hold the run (review)
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.
2026-12-02 05:19:44 +01:00
2051ccd0aa docs/testing.md: red_green.py --mutate results include compiler crashed; one way to remove the worktree, default folder or --work-dir (review) 2026-12-02 05:19:44 +01:00
5660cff104 tests: red_green.py --mutate on code that sits only in added files has nothing to undo in the files it modifies (review) 2026-12-02 05:19:44 +01:00
0ab167f754 scripts: red_green.py refuses --mutate-max below 1, a --mutate-timeout that is not above 0, and both without --mutate (review) 2026-12-02 05:19:44 +01:00
fc0ce37ac4 scripts: red_green.py reports a cargo run stopped before any test ran as timed out building, not caught (review)
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.
2026-12-02 05:19:44 +01:00