Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
00d9ee5
gpu-test-results: record Radeon Pro Vega II on Linux RADV
zmasi Nov 26, 2026
8c9cf23
gpu-test-results: record four Vega II barycentric fallback passes
zmasi Nov 26, 2026
67ec1d3
Merge branch 'main' into results/gpu-vega20-radv
zmasi Nov 26, 2026
126058d
Merge remote-tracking branch 'origin/main' into results/gpu-vega20-radv
zmasi Nov 28, 2026
51ea09b
d3d12: fix WARP bypass and parallel descriptor contention in depth-bo…
zmasi Nov 30, 2026
b425746
Merge remote-tracking branch 'origin/main' into fix/d3d12-depth-bound…
zmasi Nov 30, 2026
c65f657
d3d12: compile parallel depth-bounds test at SM 6.0 and decouple WARP…
zmasi Nov 30, 2026
ee9fb09
d3d12: lower depth_bounds_pipeline_loads_and_filters_draws to SM 6.0
zmasi Nov 30, 2026
4ab693c
rdna2spirv: quad_any's docstring says partial quads are exact
aznohonza Nov 30, 2026
3587499
Merge main into docs/quad-any-partial
aznohonza Nov 30, 2026
f442c3d
scripts: red_green.py tells a crashed compiler from a build error (TE…
TheGeogeo Dec 1, 2026
8b89520
docs/running.md: a Linux + Wine + NVIDIA profile that draws world fra…
aznohonza Dec 1, 2026
6b6f75a
docs/running.md: source the Linux + Wine + NVIDIA details and index t…
aznohonza Dec 1, 2026
5ef76aa
docs/running.md: say cgroup memory for the measured 19-20 GB
aznohonza Dec 1, 2026
d696c86
rdna2spirv: fix quad_any's other stale partial-quad wording
aznohonza Dec 1, 2026
9f27ba2
Merge pull request #2839 from aznohonza/docs/running-linux-wine-nvidia
MoonEyes Dec 1, 2026
3e7b34a
Merge pull request #2799 from aznohonza/docs/quad-any-partial
MoonEyes Dec 1, 2026
b3910e5
Merge pull request #2814 from TheGeogeo/test-red-green-compiler-crash
MoonEyes Dec 1, 2026
cd0c52f
Merge pull request #2238 from zmasi/results/gpu-vega20-radv
MoonEyes Dec 1, 2026
7d482d6
Merge remote-tracking branch 'origin/main' into fix/d3d12-depth-bound…
zmasi Dec 1, 2026
0abaae0
ci: drop depth_bounds_pipeline_loads_and_filters_draws skip in d3d12 …
zmasi Dec 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/d3d12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,9 @@ jobs:
# The features of the executable people run (d3d12/scripts/build-nvidia.ps1, without dlss); no other step builds them.
- name: Build as shipped (diagnostics, mimalloc)
run: cargo build -p leonida --features diagnostics,mimalloc --locked
# The software adapter of the runner does not do the depth bounds test as this one expects, and #2663 fixes that
# in the renderer; drop the --skip with it. A failing test here also stops the crates after leonida-gpu.
- name: Tests (no GPU, no game data)
timeout-minutes: 30
run: cargo test --workspace --exclude xtask --locked -- --skip depth_bounds_pipeline_loads_and_filters_draws
run: cargo test --workspace --exclude xtask --locked
# tests/replay.rs is compiled only with the diagnostics feature.
- name: Replay test (diagnostics)
timeout-minutes: 15
Expand Down
538 changes: 516 additions & 22 deletions d3d12/crates/leonida-gpu/src/pipeline/host.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ method, scope and caveats. No game data is included.
| [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, and a status table: BL-2, BL-5 and BL-6 are done, BL-3 and BL-4 have open pull requests, BL-1 waits for a retail confirmation. |
| [rpf.md](rpf.md) | RPF9 archive layout, the carve tools and the unreadable encrypted TOC. |
| [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`. |
| [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. |
| [running.md](running.md) | Running the game per platform and GPU (Linux/Wine with AMD and NVIDIA, 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. |
| [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. |
| [gpu_test_results.md](gpu_test_results.md) | Published GPU test results by hardware, driver and commit, with pass, skip and failure counts. |
| [progress_dashboard.md](progress_dashboard.md) | A local page of what works, what changed since it last passed and what blocks next: unit and runtime tests, the translator contract by confirmation method, measured imports, corpus counts and, with `--github`, CI and the D3D- items (`tools/progress_dashboard.py`). |
Expand Down
5 changes: 4 additions & 1 deletion docs/linux_proton.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ What it does:
the run folder's `session/cache`, so it is cold; with a kept cache the caller's variables stay.
- **Traces:** `gta6rt --run` with `--trace` and `--trace-d3d12`, a fresh `--overlay` and save folder in the run
folder. Every other `LEONIDA_*` variable reaches the runtime unchanged, so `LEONIDA_INPUT_SCRIPT=a@210,a@240`
presses A as above. Arguments after `--` go to `gta6rt`.
presses A as above. Arguments after `--` go to `gta6rt`. The
[Linux, Wine, NVIDIA section of running.md](running.md#linux-wine-nvidia-geforce-rtx-3060-12-gb) reports runs
with a local change that leaves this trace off (`LEONIDA_NO_TRACE_D3D12=1`); `main`'s script always passes
`--trace-d3d12`.
- **Summary:** `tools/game_run_summary.py` prints the run time, how it ended, exceptions by code, D3D12 calls by
outcome, presents, the most frequent failing calls and the `[rt]` lines by category with numbers masked. It never
prints a log line. `--screenshot-every S` captures the game window into the run folder (ImageMagick's `import` and
Expand Down
40 changes: 40 additions & 0 deletions docs/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,46 @@ Reported by others: [#1608, comment 7184700506](https://github.com/ubiquitariani
The black stretch before it is graphics pipelines of 1-2.6 MB SPIR-V compiling one at a time, 5-10 s each.
- **Known problems:** nothing ray-traced is in the picture.

## Linux, Wine, NVIDIA (GeForce RTX 3060 12 GB)

Reported by others: [#2464, comment 7299367912](https://github.com/ProjectLeonida/mandy/issues/2464#issuecomment-7299367912)
and [comment 7300173397](https://github.com/ProjectLeonida/mandy/issues/2464#issuecomment-7300173397) (desktop, 31 GB
of RAM, no swap, 12 threads; NVIDIA 620.70.10; Debian 13, kernel 6.12.118; Wine 11.22 staging). Not run by us.

- **Build:** clang-cl + xwin cross-build of `main` `d8ca18240`, RelWithDebInfo.
- **Shaders:** `make_game.py --stages check,shaders,runtime --wave64-emulate on`: 26,503 main, 2,684 library,
2,713 FSPX, 52 BVH and 12 executable sets, `spirv-val` clean.
- **Pipeline pre-compile:** none. The runs reused a 1.7 GB journal that three earlier runs had filled; the opening
sequence's night scene alone built 763 graphics and 619 compute pipelines (2,296 modules, 732 MiB of SPIR-V,
45 minutes in `vkCreate*Pipeline` across the run), and the builds ended within two minutes of the last present.
- **Driver and OS:** no GPU timeout change. The runs sat in a systemd cgroup with `MemoryMax=24G` and no swap. With
the defaults one run was killed at 22.3 GB, 21 minutes in, before a world frame; another had drawn the city night
street when it was killed at 22.2 GB. The 1024/2048 arenas hold the earlier world runs at 19-20 GB, but the later
shots still reached 23.6 GB.
- **Environment:** `LEONIDA_DEVICE_TYPE=6`, `LEONIDA_MAP_READBACK=1`, `LEONIDA_COMPUTE_WARMUP=0`,
`LEONIDA_SERIAL_BIG_COMPILES=0`, `LEONIDA_FRAME_PACING=1`, `LEONIDA_PRESENT_NO_TEAR=1`, `LEONIDA_SUBMIT_ASYNC=4`,
`LEONIDA_KEYBOARD_PAD=always`, `LEONIDA_ARENA_MB=1024`, `LEONIDA_GEOMETRY_MB=2048`,
`LEONIDA_TITLE_WINDOWS_MB=4096`, `LEONIDA_SKIP_COMPUTE=<part of a name>,...` with the names of this pack's 723
library compute programs of 2 MiB or more (the page's 724 is the maintainers' count; 676 of theirs are
ray-tracing resolve), and the title's watchdog off with its KICK values set. `LEONIDA_STRAY_RO_HEAL=1` is needed
on this build and driver: without it a run ended at 47 s (exit 5) writing to a title page the runtime had marked
read-only. That last detail is from an earlier run on the same machine, not in the two linked comments.
- **Command:** `scripts/run_game_wine.sh --build <build folder or checkout> --exe <game executable>
--game-dir <package folder> --shaders <translated library> --out <new run folder> --seconds 3600 --visible`, with
the arguments described in [linux_proton.md](linux_proton.md#running-the-game-under-wine-with-one-command). These
runs used a local change to the script: `LEONIDA_NO_TRACE_D3D12=1` makes it pass no `--trace-d3d12`, while `main`
always passes it; the trace costs a mutex, an fprintf and an fflush per D3D12 call, so a run with `main`'s script
writes it too.
- **What to expect:** the first-run UI at 30 frames/s, the account picker, then the story load; with a warm journal
the first world frame is 20-34 minutes in. The opening sequence draws at 1-3 frames per 10-16 s, 0.06-0.30
frames/s, with cgroup memory at 19-20 GB and up to 23.6 GB later in the sequence. 12 GB of VRAM does not hold the
scene; the earlier runs spilled VRAM to host memory once the 12 GB card was full.
- **Known problems:** the night scene ends a run in one of two ways. With the list values on, one console value
wait stayed unmet for 101 minutes with no presents and no queue calls, and no gate was released unmet, including
in the stalled case; with `LEONIDA_LIST_VALUES=0` the scene draws further and then the device is lost (five
compute queues in flight, and `VK_EXT_device_fault` gave no address on this driver). What the picture lacks there
is not measured.

## Windows, NVIDIA

Reported by others: [#2019](https://github.com/ubiquitarianism/leonida/issues/2019) (RTX 5090 32 GB, driver 616.92,
Expand Down
7 changes: 5 additions & 2 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,11 @@ python -I scripts/red_green.py <pull request number>
target dir takes several GB; delete the folder (and run `git worktree prune`) when done.
- It prints the tests that go from red to green, those that pass on red and fail on green, those that fail on both
(failing on `main` too), and those found on one side only. The verdict is one of: `red then green` (exit 0),
`no red`, `red does not build`, `green fails`, `red not constructible`, `green not constructible`, `no tests ran`
(exit 1). `--json` prints all of it.
`no red`, `red does not build`, `green fails`, `red not constructible`, `green not constructible`, `no tests ran`,
`compiler crashed` (exit 1). `--json` prints all of it.
- A crashed compiler is not a build error: rustc or a build script ending with a Windows crash status (such as
0xC0000005, an access violation), an internal compiler error, or a failed allocation. That side builds again once,
and the report says so; a second crash gives `compiler crashed`. Run it again later, or on another machine.
- `red does not build` is the case the fork-CI steps above call "does not build without the pull request's new
file": the test needs the new code, which does not show that it catches the bug.
- `--crate <name>` adds a crate, `--no-cargo` or `--no-python` leaves one kind out, `--base <ref>` tests on another
Expand Down
48 changes: 48 additions & 0 deletions gpu-test-results/RadeonProVegaII-RADV.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
GPU: AMD Radeon Pro Vega II (Vega 20 / gfx906, PCI 1002:66a3, 32 GiB HBM2 per GPU)
Driver: Mesa RADV 26.0.8-1ubuntu0.3, Vulkan 1.4.335; deviceName: AMD Radeon Graphics (RADV VEGA20)
Subgroup: default/min/max 64/64/64, native64_compute=true. Geometry shaders: yes.
No VK_EXT_mesh_shader or VK_KHR_fragment_shader_barycentric; per_vertex_inputs=false.
OS/host: Ubuntu 26.04 LTS x86_64, kernel 7.0.0-43-generic, Intel Xeon W-3245, 373 GiB OS-visible RAM.
Commit: a73a57e1339be072baf5522351c8ec7f1482b56b (upstream main)
Tools: GCC 15.2.0, CMake 4.2.3, Ninja 1.13.2, Vulkan headers 1.4.341,
LLVM/llvm-mc 21.1.8 (AMDGPU), SPIRV-Tools 2026.1, Python 3.14.4.

Three identical Vulkan devices enumerated, not pooled. All runs pinned one physical GPU at a time
with the RADV ICD and DRI_PRIME=pci-<slot>!; llvmpipe excluded. The full suite and pipeline check
used PCI 0000:1e:00.0; the dedicated wave64 graphics suite used 0000:0b:00.0. Release harnesses
and scripts came from the same commit. LEONIDA_W64_EMULATE=0; no forced 32-wide subgroup.

run_gpu_tests.py --require-pass --assembler spirv-as (unfiltered):
277 inputs; 276 translated, all 276 passed spirv-val. The f16 fallback refused ps_ij_computed.
209/268 passed, 58 skipped, 1 failed (exit 1).
Skips: 27 require 32 lanes on request; 19 delegated to or require Windows D3D12; 6 mesh;
4 require native fragment barycentrics; 1 computed I/J; 1 delegated to w64_graphics.py.

vk_pipeline_check on that synthetic index (--jobs 4 --large-parallel 1):
276 modules created, 0 failed. 266 pipelines created, 10 skipped, 0 failed (exit 0).
CS 139/139, GS 1/1, VS 12/12, PS 114/118 (4 barycentric skips), MS 0/6 (6 mesh skips).
Pipeline creation is not shader execution and does not establish wave32 semantics on this GPU.

LEONIDA_BARY_FALLBACK=1, same unfiltered run on 0000:1e:00.0:
All four fixtures skipped above for native barycentrics passed through the geometry fallback:
ps_bary, ps_persp_bary, ps_uniform_branch and ps_scc_mask32.
213/268 passed, 54 skipped, 1 failed (exit 1). Translation and spirv-val stayed at 276/277;
ps_ij_computed was still skipped on this main commit. The only failure was still cs_imgatomic_ext.

check.py on the full run_gpu_tests.py output, with the same harness build and f16 fallback:
159/234 passed, 74 skipped, 1 failed (exit 1), the same cs_imgatomic_ext readback.
Standalone, unfiltered build.py stopped earlier: llvm-mc cannot encode the text-only cs_dpp_cmp
DPP compare. The check.py counts above use the combined runner's output, not this partial build.

w64_graphics.py on the dedicated fixtures assembled by build.py:
18/30 passed (10 tier A, 8 tier B), 12 tier C skipped, 0 failed. This fixed-64 adapter cannot
provide both widths for the partition comparison; no external W64G_REF was supplied.

Failure control: cs_imgatomic_ext reported six incorrect SINT words in its 3D cases. On the same
GPU, changing only the synthetic input to the corrected volume descriptor from #1518 (1bbf8a9b),
without changing the translator, harness or expectations, passed 1/1: all 64 words of each of the
UINT image, SINT image and volume matched. The original failure is included above; it is a fixture
descriptor mismatch, not evidence of a Vega wave64 execution bug.

Hand-written repository fixtures only; no game files used for this record.
AI-assisted: yes
41 changes: 37 additions & 4 deletions scripts/red_green.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
toolchain applies) and the changed `tests/**/test*.py` files with unittest, on both sides, in one worktree and one
cargo target dir under --work-dir (default `<git common dir>/red-green`), red first. It keeps both between runs: the
second run on the same crates builds only what changed. C++ `runtime/` tests are not run here (docs/testing.md has
the fork-CI way).
the fork-CI way). A side whose compiler crashed (a Windows crash status of rustc or a build script, an internal
compiler error, a failed allocation) builds again once; a second crash is the verdict `compiler crashed`.
Exit 0: at least one test went from red to green and no test that passes on red fails on green. 1: any other
verdict. 2: a usage or git error.
Expand Down Expand Up @@ -272,7 +273,16 @@ def crates_of(tree: Path, paths: list[str]) -> list[str]:
return names


def cargo_tests(tree: Path, crates: list[str], cargo: str, target: Path) -> dict:
# A crashed compiler, not an error in the code: rustc or a build script ending with a Windows crash status
# (0xC0000005 access violation, 0xC00000FD stack overflow, 0xC0000409 abort, ...), an internal compiler error, or a
# failed allocation. Such a side runs again once (a crash of a test binary stays a test result).
COMPILER_CRASH = re.compile(
r"process didn't exit successfully: `[^`]*(?:rustc|build-script-\w+)[^`]*` \(exit (?:code|status): "
r"(0x[cC][0-9a-fA-F]{7}(?:, \w+)?)\)"
r"|(internal compiler error)|(the compiler unexpectedly panicked)|(memory allocation of \d+ bytes failed)")


def cargo_once(tree: Path, crates: list[str], cargo: str, target: Path) -> dict:
cmd = [sys.executable, cargo] if cargo.endswith(".py") else [cargo]
cmd += ["test", "--locked", "--no-fail-fast"] + [a for c in crates for a in ("-p", c)]
env = dict(os.environ, CARGO_TARGET_DIR=str(target))
Expand All @@ -290,7 +300,21 @@ def cargo_tests(tree: Path, crates: list[str], cargo: str, target: Path) -> dict
elif error is None and CARGO_ERROR.match(line):
error = line.strip()
no_build = r.returncode != 0 and not tests
return {"tests": tests, "no_build": (error or f"cargo exit {r.returncode}") if no_build else None}
crash = COMPILER_CRASH.search(out) if no_build else None
return {"tests": tests, "no_build": (error or f"cargo exit {r.returncode}") if no_build and not crash else None,
"crash": next(g for g in crash.groups() if g) if crash else None}


def cargo_tests(tree: Path, crates: list[str], cargo: str, target: Path) -> dict:
first = cargo_once(tree, crates, cargo, target)
if not first["crash"]:
return {"tests": first["tests"], "no_build": first["no_build"]}
print(f"red_green: the compiler crashed ({first['crash']}), running again", file=sys.stderr)
again = cargo_once(tree, crates, cargo, target)
result = {"tests": again["tests"], "no_build": again["no_build"], "rerun_after": first["crash"]}
if again["crash"]:
result["compiler_crashed"] = again["crash"]
return result


PY_TEST = re.compile(r"^(\w+) \(([\w.]+)\)(?:\n[^\n]*?)? \.\.\. (ok|FAIL|ERROR|skipped|expected failure|unexpected success)",
Expand Down Expand Up @@ -318,12 +342,14 @@ def python_tests(tree: Path, files: list[str]) -> dict:


def side(tree: Path, crates: list[str], py_files: list[str], cargo: str, target: Path) -> dict:
result = {"tests": {}, "no_build": []}
result = {"tests": {}, "no_build": [], "compiler_crashed": None, "rerun_after": None}
for part in ([cargo_tests(tree, crates, cargo, target)] if crates else []) + \
([python_tests(tree, py_files)] if py_files else []):
result["tests"].update(part["tests"])
if part["no_build"]:
result["no_build"].append(part["no_build"])
for key in ("compiler_crashed", "rerun_after"):
result[key] = result[key] or part.get(key)
return result


Expand Down Expand Up @@ -355,6 +381,9 @@ def compare(red: dict | None, green: dict | None) -> dict:
def verdict(red_why: str | None, green_why: str | None, red: dict | None, green: dict | None, rows: dict) -> str:
if green_why:
return "green not constructible"
# Twice in a row on a side: the build cannot tell anything; not a code error, run it again later.
if any(s and s.get("compiler_crashed") for s in (red, green)):
return "compiler crashed"
green_failed = rows["regressions"] or any(r.endswith("(failed)") for r in rows["only_on_green"])
if green and green["no_build"] or green_failed:
return "green fails"
Expand All @@ -379,6 +408,10 @@ def report(r: dict) -> str:
s = r[name]
if s and s["no_build"]:
out.append(f"{name} does not build: " + "; ".join(s["no_build"]))
if s and s.get("compiler_crashed"):
out.append(f"{name}: the compiler crashed twice ({s['compiler_crashed']})")
elif s and s.get("rerun_after"):
out.append(f"{name}: the compiler crashed once ({s['rerun_after']}), the second build is the one shown")
rows = r["rows"]
labels = {"red_to_green": "red then green", "regressions": "pass on red, FAIL on green",
"fail_on_both": "fail on both (failing on the base too?)", "only_on_green": "only on green",
Expand Down
2 changes: 1 addition & 1 deletion tests/semantic/test_salu_wqm32.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Covers both:
- Data path (32-bit nibble expansion + SCC) via tools/rdna2spirv.py -> spirv_mini_interp.py.
- Lane-mask path (32-lane wave32, 8 quads) via tools/rdna2spirv.py -> spirv_wave_interp.py (vertex stage
uses OpGroupNonUniformShuffle for quad_any; fragment/compute stages are checked for OpGroupNonUniformQuadSwap).
uses OpGroupNonUniformBallot for quad_any; the fragment stage is checked for OpGroupNonUniformQuadSwap).

Standard library only; no game data.
"""
Expand Down
Loading
Loading