#2372 started a detached thread that took the input lock every 8 ms, so that a scripted press that begins and ends
while the title is not reading reaches the reading history. That works around the cause and adds its own: the
history then depends on how the host schedules a Sleep(8) thread (a slow or loaded machine keeps fewer edges, and a
Windows timer tick of 15.6 ms drops a short hold), the thread never ends, and it contends with the title's reads.
The cause is that update() looked only at the state at the moment of the read. It now first adds a reading for every
start and end of a press since the last update, stamped with the script's time, then the state at the read: the
history is the same however often the title reads, on any machine, and no thread runs. The press log lines carry the
script's time of the press.
Also: LEONIDA_INPUT_TRACE (added by #2372) is documented in docs/gameinput.md and runtime/README.md, as
tests/test_docs_env_vars.py requires. gameinput_no_sdl_script gains y@10, which the title never reads while it is down
(reads at 4.5 s and 60 s): the press and its release must be in the history with their own timestamps. On main the
history has no Y reading.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LEONIDA_SKIP_COMPUTE is a play-time setting: the game drops the listed programs' dispatches. The precompile also
refused to build them, one "not built (LEONIDA_SKIP_COMPUTE)" line each and no override. Players run it with the
game's environment (docs/running.md), so their skip list kept those programs out of the journal for good, and a later
run without the list compiled them in the game.
- precompile_compute_pipelines builds every compute entry; with the list set it says how many entries it names.
--skip-listed leaves them out on purpose, one line each.
- The last line counts the whole run: built (compiled, from a cache), journaled already, being built by another
process, failed; left out: of those the list names, not buildable, filtered out (--filter, the size bounds and now
--limit too).
- BuildHost::unbuildable no longer checks the list. The compile server checks it itself, as before: the game that
starts it drops those dispatches.
Docs: running.md, linux_proton.md and d3d12_vulkan.md no longer give compile time as the reason for the skip list.
The 89-167 s per program came from wave64-emulated packs; with a native wave64 pack on an RX 7900 XTX (RADV, Mesa
26.3.1, Wine) all 721 library programs of 2 MiB or more built, 360 of them in 170 s on 32 threads, 2.5-32 s each, the
largest (13 MiB) in 28.5 s alone, at a peak of 14 GiB of RAM. Two world runs on that card with all of them journaled
and no skip list took them all from the journal and got no further than runs with the list (a stop with the GPU
idle at 404 s; an idle-queue device loss at about 214 s, which also happens with the list set). Their output is
not checked, so the docs keep the skip list and LEONIDA_RT_AS=off as the setting of our longest runs.
Test: precompile_skip_list (test/check_precompile_skip_list.cmake) precompiles two synthetic compute modules, one of
them listed, three times: with the list set both are built; with --skip-listed only the other one is, and the listed
one is named; a second run into the first journal finds both journaled. It fails on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- LEONIDA_ASPECT (21:9, 32:9, 43:18, any W:H or ratio from 1 to 4, or auto) widens the display mode
the runtime reports to the title, at the same height, and widens the title's window.
- LEONIDA_PRESENT_SCALE=fit|stretch: fit keeps the frame's shape, centred with black bars. It is
the default when LEONIDA_ASPECT is set; stretch, the old behaviour, is the default otherwise.
- The aspect math is in src/aspect_fit.h, with aspect_fit_test.
- docs/ultrawide.md describes how resolution flows from window to title to present, and what
needs the game running: whether the title renders wider at all, its FOV and its HUD.
- play.ps1 gets -Aspect and -PresentScale.
Built; aspect_fit_test passes. The bars have not been checked on screen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/audio.md said that when two accepted families claim the same id in
one bank, the first family in sorted base order keeps it. Since
58a981e25 tools/awc_names.py _attack_split keeps the larger family
(`size > prev[2]`); only between families of the same size does the
first base win, because bases are sorted and the first claim is kept.
Say so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three forms 68 of the title's captured wave64 compute programs use and the translator refused:
- ds_append / ds_consume in an emulated wave64: a round for the active-lane mask, one counted atomic
by the first active lane of 64, a second round that hands its old value to the wave;
- s_bitreplicate_b64_b32 of a constant, also into EXEC: a constant 64-bit move;
- s_flbit_i32_b64 of a lane mask: the whole wave's mask, as s_ff1_i32_b64 reads it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One LDS atomic per wave at M0[15:0] + offset by the active-lane count, the old value broadcast to every active lane.
28 captured compute programs use it. Wave64 and GDS stay refused. Contract row in design.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
llvm-mc cannot print op_sel on this op, so the printed word lacked bit 14 and 32 console stages were refused. The
printed-encoding check takes that one bit from the stored bytes and the result goes to the high half of vdst.
Contract row in design.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SGPR after the workgroup ids holds the wave index in bits 24:20 and the wave count in bits 5:0 (as Mesa unpacks
tg_size); it is seeded from the local index over the wave size. 91 captured compute programs read it and were
refused. Contract row in design.md; the old refusal test now checks it is accepted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The console compiler loads through an address held in the vcc pair (s_load_dwordx4 s[..], vcc, ..): 79 captured
compute programs and 8 console stages were refused on it. The base comes from vcc_lo/vcc_hi. Contract row in design.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/install_deps_linux.sh installs what docs/linux.md lists with apt
(Debian, Ubuntu and derivatives), dnf or pacman. It takes the newest
llvm-21 or later the distribution packages, leaves out optional packages
it lacks, shows the commands and asks before running them (--dry-run,
--yes, --minimal), then checks Python 3.12+, llvm-mc with AMDGPU,
SPIRV-Tools, CMake 3.24+, Ninja, a C++ compiler and the Vulkan headers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A console pipeline stage has no header for its wave size; its wave32 code moves vcc as a pair with _b64 ops, so the
loose test made it wave64 and its vcc_hi compare masks were refused (402 compares, 437 mask writes). A vs/ps program
with an FSPX code file, wave32-only instructions and no strict wave64 marker is now wave32. Contract row in design.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fills the 'not run' entries of both records from a second session on the
same machine and test binaries: shader suites 0 failed on both GPUs; ctest
xdxr_build_check times out on both and vk_predicated_copy fails on the
UHD 630 (neither listed under Known problems). Corrects the UHD 630
barycentric note: the fixtures pass through the ANV fallback, the device
does not expose VK_KHR_fragment_shader_barycentric.
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
run_gpu_tests.py at 3aa9754, 0 failed in every run:
- GTX 1050 Ti, NVIDIA 555.58.02: 190/252 native, 221/252 with
LEONIDA_W64_EMULATE=1, 234/252 with the mesh-compute, bary and texoff
fallbacks as well.
- UHD 630, Mesa 26.1.6 ANV: 195/252 native, 226/252 with
LEONIDA_W64_EMULATE=1.
Synthetic tests only; no game files.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both came in with #2350 as additions on top of stopgap mechanisms, broke world runs (remap release: a GPUVM page
fault and a lost device; the mirror: a GPU hang) and were made opt-in by #2356. They go completely; with both
variables unset, main behaves as before.
Remap release (LEONIDA_GEOMETRY_REMAP_RELEASE, from 36771ec53):
- xmem.cpp: RemapReleases, remap_releases_enabled() and the page recording in unmap_range_locked; the four call
sites (XMemMapPhysicalPages, the scatter call, both copy_page_mappings).
- xmem.h/xmem.cpp: the test seam rt::xmem::reload_remap_release_setting().
- xmem_test: test_remap_releases (and the title_geometry_watch.h include only it used).
- README row, the docs/d3d12_vulkan.md paragraph; comments that named it.
Console heap mirror (LEONIDA_HEAP_MIRROR, LEONIDA_HEAP_MIRROR_CHECK, from 746059011):
- src/console_heap_copy.h goes. ConsoleHeap::copy is a plain std::uint8_t* again, written with memcpy/memset as
before the mirror, including the zeroing site that #2350's merge of #2162 resolved as heap.copy.zero(); the
compute-input probe reads it directly again. Without the mirror, view() was the copy itself, so nothing changes.
- heap_mirror_enabled(), heap_mirror_check_enabled(), check_console_heap_mirror(), the per-heap check counters and
log line, and the test API console_heap_mirror_mismatches() (d3d12_com.h).
- Tests console_heap_copy, d3d12_console_heap_mirror, _off and _default with their CMake entries; README rows and
the docs/d3d12_vulkan.md sentences.
Kept, because other paths use them or main's behaviour with the variable unset depends on them:
- LEONIDA_GEOMETRY_HOST and its DeviceState memory-type assert (dc9ef1a0b).
- The final copy at retirement (GeometryViews::retire_range's final_copy, "copied at retirement" in the geometry
buffers line): XMemFree of a title heap block (free_title_block) reports a release while the block's memory stays
committed and readable, so that copy is still made without remap release. Comments now say that instead of
naming remaps; geometry_views_test case 15 stays.
- forget_pool_span and "retired with their copy" in the title memory line: any retirement (free, decommit, unmap)
feeds it.
- The release queue's joining of touching ranges (title_geometry_watch.h): unmaps report page runs too;
geometry_views_test case 16 stays.
- LEONIDA_CONSOLE_RELEASE_FILTER, which predates the mirror; its sweep reads the copy again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mirror (746059011, in #2350) was on by default. World runs on merged main on an RX 7900 XTX (RADV), the same
settings otherwise:
- remap release on, mirror on: GPU page fault and a lost device about 40 s into the world;
- remap release off, mirror on: no evictions and no page fault, but a hang in a library compute program on the
direct queue about a minute in, a ring timeout and a lost device;
- both off: past five minutes in the world with no fault or hang, ending where the build before #2350 ended, on the
title's own breakpoint.
Why the mirror hangs the GPU is not known. It is off unless the variable is 1; the release sweep then reads the copy,
as before the mirror.
Tests: d3d12_console_heap_mirror sets LEONIDA_HEAP_MIRROR=1; a new ctest entry, d3d12_console_heap_mirror_default,
runs the same program without the variable and expects no mirror (it fails on main).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
VIctory is a GPL-3.0-or-later Rust compatibility layer for the same game whose
README reports a retail executable reaching the world. Its console-library
modules serve the 22 imports audio_hal_exe_calls.md lists without a shim, so
the entry says what may be learned from it, that facts are verified before use,
and that its bcpack-tables.bin stays out of Leonida.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GnGkjYHUWx92TkwvwCnAMe
Since #2350 a remap of physical pages that gives a page another frame retired the geometry copies over it, on by
default. In the first world run of that main on an RX 7900 XTX (RADV) the copies were retired by the thousand
(evicted 15010 in about 40 s) and the run ended in a GPUVM page fault (TCP read) and a lost device; the same build
settings without it ran eight minutes with evicted 0 and no fault.
A remap leaves the address valid on the console, so the title keeps using what names it, and not everything that
names a copy's address is rewritten when the copy goes:
- a root view is resolved while its list is recorded (d3d12_com.cpp, GraphicsCommandList::address); a list recorded
before the retirement and executed in an ExecuteCommandLists begun after it is not among the replays the
retirement waits for (kAfterExecutes covers only those in progress), so it reads the freed copy;
- a placed buffer view written outside a console heap carries the copy's address for as long as the descriptor lives.
The remap release is now off unless the variable is 1, read at every remap; the copies follow the new pages through
the refresh, as before #2350. Freeing, decommitting and unmapping still retire copies.
Tests: xmem_test test_remap_releases checks that a remap releases nothing by default and with 0, then the existing
checks with 1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
First record of an RX 9060 XT (RDNA4, GFX1200 / Navi 44): run_gpu_tests.py
247/268 passed, 19 skipped, 2 failed (cs_imgatomic_ext #1518, cs_texture_uav
#2261) natively and with LEONIDA_W64_EMULATE=1; build.py and check.py with
#1444; ctest with the four known failures and their pull requests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One section per platform and GPU (Linux/Wine with the RX 7900 XTX and
with the RDNA2 iGPU, Linux/Proton with NVIDIA, Windows with NVIDIA and
with AMD, Intel, macOS), each with the same fields: build, shaders,
pipeline pre-compile, driver and OS settings, environment with a reason
per setting, command, what to expect and known problems. Every value is
marked as measured by us, reported by others (linked) or TBD. The title
watchdog's KICK values are measured by each person and never committed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/test_docs_env_vars.py requires every variable the code reads to be named in a document; the night's diagnostics were not.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Head 5fa864e53. The conflict in the title-window members keeps #2129's write-back state and the comment of the geometry copies' retirement.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Head a42bffdc3. The conflict in docs/d3d12_vulkan.md keeps main's session-cache cap (#1886) and #1914's heavy cache text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The five steps that each removed a stop of the 2026-11-26 runs on an RX
7900 XTX with RADV under Wine: amdgpu's 2 s lockup_timeout and how to
raise it; a native wave64 pack; filling the pipeline journal with
gta6rt --precompile-pipelines, and the three reasons the pipelines
stage's pipeline_cache.bin never matches the runtime's driver keys;
LEONIDA_RT_AS=off with LEONIDA_SKIP_COMPUTE for the large ray-tracing
programs; and the watchdog's KICK variable, whose values stay local.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The arena keeps [0x70000, 0x80000) for the guard header and its two sinks (in the null region when
LEONIDA_ARENA_NULL_MB makes one). The page table is a host-visible buffer of its own; the header holds
its address minus heap_base, the arena's size and the magic, written last. Before each submission,
after the heap refresh, the windows and the geometry copies, update_address_guard makes the table say
exactly what is backed outside the arena: gpu_backings, the geometry copies' blocks and the separate
window buffers, the same set as the console heap pass's backed table but without its 100 ms limit.
Only changed words are written, level 2 before level 1; a chunk keeps its block for good; past 62
blocks a chunk passes unchecked, which is logged. Refusals the shaders count are logged at most once
a second with the last refused offset.
src/address_guard.h holds the format and the table (address_guard_test); docs/d3d12_vulkan.md 3.3
"Address guard" the design, the cost per access and what is and is not covered.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>