Commit Graph

20 Commits

Author SHA1 Message Date
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
9f27ba2e1f Merge pull request #2839 from aznohonza/docs/running-linux-wine-nvidia
docs: a Linux + Wine + NVIDIA profile that draws world frames (DOCS-RUNNING-LINUX-WINE-NVIDIA)
2026-12-01 14:36:15 +01:00
abf475ef65 Merge remote-tracking branch 'origin/main' into tools/cgroup-memory-peak
# Conflicts:
#	tests/test_run_game_wine.py
2026-12-01 12:55:58 +01:00
d9c470cd30 game_run_summary: record the run cgroup's memory peak 2026-12-01 08:41:52 +01:00
6b6f75abbb docs/running.md: source the Linux + Wine + NVIDIA details and index the profile
- separate the 22.2 GB run that drew the city night street from the
  22.3 GB default-arena run, as the reports do;
- say the 1.7 GB journal was warm from three earlier runs, not filled by
  these runs;
- replace the unsourced scene names and the submissions-per-frame count
  with the reports' words, and give the 47 s STRAY_RO_HEAL observation
  its provenance;
- say that 724 is the maintainers' count and 723 is this pack's, that
  the skip list takes name fragments and is the ray-tracing programs;
- give the full run_game_wine.sh invocation and name the local trace-off
  change;
- index the profile in docs/README.md and point linux_proton.md at it.

AI-assisted.
2026-12-01 07:11:10 +01:00
206bb4b688 run_game_wine.sh: --cache fresh is cold: drops the drivers' cache variables and an old session/cache (WINE-RUN-SHADER-CACHE)
Review follow-up (timbot103):
- A driver's own variable wins over XDG_CACHE_HOME, so a warm MESA_SHADER_CACHE_DIR, MESA_GLSL_CACHE_DIR or
  __GL_SHADER_DISK_CACHE_PATH reached Wine under --cache fresh. A fresh run now unsets them; with a kept cache the
  caller's variables stay and win. --help and docs/linux_proton.md say so.
- A run folder whose earlier launch did not start is accepted again: a fresh run now empties its session/cache, and
  session.txt is written anew instead of getting a second "shader cache:" line.
- test_run_game_wine_safety's shared fixture passes --cache fresh, so an inherited XDG_CACHE_HOME stays out.

Two new tests in tests/test_run_game_wine.py fail with the old script and pass with this one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
2026-11-30 08:14:20 +00:00
caf4fc3698 Merge upstream main into the PR branch 2026-11-29 16:54:24 +00:00
b25f39e67e docs: correct linux_proton.md status line for verified world frame 2026-11-27 10:54:02 -05:00
6fe01249f6 run_game_wine.sh: keep the drivers' shader cache from run to run (--cache, or the caller's XDG_CACHE_HOME)
Finding by z3r0rc in #1608: the launcher set XDG_CACHE_HOME to a new folder in each run folder, so NVIDIA's GLCache
(and Mesa's shader cache) started empty on every launch. The caller's XDG_CACHE_HOME is now used when it is set,
--cache DIR names one, and --cache fresh keeps the old cold-cache behaviour. session.txt says which.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JPqXc6svM4pbBagTsVEYA3
2026-11-27 06:47:26 +00:00
76109561f4 d3d12: --precompile-pipelines builds the skip-listed programs unless --skip-listed
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>
2026-11-26 12:40:56 -05:00
484b21262a docs/linux_proton.md: #1972 went into main with the others
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:32:39 -05:00
787d012b5d docs/linux_proton.md: name the pull requests the AMD world run was built with
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:18:05 -05:00
dbe7cf36b4 Merge #2129 from star41905453-coder: a window's GPU writes go back to the title's pages (RT-TITLE-WINDOW-WRITE-BACK)
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>
2026-11-26 09:17:29 -05:00
e6a82e72b2 docs/linux_proton.md: what got the world drawn on Linux with an AMD GPU
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>
2026-11-26 09:14:34 -05:00
04290dd2d1 d3d12: a window's GPU writes go back to the title's pages (RT-TITLE-WINDOW-WRITE-BACK)
A window of the title's memory is a read-side mirror refreshed before every
submission, so a UAV or raw write into one landed in the copy and the title
never saw it. At the world start that is the WRITE_INVALID device loss of
#1537 (QemmHD, 160 s into the load, past the cap): the culling compute writes
through addresses that name title memory, and nothing ever reads the result
back into the pages.

The layer now keeps every title range a submission's bindings reach (the
resolve path, so root views, table V#s and created views alike) and copies
those ranges from the copy to the title's pages at the start of the next
refresh, before the forward copy. A page the title wrote in between takes the
title's newer bytes and its GPU result is dropped; the tracker already knows
those pages (guarded, hot and clean). Caps: 8,192 ranges and 64 MiB a
submission, logged once; LEONIDA_TITLE_WRITEBACK=0 turns it off.

Test: d3d12_title_window_write_back, a dispatch through a root UAV at the
title's pages: the written words reach the pages, hold across two
submissions, and a title write survives the next forward copy. No game files.

Item: RT-TITLE-WINDOW-WRITE-BACK (claimed in #1608)

Wine against llvmpipe.
2026-11-25 21:59:18 +00:00
384abe5b06 Merge pull request #1843 from aslan2142/rt-input-script-no-sdl3
RT-INPUT-SCRIPT-NO-SDL3: scripted input in builds without SDL3
2026-11-25 14:15:49 +01:00
c68f494160 RT-INPUT-SCRIPT-NO-SDL3: serve LEONIDA_INPUT_SCRIPT without SDL3
A build without SDL3 answered GameInputCreate with no devices and E_NOTIMPL
for every other slot, so the title waited at its first "press A" prompt
forever: no CI artifact or offline build could get past it.

With LEONIDA_INPUT_SCRIPT set, gameinput_no_sdl.cpp now serves one scripted
pad (an Xbox One gamepad) driven by the script alone: device enumeration
through RegisterDeviceCallback (blocking, async, dispatcher), FindDeviceFromId,
and GetCurrentReading/GetNextReading/GetPreviousReading whose gamepad and UI
navigation state follow the script. Readings are taken when the title asks,
so no thread polls. Without the variable it behaves as before.

The parser, the 300 ms timeline, the button names, the press log lines and
the UI navigation mapping move from gameinput.cpp into gameinput_script.h,
which both shims use; nothing in it needs SDL. gameinput.cpp checks the
shared SDL button numbers against SDL_GamepadButton at compile time.

gameinput_no_sdl_test --input-script (CTest gameinput_no_sdl_script) checks
the scripted pad on a fake clock. Docs: runtime/README.md, docs/gameinput.md,
docs/linux_proton.md, docs/README.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 07:39:13 -05:00
597cf76623 TOOLS-WINE-GAME-RUN: scripts/run_game_wine.sh, one bounded game run under Wine
The launcher runs gta6rt.exe --run once under Wine on Linux, headless on a
private kwin_wayland --virtual --xwayland session (Xvfb has no DRI3, so RADV
cannot present there) or on the current display with --visible. Sound is off
(Wine's audio drivers disabled, Pulse/PipeWire/ALSA pointed at nothing,
LEONIDA_AUDIO=silent for the runtime's silent output endpoint), --device pins
the Vulkan device through MESA_VK_DEVICE_SELECT, and a hard time limit, a lock
and full teardown bound the run. Every path comes from arguments or the
environment.

tools/game_run_summary.py prints counts only: run time, end, exceptions by
code, D3D12 calls by outcome, presents, the top failing calls and the [rt]
lines by category with numbers masked. It never prints a log line.

Tests need no game, Wine or GPU: the script against stubs, the summary on
synthetic run folders. docs/linux_proton.md describes the script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 07:30:48 -05:00
7fcbf1fde6 docs: queue slot 31 (CopyPageMappingsBatchX) is handled
- docs/linux_proton.md: the branch no longer ignores slot 31; say what it
  maps now (destination and paired CPU view) and the two gaps that remain.
- docs/d3d12_vulkan.md, section 4.9: a row for queue slot 31 with how its
  argument layout was established (read statically from the executable's call
  site, corroborated by a public project's queue, the pool size matching a
  boot, as #968 states it) and the known gap (mappings apply when the call is
  made, not in queue order); the PresentX row's "every other queue slot"
  now points at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 20:17:45 -05:00
273b3bdf9d [integration] Linux/Proton and native Windows: boot through the story load (RT-PROTON-STORY-LOAD)
One squashed commit of a fork that was developed on a Linux/Proton machine and
tested on two native Windows machines. On all of them the retail 1.0.2.1
package now launches, shows its launch movie, first-run pages and landing
prompt, runs the story load to its end with the loading slideshow drawing its
artwork, and enters the world phase. A first world frame is not verified yet.
docs/linux_proton.md has the setup, a healthy boot's timeline, the machines
and where it stops.

Runtime: frames in the title's own window; DirectStorage pinned reads,
page-list scatter/gather, BCPack and unshuffle with a locally generated
predictor file; pooled, device-local and deferred image backing for streamed
and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table
that degrades instead of refusing a submission; a descriptor hash finalizer
(off until a library carries it); directly indexed heap offsets for compute
dispatches and VS/PS/GS draws; title buffer windows outside a fragmented
arena; opt-in device-local copies of streamed buffer views; write-fault
retries under the tracker lock, shared trackers and write-watched title memory
for native Windows; device-loss, compute-input and memory probes.

Translator: loop bounds at structured exits, the eight FidelityFX programs
that use a packed-dot form the disassembler skips, buffer bounds modes per
view kind, a compaction option, the hash finalizer option.

Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows
boot script, the paired compute translation script.

No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted
by people on the machines named in docs/linux_proton.md.

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 11:42:12 -06:00