Commit Graph

10 Commits

Author SHA1 Message Date
5b03c688bf Merge pull request #2966 from aznohonza/scripts/entry-point-help
scripts: --help answers in the Python and shell entry points
2026-12-02 00:47:12 +00: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
6da607c096 scripts: --help on the Python and shell entry points
check_no_game_data.py read `--help` as a path and answered "cannot read --help", exit 2, in the tool every
contributor is told to run; it now prints the usage text it already carries and exits 0. play-linux.sh and
run_wine_session.sh print their usage before any environment check, where they used to answer with an error
(and play-linux.sh's no-argument case still prints the same usage, on stderr, exit 2).

run_game_wine.sh's one-line Usage line names the required --shaders, which its Inputs section already listed.

A test per script fails on main's copies and passes here.
2026-12-01 10:29:39 +01:00
d9c470cd30 game_run_summary: record the run cgroup's memory peak 2026-12-01 08:41:52 +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
bbbdba8c4b run_game_wine.sh: lowercase the device ids with tr, not ${x,,}, so bash 3.2 matches the card (CI-RUN-GAME-WINE-BASH3) 2026-11-28 17:31:06 -08: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
f017b43f9d run_game_wine.sh: harden inner args, PCI matching, bash wrapper, and summary exit 2026-11-26 21:57:30 +08: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