diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 09:22:29 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 09:22:29 -0500 |
| commit | 96d8ce0802f5074173acd89cd0bb68325e5aaa7d (patch) | |
| tree | 5378802c6999078d064e61e9f97fa7aae5dfdca4 /docs | |
| parent | d7d697314f5367970c218a65adde5912ff22c567 (diff) | |
docs/running.md: running the game per platform and GPU
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>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/README.md | 1 | ||||
| -rw-r--r-- | docs/running.md | 142 |
2 files changed, 143 insertions, 0 deletions
diff --git a/docs/README.md b/docs/README.md index 8db9cc080..3aec00ea9 100644 --- a/docs/README.md +++ b/docs/README.md | |||
| @@ -13,6 +13,7 @@ method, scope and caveats. No game data is included. | |||
| 13 | | [boot_leads.md](boot_leads.md) | Open leads that may move the retail boot further (TLS at module index 0, feature level at device creation, command-list replay, descriptor words, shader corpus count, frame pacing), each with where it lands, how to implement it and how to test it. Hypotheses, not measurements. | | 13 | | [boot_leads.md](boot_leads.md) | Open leads that may move the retail boot further (TLS at module index 0, feature level at device creation, command-list replay, descriptor words, shader corpus count, frame pacing), each with where it lands, how to implement it and how to test it. Hypotheses, not measurements. | |
| 14 | | [rpf.md](rpf.md) | RPF9 archive layout, the carve tools and the unreadable encrypted TOC. | | 14 | | [rpf.md](rpf.md) | RPF9 archive layout, the carve tools and the unreadable encrypted TOC. | |
| 15 | | [linux.md](linux.md) | Linux in one page: what runs natively and what runs under Wine or Proton, the Ubuntu packages, `Build.sh`, the runtime cross-build, and why there is no native Linux `gta6rt`. | | 15 | | [linux.md](linux.md) | Linux in one page: what runs natively and what runs under Wine or Proton, the Ubuntu packages, `Build.sh`, the runtime cross-build, and why there is no native Linux `gta6rt`. | |
| 16 | | [running.md](running.md) | Running the game per platform and GPU (Linux/Wine with AMD, Linux/Proton and Windows with NVIDIA, Windows with AMD, Intel, macOS): build, shaders, pipeline pre-compile, driver settings, environment, what to expect; each value measured by us, reported by others (linked) or TBD. | | ||
| 16 | | [testing.md](testing.md) | Running the GPU tests on your own GPU: setup per OS, wave64 emulation, running without a GPU on Mesa llvmpipe, and known problems. | | 17 | | [testing.md](testing.md) | Running the GPU tests on your own GPU: setup per OS, wave64 emulation, running without a GPU on Mesa llvmpipe, and known problems. | |
| 17 | | [gpu_test_results.md](gpu_test_results.md) | Published GPU test results by hardware, driver and commit, with pass, skip and failure counts. | | 18 | | [gpu_test_results.md](gpu_test_results.md) | Published GPU test results by hardware, driver and commit, with pass, skip and failure counts. | |
| 18 | | [modding.md](modding.md) | The mod format: `mods/<folder>/mod.json`, checked and loaded in name order by `gta6rt`; a swap takes effect once the game's archetype lookup is hooked (needs the executable, RT-5). A mod names game models and holds no game data. | | 19 | | [modding.md](modding.md) | The mod format: `mods/<folder>/mod.json`, checked and loaded in name order by `gta6rt`; a swap takes effect once the game's archetype lookup is hooked (needs the executable, RT-5). A mod names game models and holds no game data. | |
diff --git a/docs/running.md b/docs/running.md new file mode 100644 index 000000000..3b7e61f64 --- /dev/null +++ b/docs/running.md | |||
| @@ -0,0 +1,142 @@ | |||
| 1 | # Running the game, per platform and GPU | ||
| 2 | |||
| 3 | How the retail game has been run on each platform and GPU so far: the build, the shader pack, the pipeline | ||
| 4 | pre-compile, the driver and OS settings, the environment and what to expect. Every value is marked: | ||
| 5 | |||
| 6 | - **measured by us**: by the maintainers who wrote this page, on the machine named in that section; | ||
| 7 | - **reported by others**: from a public issue or comment, linked; not checked by us; | ||
| 8 | - **TBD**: nobody has reported it yet. A report fills it in ([Reporting](#reporting)). | ||
| 9 | |||
| 10 | Paths are placeholders: `<checkout>` is the repository, `<build>` the folder with `gta6rt.exe` and | ||
| 11 | `gta6rt_tls_host.dll`, `<work>` the work folder `make_game.py` writes, `<cache>` a folder for pipeline caches, | ||
| 12 | `<package>` the game's package folder and `<exe>` its executable. Under Wine, a Linux path is passed as `Z:<path>`. | ||
| 13 | |||
| 14 | ## Settings every platform needs | ||
| 15 | |||
| 16 | - **The title's hang watchdog.** The title exits on purpose (a write to address 0) when its main loop has not reported | ||
| 17 | for 30 s, which a world load under the runtime exceeds. `LEONIDA_TITLE_WATCHDOG=0` keeps it from firing only together | ||
| 18 | with `LEONIDA_TITLE_WATCHDOG_KICK=<trap RVA>,<kick RVA>` (hex), two addresses in the executable that each person | ||
| 19 | measures in their own copy (`runtime/src/main.cpp` describes the trap instruction the first must point at). The | ||
| 20 | values are never committed. With `=0` alone the loader logs that the watchdog stays armed. (Measured by us; the | ||
| 21 | watchdog was identified in [#2019](https://github.com/ubiquitarianism/leonida/issues/2019#issuecomment-7172996360).) | ||
| 22 | - **The GPU timeout.** World frames take seconds each. The OS's GPU timeout must be longer, or the driver resets the | ||
| 23 | GPU: amdgpu's `lockup_timeout` on Linux, `TdrDelay` on Windows (sections below). | ||
| 24 | - **Large ray-tracing programs.** 724 library compute programs have 2 MiB of SPIR-V or more (676 of them ray-tracing | ||
| 25 | resolve) and take 89-167 s each in the driver ([reported by others](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7184700506); | ||
| 26 | the count of 724 also measured by us). `LEONIDA_RT_AS=off` drops acceleration-structure builds and | ||
| 27 | `LEONIDA_SKIP_COMPUTE=<name>,<name>,...` with those programs' names (picked by module size from | ||
| 28 | `<work>/shaders/spirv/library/index.json`) never builds or dispatches them. The picture then lacks what they draw. | ||
| 29 | |||
| 30 | ## Linux, Wine, AMD RX 7900 XTX (RADV) | ||
| 31 | |||
| 32 | Measured by us on 2026-11-26: RX 7900 XTX, Ryzen 9 7950X3D, Linux 7.3, Mesa 26.3.1 (RADV), Wine. Details and the | ||
| 33 | reasons behind each step: [linux_proton.md](linux_proton.md#amd-on-linux-what-got-the-world-drawn). | ||
| 34 | |||
| 35 | - **Build:** the clang-cl + xwin cross-build ([testing.md](testing.md#the-windows-runtime-on-linux-under-wine-or-proton)), | ||
| 36 | with SDL3 for the keyboard pad. | ||
| 37 | - **Shaders:** `python -I make_game.py --stages shaders --wave64-emulate off --work <work> --out <out>`. The GPU runs | ||
| 38 | wave64 natively; emulation is not needed. (`auto` picks the same here since llvmpipe no longer decides.) | ||
| 39 | - **Pipeline pre-compile:** `wine <build>/gta6rt.exe --precompile-pipelines --threads 16` with the run's | ||
| 40 | `LEONIDA_SHADERS`, `LEONIDA_PIPELINE_CACHE_DIR` and `LEONIDA_DEVICE_FAULT`, before the first run. It built 3,693 | ||
| 41 | compute pipelines. Not `make_game.py --stages pipelines`: its cache never matches the runtime's driver keys. | ||
| 42 | - **Driver and OS:** `amdgpu.lockup_timeout=30000,60000,10000,10000` on the kernel command line (the default is | ||
| 43 | 2000 ms; reboot needed). | ||
| 44 | - **Environment:** | ||
| 45 | |||
| 46 | | Setting | Why | | ||
| 47 | |---|---| | ||
| 48 | | `LEONIDA_D3D12=vulkan` | the Vulkan backend | | ||
| 49 | | `LEONIDA_SHADERS=Z:<work>/shaders/spirv` | the native pack | | ||
| 50 | | `LEONIDA_PIPELINE_CACHE_DIR=Z:<cache>/pso` | the journal the pre-compile filled | | ||
| 51 | | `MESA_SHADER_CACHE_DIR=<cache>/mesa`, `MESA_SHADER_CACHE_MAX_SIZE=16G` | RADV's own cache, large enough for the pack | | ||
| 52 | | `LEONIDA_STARTUP_CACHE_CHECKPOINTS=1` | session cache snapshots during the boot | | ||
| 53 | | `LEONIDA_ASYNC_PIPELINES=0` | draws wait for their pipeline instead of being skipped | | ||
| 54 | | `LEONIDA_SERIAL_BIG_COMPILES=0`, `LEONIDA_COMPUTE_WARMUP_MAX_BYTES=8388608` | warm-up limits, as in the NVIDIA report below | | ||
| 55 | | `LEONIDA_RT_AS=off`, `LEONIDA_SKIP_COMPUTE=<list>` | the large ray-tracing programs ([above](#settings-every-platform-needs)) | | ||
| 56 | | `LEONIDA_TITLE_WATCHDOG=0`, `LEONIDA_TITLE_WATCHDOG_KICK=<trap RVA>,<kick RVA>` | the title's hang watchdog ([above](#settings-every-platform-needs)) | | ||
| 57 | | `LEONIDA_DEVICE_TYPE=6`, `LEONIDA_MAP_READBACK=1`, `LEONIDA_FRAME_PACING=1`, `LEONIDA_PRESENT_NO_TEAR=1` | taken over from the NVIDIA report below; their effect on AMD was not measured one by one | | ||
| 58 | | `LEONIDA_ARENA_MB=4095`, `LEONIDA_TITLE_WINDOWS_MB=4096`, `LEONIDA_GEOMETRY_MB=6144` | room for the title's buffers in the world | | ||
| 59 | | `LEONIDA_CONSOLE_RELEASE_FILTER=1`, `LEONIDA_SHADOW_ALIAS_MS=5000`, `LEONIDA_CONSOLE_FIX_US=0` | carried from earlier boot runs; their effect here was not measured one by one | | ||
| 60 | | `LEONIDA_DEVICE_FAULT=1` | a device-loss report if the GPU hangs | | ||
| 61 | | `LEONIDA_KEYBOARD_PAD=always` | the keyboard as the pad | | ||
| 62 | |||
| 63 | - **Command:** from `<package>`, `wine <build>/gta6rt.exe --run Z:<exe> --game-dir Z:<package>`. | ||
| 64 | - **What to expect:** menus at 30 frames/s with no in-game compiling; the world after the story load, over eight | ||
| 65 | minutes without a GPU hang, at about one frame per six seconds. | ||
| 66 | - **Known problems:** frames alternate between white-out, a correct picture and black; some geometry is drawn in the | ||
| 67 | wrong place; VRAM reached 18.3 of 22.3 GB; the run ended on a breakpoint (`int3`) in the title after 12 minutes. | ||
| 68 | |||
| 69 | ## Linux, Wine, AMD RDNA2 iGPU (Ryzen 7000, RADV) | ||
| 70 | |||
| 71 | Measured by us on 2026-11-25/26, the same machine's integrated GPU (gfx1036), headless, before the watchdog's KICK | ||
| 72 | was known. The settings that drew the world on the RX 7900 XTX have not been tried here: TBD. | ||
| 73 | |||
| 74 | - **Build, shaders, pipeline pre-compile:** as for the RX 7900 XTX; the iGPU also runs wave64 natively. | ||
| 75 | - **Driver and OS:** the same `lockup_timeout` applies (TBD whether the values above are enough here). | ||
| 76 | - **Environment:** select the iGPU with `MESA_VK_DEVICE_SELECT=1002:164e` and | ||
| 77 | `MESA_VK_DEVICE_SELECT_FORCE_DEFAULT_DEVICE=1`. A cold compute warm-up made the title crawl at 0.12 frames/s behind | ||
| 78 | our own warm-ups; `LEONIDA_COMPUTE_WARMUP_LIVE_MAX_BYTES=131072` holds large warm-ups back while the title submits | ||
| 79 | (191 frames/s in the menus with it, measured on the RX 7900 XTX). | ||
| 80 | - **What to expect:** the boot, the first-run pages and the story load's loading screen (about 1,100 s into a run with | ||
| 81 | a partly warm cache). Every run then ended in the title's watchdog exit, about two minutes into the world load, | ||
| 82 | because only `LEONIDA_TITLE_WATCHDOG=0` was set. World frames: TBD. | ||
| 83 | - **Known problems:** TBD beyond the above. | ||
| 84 | |||
| 85 | ## Linux, Proton, NVIDIA | ||
| 86 | |||
| 87 | Reported by others: [#1608, comment 7184700506](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7184700506) | ||
| 88 | (RTX 3090 24 GB, NVIDIA 590.48.01, GE-Proton11-14, Debian 13). Not run by us. | ||
| 89 | |||
| 90 | - **Build:** clang-cl + xwin cross-build; `main` plus several pull requests and two local changes (listed in the report). | ||
| 91 | - **Shaders:** the main corpus, the library and FSPX with llvm-mc 23.1.6. Wave64 emulation: TBD from the report (it is | ||
| 92 | needed on NVIDIA's 32-wide subgroups; `auto` turns it on there). | ||
| 93 | - **Pipeline pre-compile:** caches warm from two earlier runs; no separate pre-compile is reported. | ||
| 94 | - **Driver and OS:** TBD. | ||
| 95 | - **Environment:** `LEONIDA_ASYNC_PIPELINES=0`, `LEONIDA_RT_AS=off`, `LEONIDA_SKIP_COMPUTE=<the 724 programs>`, | ||
| 96 | `LEONIDA_DEVICE_TYPE=6`, `LEONIDA_TITLE_WATCHDOG=0`, `LEONIDA_MAP_READBACK=1`, `LEONIDA_HOST_IMAGE_COPY=0`, | ||
| 97 | `LEONIDA_ARENA_MB=4095`, `LEONIDA_TITLE_WINDOWS_MB=4096`, `LEONIDA_SERIAL_BIG_COMPILES=0`, `LEONIDA_FRAME_PACING=1`, | ||
| 98 | `LEONIDA_PRESENT_NO_TEAR=1`. The report gives the reason for the skip list only: without it the world start waits | ||
| 99 | hours on the ray-tracing programs; with asynchronous pipelines instead the screen stayed black. | ||
| 100 | - **Command:** TBD. | ||
| 101 | - **What to expect:** the opening night street from about 650 s, at 0.1-0.2 frames/s, no device loss through 934 s. | ||
| 102 | The black stretch before it is graphics pipelines of 1-2.6 MB SPIR-V compiling one at a time, 5-10 s each. | ||
| 103 | - **Known problems:** nothing ray-traced is in the picture. | ||
| 104 | |||
| 105 | ## Windows, NVIDIA | ||
| 106 | |||
| 107 | Reported by others: [#2019](https://github.com/ubiquitarianism/leonida/issues/2019) (RTX 5090 32 GB, driver 616.92, | ||
| 108 | Windows 11). Not run by us. | ||
| 109 | |||
| 110 | - **Build:** `scripts/build_runtime.ps1` with SDL3, RelWithDebInfo. | ||
| 111 | - **Shaders:** `make_game.py --stages check,shaders,runtime` (26,503 shaders translated); wave64 emulation as `auto` | ||
| 112 | decides (on for NVIDIA). | ||
| 113 | - **Pipeline pre-compile:** TBD. | ||
| 114 | - **Driver and OS:** `TdrDelay` and `TdrDdiDelay` raised to 60 s, after which an 8.9 s pipeline build no longer | ||
| 115 | reset the device. | ||
| 116 | - **Environment:** `LEONIDA_D3D12=vulkan`, `LEONIDA_KEYBOARD_PAD=always`; the rest TBD. | ||
| 117 | - **Command:** `gta6rt.exe --first-run-ui game_scarlett_master.exe` from the package folder. | ||
| 118 | - **What to expect:** the first-run UI, then the title's watchdog exit at 145-204 s. With `LEONIDA_TITLE_WATCHDOG=0` | ||
| 119 | (before the KICK variable existed) the boot went on at about 24 frames/s and the machine then bugchecked | ||
| 120 | (`CRITICAL_PROCESS_DIED`) before a world frame. With the KICK values: TBD. | ||
| 121 | - **Known problems:** TBD. | ||
| 122 | |||
| 123 | ## Windows, AMD | ||
| 124 | |||
| 125 | TBD: no public report of a game run on Windows with an AMD GPU is known to us. What the code does: on RDNA1 and RDNA2 | ||
| 126 | under AMD's Windows driver, `make_game.py`'s `auto` translates native wave64, because that driver crashes on many | ||
| 127 | emulated wave64 compute pipelines (#857). `TdrDelay` applies as for NVIDIA. | ||
| 128 | |||
| 129 | ## Intel | ||
| 130 | |||
| 131 | TBD. | ||
| 132 | |||
| 133 | ## macOS (MoltenVK) | ||
| 134 | |||
| 135 | TBD. | ||
| 136 | |||
| 137 | ## Reporting | ||
| 138 | |||
| 139 | Post a run in the coordination issue, with the fields of these sections: machine (OS, GPU, driver, RAM), the commit, | ||
| 140 | how the shaders were made, the pipeline pre-compile, the OS and driver settings, every `LEONIDA_*` variable that | ||
| 141 | differs from the defaults (never the watchdog's RVA values), and how far the run got with its frame rate. Keep logs, | ||
| 142 | traces and screenshots on your machine ([linux_proton.md](linux_proton.md#reporting-a-result)). | ||