Commit Graph

5744 Commits

Author SHA1 Message Date
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
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
d9ac7f6f0c Merge remote-tracking branch 'origin/main' into feat/launcher-update
# Conflicts:
#	tools/leonida_launcher.py
2026-12-02 08:07:23 +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
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
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
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
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
4a0aa701d0 scripts: red_green.py lists the hunks --mutate-max leaves out (review)
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).
2026-12-02 05:19:44 +01:00
29712017c4 scripts: red_green.py starts each mutation from a commit of the green merge, reset and cleaned (review)
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.
2026-12-02 05:19:44 +01:00
312bf7c892 scripts: red_green.py stops what a mutated run leaves behind, so an orphan holding its output does not hold the run (review)
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.
2026-12-02 05:19:44 +01:00
3b3e5ee5da docs/testing.md: red_green.py --work-dir leaves its worktree registered; git worktree remove <dir>/tree removes it (review) 2026-12-02 05:19:44 +01:00
89274bac6e scripts: red_green.py --mutate says when it stopped, why nothing was undone, and which added files it does not mutate (review)
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.
2026-12-02 05:19:44 +01:00
745808fc3b scripts: red_green.py --mutate-timeout stops a mutated run that hangs and reports it as caught by timeout (review)
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.
2026-12-02 05:19:44 +01:00
de6db4b733 scripts: red_green.py removes the work tree's __pycache__ before each Python run, so no test runs stale bytecode (review)
-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.
2026-12-02 05:19:44 +01:00
dc63e371ce scripts: red_green.py --mutate checks that the tests catch the change itself (TEST-RED-GREEN-MUTATION)
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.
2026-12-02 05:19:44 +01:00
0e5ebd0c69 gate: the summary even when memory.csv cannot be written, the slope up to the stop (review)
`summary` wrote memory.csv before summary.json, so a memory.csv open in another program left no
summary and exit 1. A file it cannot write or remove is now said on stderr, `series` is null and
summary.json is written. The private bytes' slope counted the memory lines written while the title
ends after the stop request; it now covers the world up to the stop, as the frame rates do. New tests:
the 2 s window and the empty cells of memory.csv, its LF line ends, the slope with lines after the
stop and with fewer than 3 lines in the world, and a memory.csv that cannot be written. The census
sentence's contract is one key over the whole part WAITS reads, the ", " between its two numbers too.
The docs name every video memory line the peak counts (the swap chain made, its buffers made again,
a budget change of 256 MB or more) and when the slope and `series` are null.
2026-12-02 04:42:49 +01:00
01203fb3bf gate: a negative memory limit is off, and the poll's order tested in full (review)
A negative -StopOverBudgetSeconds stopped every run at its first video memory line: 0 s over the budget
passed a negative limit. Every limit is now off at 0 or less, with a test for each, and a line at
exactly the private limit is tested not to stop. The poll test gets a memory limit at the time limit
(memory wins), and the script text test checks the target and time limits the loop passes and that the
memory stop's sentence reaches the stop event. The docs give the poll's whole order (a STOP file and the
world time at the same check give `target`), say that `world_time_short` and `world_not_reached` are
not added to `memory_stop`, and name `memory.stop_limits`.
2026-12-02 04:42:49 +01:00
bb6ff13127 gate: no stale memory.csv, and the docs say what the series holds (review)
`write_series` returned before an older memory.csv was touched, so a folder summarized again from a log
without memory lines kept old rows beside `series: null`: it now removes that file. Two tests go through
`main()`: no memory lines writes no file, and an older file goes. The docs list the CSV header, how its
video memory and census columns are picked (the nearest line within 2 s), `reaper_queue_max_at_s` and
`waiting_objects_max`, and that the summary's video memory peak counts every video memory line, the
swap chain's too, so it can come from a line with no row in the CSV. "Not in this version" no longer
lists the time series and the VRAM and RAM peaks. The census line's fixture is the runtime's sentence
as it is now, with the reaper's bound (LEONIDA_REAPER_LIMIT) at its end; the part the parser reads did
not change.
2026-12-02 04:42:49 +01:00
eac2b61d2f gate: the world time comes before the memory stop, the commit floor tested at 20 s (review)
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.
2026-12-02 04:42:49 +01:00
7150b7fe0c gate: memory.csv and a pile-up's numbers beside the summary (D3D12-GATE-MEMORY-SERIES)
Testers read a pile-up by its slope and by the reaper's queue, which the summary's peaks do not show. The
parser now also reads the runtime's census line written with each memory line (objects let go that wait for
their submissions, and the reaper thread's queue) and writes memory.csv beside summary.json: one row per
memory line with the private bytes, the PC's memory free and left to commit, the card's video memory budget
and in use, the shared memory in use and the two queues. The summary's memory block gets the reaper queue
at its longest and when, the most objects waiting, and the least-squares slope of the private bytes in the
world (MB a minute). The census strings join the contract test.
2026-12-02 04:42:49 +01:00
cb5bcfc205 gate: the private-bytes stop also follows the PC's memory (review)
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.
2026-12-02 04:42:48 +01:00
aa75f13197 gate: a memory stop ends a run before memory runs out (D3D12-GATE-MEMORY-STOP)
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.
2026-12-02 04:42:48 +01:00
4b67b07045 Merge pull request #2931 from Mykolas009/d3d12/f1-dlss-rebuild
d3d12: the DLSS build is asked for once NVIDIA's SDK is here, whatever the switches (D3D12-F1-DLSS-REBUILD)
2026-12-02 00:48:23 +00:00
97ed89073a Merge pull request #2894 from lixonik/fix/glyphs-connected-xbox-pad
d3d12-hle: avoid PlayStation live glyphs when Xbox pad is connected
2026-12-02 00:48:12 +00:00
4ccf3fed82 Merge pull request #2811 from thiefyzheng/docs/benchmark-4060-laptop-8gb
PORT-BR-DOC-4060-LAPTOP: port 8 GB laptop benchmark note
2026-12-02 00:48:02 +00:00
5d06e4793e Merge pull request #2967 from aznohonza/tools/cgroup-memory-peak
game_run_summary: record the run cgroup's memory peak
2026-12-02 00:07:43 +00:00
afe0b798f4 Launcher tests and docs for -PrecompileAll
- tests: -PrecompileAll is among the switches checked against play-d3d12.ps1,
  and it is passed only with the precompile on.
- README.md, docs/launcher.md, d3d12/README.md: the switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:30:37 -05:00
c37e311384 Merge main into #278: keep both new decode tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-01 23:13:03 +01:00
c4ca576150 Merge pull request #2910 from c0pperlane/doc-d3d12-vulkan-stale-status
docs/d3d12_vulkan.md: drop stale "not implemented" status for buffer SRVs, streams, mesh PSOs and WriteBufferImmediate (DOC-D3D12-VULKAN-STALE-STATUS)
2026-12-01 22:45:03 +01:00
c9c5cc589f d3d12-hle: handle mirrored Sony pads in connected_pad, test Host::observe, and update docs 2026-12-02 00:01:18 +03:00
218b0328b8 game-gate: no run with a build the play script would make again for DLSS (D3D12-F1-DLSS-REBUILD)
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>
2026-12-01 22:43:34 +02:00
7fbdf85110 Merge pull request #2913 from ProjectLeonida/ci/exclude-legacy-cpp-runtime-tests
ci: exclude deprecated legacy C++ runtime/ from automatic CI runs
2026-12-01 19:00:46 +01:00
dfce074a05 ci: exclude deprecated legacy C++ runtime/ from automatic CI runs 2026-12-01 12:43:58 -05:00
9f0d351cc8 Merge pull request #2880 from alpfilho/d3d12/menu-last-choice-wins
d3d12: the last choice wins between the command line and the F1 menu (D3D12-MENU-LAST-CHOICE-WINS)
2026-12-01 18:38:35 +01:00
d2a564b66a Merge pull request #2865 from azsekazvamdimitar/feat/rtx3090-vram-perf-and-translator
d3d12/vulkan + rdna2spirv: staged VRAM arena, DMA readback batching, parallel shadows, stream-pool fix & wave64 perf (RT-ARENA-DEVICE-LOCAL-STAGED)
2026-12-01 18:17:55 +01:00
a9c4995c5c docs: allow agents to manage PRs while keeping main push-protected
Clarify in docs/agent_collaboration.md, AGENTS.md, and CONTRIBUTING.md
that agents may open, change, merge, and close pull requests on separate
branches, while keeping the strict rule that nobody (human or agent)
ever pushes directly to main.
2026-12-01 11:37:19 -05:00
64ec184069 docs: prohibit direct pushes to main
Document clearly in CONTRIBUTING.md, AGENTS.md, and
docs/agent_collaboration.md that contributors, maintainers, and coding
agents must never push directly to main and must always use a separate
branch and pull request so every change goes through CI and review.
2026-12-01 11:27:57 -05:00
588496066f Merge pull request #2385 from syfyra/docs/awc-family-claim-rule
docs: two families claiming one AWC id, the larger keeps it (DOC-AWC-FAMILY-CLAIM-RULE)
2026-12-01 16:22:00 +01:00
0f557b12a4 Merge pull request #2360 from ShotTechOp/fix/bitcmp64-mixed-and-special-srcs
rdna2spirv: handle mixed mask pairs, wave32 VCC, and mask bit indices in s_bitcmp0/1_b32/b64 (SHADER-BITCMP64-MIXED-AND-SPECIAL-SRCS)
2026-12-01 16:21:09 +01:00
f3529eeb0c Merge pull request #2355 from ShotTechOp/fix/bitset-mask-and-dst
rdna2spirv, lane_masks: handle lane-mask destinations and sources in s_bitset0/1_b32 (SHADER-BITSET32-MASK-AND-DST)
2026-12-01 16:19:57 +01:00
ec232cad48 Merge pull request #2338 from syfyra/feat/viewer-overview-map
viewer: an overview map of the world's chunks, with click to fly there (VIEWER-OVERVIEW-MAP)
2026-12-01 16:19:30 +01:00
96befbdd3e Merge pull request #2181 from Tauwni/fix/mods-gui-tkinter-hint-macos
leonida_mods gui: on macOS, the missing-Tkinter hint names Homebrew's python-tk@<version> (MODS-GUI-TKINTER-HINT-MACOS)
2026-12-01 16:17:21 +01:00
cfbe765e61 Merge pull request #2099 from BubsMcgee/rt-image-get-lod-cube
rdna2spirv: translate image_get_lod on a cube (IMAGE-GET-LOD-CUBE)
2026-12-01 16:16:57 +01:00
9e5d907e36 Merge pull request #1415 from Tortoche/test-5237
OLD-5237: rdna2spirv: the PS FRONT_FACE VGPR holds 0xffffffff / 0 (SHADER-892)
2026-12-01 16:15:32 +01:00
f0c4fe0b43 Merge pull request #1253 from NinsonD/feat/public-github-metadata-export
Feat/public GitHub metadata export
2026-12-01 16:14:46 +01:00
20fb2cc182 Merge pull request #1140 from PierreEbele/linux-deps-installer
scripts: install the Linux prerequisites in one command (BUILD-LINUX-DEPS-INSTALLER)
2026-12-01 16:14:22 +01:00
57c57a2b97 Merge pull request #665 from LouisRiverstone/carry-old-9923
docs/design.md: one copy of each rule in the Global atomics row (OLD-9923)
2026-12-01 16:13:57 +01:00