d3d12: read and detile only the written levels of a write-watched texture (D3D12-TEXTURE-DIRTY-MIP-DETILE) #3072

Open
github-bot wants to merge 5 commits from github-bot/gh-3072 into main AGit
Owner

@⁠zmasi on GitHub · 2026-12-02 09:07 UTC · original
zmasi:perf/d3d12-texture-dirty-mip-detile → main · +2020 −40 · 2 files · 5 commits · open

Claimed in the coordination issue as: D3D12-TEXTURE-DIRTY-MIP-DETILE (#2570)

What and why

Previously, a write observed by the write watch anywhere inside a staged texture caused Staging::refresh_timed to copy the entire texture out of title memory (copy_mapped) and CPU-detile every mip level of every array layer (texture.rs's module comment noted shortcut: a change detiles the whole texture, not the pages written).

This change maps the written pages to the texture parts ((mip, slice) subresources, with packed tail mips in a slice sharing their block) that overlap them, reads each contiguous run of dirty parts into its exact offset in the thread's scratch read buffer (read_runs / read_written), and CPU-detiles only those dirty parts into the persistent staging buffer (Staging::detile_parts) while leaving untouched levels intact:

  • Switch & live A/B support: LEONIDA_PARTIAL_DETILE (on by default; =0 restores whole-texture copy + detile; LEONIDA_AB-toggleable via crate::toggled!, documented in d3d12/docs/switches.md). Turning it off clears the sparing budget so toggling 0 -> 1 mid-run always re-seeds from a full read first.
  • Strict kernel-backed sparing invariants: Levels are spared only in the write-watched branch of refresh_timed (never on hash/guard turns, bakes, on_demand residency textures, LEONIDA_INPLACE, copy-timing modes, 3D/MSAA textures, >64 parts, or all-shared-page layouts), on hosts where first touch of a newly committed write-watched page is noted, after a full read verified every page resident as private memory in a single write-watched allocation, while preceding spared gaps remain resident private pages validated in forward address order before each run copy (all_private) with no unasked kernel writes (GetWriteWatch without reset) and an even, unchanged watch::changes() epoch, bounded to at most 16 consecutive sparing refreshes (SPARING = 16) before a full refresh. Any failed check falls back cleanly to the existing full copy_mapped + full detile path.
  • Existing GPU upload preserved: The persistent staging buffer is still uploaded whole to the host texture as before (zero multi-list partial-upload races), and d3d12/crates/leonida-gpu/src/texture.rs (384 KiB vs 640 KiB cap) + d3d12/docs/switches.md are the only files touched (merge-clean with #2841).
  • Attribution: After monte-alt/vesper 3cf0c18 (GPL-3.0), "Limit trusted dirty-mip reads to the selected texture span", extended here to per-run disjoint reads without holding the title-memory read lock and guarded by kernel working-set / non-resetting GetWriteWatch validation and bounded sparing.

Measured (release build, synthetic 1024x1024 2-layer 10-mip 2.8 MB BC7 texture, 11 runs on Ryzen 9 5950X)

Write pattern Read alone Amortised (including 17th whole read) Whole texture every write (before)
One 64 KiB level 31–40 us (43–60 us cold) 54–66 us (70–90 us cold) 385–496 us (~7–12x faster)
The 256 KiB level 47–55 us 67–79 us 377–455 us (~5–7x faster)
The 1 MiB level 165–187 us (211 us once) 179–207 us (235 us once) 396–427 us (~2.2x faster)
Every level written — 419–485 us 397–447 us (+13–38 us page-validation overhead)

(Synthetic host benchmark only; no retail title was run.)

Tested

  • cargo test --target x86_64-pc-windows-msvc -p leonida-gpu --lib -- dirty_mip_detile written_parts --nocapture (with and without --features diagnostics, and under RUST_TEST_THREADS=1): 14 checks covering poisoned scratch buffers (0xAA/0x55), packed tail mips, multi-slice 2D arrays, on_demand residency flips, short-read / decommitted / PAGE_NOACCESS forward-order gap validation, concurrent mapping-epoch changes, competing write-watch askers, 16-refresh lost-note self-repair, excluded layouts, and LEONIDA_PARTIAL_DETILE=0 parity (gracefully prints SKIP when no D3D12 host or qualifying write-watch is available).
  • python -I scripts/red_green.py: red on base (9/10 switch-on checks fail, e.g. 2,883,584 bytes read where 65,536 are due), green on HEAD.
  • cargo test --workspace --exclude xtask --locked --no-fail-fast -- --skip depth_bounds_pipeline_loads_and_filters_draws: all 32 workspace test binaries green (695 passed, 0 failed in leonida-gpu on current main).
  • cargo clippy --target x86_64-pc-windows-msvc -p leonida-gpu --lib --tests --no-deps (0 warnings in texture.rs), python -I tools/d3d12_switches.py --check d3d12/docs/switches.md (rc=0), and python -I scripts/check_no_game_data.py (rc=0).

GPUs tested: NVIDIA GeForce RTX 3090, driver 32.0.16.1088 (610.88), Windows 11 Pro 10.0.26200 (synthetic D3D12 unit-test host only; no game files).

AI-assisted: yes — authored with Claude Fable 5.2, design & diff audited across 9 rounds by GPT-6.2 Astra (xhigh read-only Codex CLI + rubric), and independently reviewed by a separate read-only Claude Opus 5.5 reviewer agent.

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a — no shader translator rule changed)
**@⁠zmasi** on GitHub · 2026-12-02 09:07 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072) `zmasi:perf/d3d12-texture-dirty-mip-detile` → `main` · +2020 −40 · 2 files · 5 commits · open Claimed in the coordination issue as: `D3D12-TEXTURE-DIRTY-MIP-DETILE` (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570) ### What and why Previously, a write observed by the write watch anywhere inside a staged texture caused `Staging::refresh_timed` to copy the entire texture out of title memory (`copy_mapped`) and CPU-detile every mip level of every array layer (`texture.rs`'s module comment noted `shortcut: a change detiles the whole texture, not the pages written`). This change maps the written pages to the texture parts (`(mip, slice)` subresources, with packed tail mips in a slice sharing their block) that overlap them, reads each contiguous run of dirty parts into its exact offset in the thread's scratch read buffer (`read_runs` / `read_written`), and CPU-detiles only those dirty parts into the persistent staging buffer (`Staging::detile_parts`) while leaving untouched levels intact: - **Switch & live A/B support:** `LEONIDA_PARTIAL_DETILE` (on by default; `=0` restores whole-texture copy + detile; `LEONIDA_AB`-toggleable via `crate::toggled!`, documented in `d3d12/docs/switches.md`). Turning it off clears the sparing budget so toggling `0 -> 1` mid-run always re-seeds from a full read first. - **Strict kernel-backed sparing invariants:** Levels are spared only in the write-watched branch of `refresh_timed` (never on hash/guard turns, bakes, `on_demand` residency textures, `LEONIDA_INPLACE`, copy-timing modes, 3D/MSAA textures, `>64` parts, or all-shared-page layouts), on hosts where first touch of a newly committed write-watched page is noted, after a full read verified every page resident as private memory in a single write-watched allocation, while preceding spared gaps remain resident private pages validated in forward address order before each run copy (`all_private`) with no unasked kernel writes (`GetWriteWatch` without reset) and an even, unchanged `watch::changes()` epoch, bounded to at most 16 consecutive sparing refreshes (`SPARING = 16`) before a full refresh. Any failed check falls back cleanly to the existing full `copy_mapped` + full detile path. - **Existing GPU upload preserved:** The persistent staging buffer is still uploaded whole to the host texture as before (zero multi-list partial-upload races), and `d3d12/crates/leonida-gpu/src/texture.rs` (`384 KiB` vs `640 KiB` cap) + `d3d12/docs/switches.md` are the only files touched (merge-clean with #2841). - **Attribution:** After `monte-alt/vesper` `3cf0c18` (GPL-3.0), *"Limit trusted dirty-mip reads to the selected texture span"*, extended here to per-run disjoint reads without holding the title-memory read lock and guarded by kernel working-set / non-resetting `GetWriteWatch` validation and bounded sparing. ### Measured (release build, synthetic `1024x1024` 2-layer 10-mip `2.8 MB` BC7 texture, 11 runs on Ryzen 9 5950X) | Write pattern | Read alone | Amortised (including 17th whole read) | Whole texture every write (before) | |---|---|---|---| | One `64 KiB` level | `31–40 us` (`43–60 us` cold) | `54–66 us` (`70–90 us` cold) | `385–496 us` (**~7–12x faster**) | | The `256 KiB` level | `47–55 us` | `67–79 us` | `377–455 us` (**~5–7x faster**) | | The `1 MiB` level | `165–187 us` (`211 us` once) | `179–207 us` (`235 us` once) | `396–427 us` (**~2.2x faster**) | | Every level written | — | `419–485 us` | `397–447 us` (`+13–38 us` page-validation overhead) | *(Synthetic host benchmark only; no retail title was run.)* ### Tested - `cargo test --target x86_64-pc-windows-msvc -p leonida-gpu --lib -- dirty_mip_detile written_parts --nocapture` (with and without `--features diagnostics`, and under `RUST_TEST_THREADS=1`): 14 checks covering poisoned scratch buffers (`0xAA`/`0x55`), packed tail mips, multi-slice 2D arrays, `on_demand` residency flips, short-read / decommitted / `PAGE_NOACCESS` forward-order gap validation, concurrent mapping-epoch changes, competing write-watch askers, 16-refresh lost-note self-repair, excluded layouts, and `LEONIDA_PARTIAL_DETILE=0` parity (gracefully prints `SKIP` when no D3D12 host or qualifying write-watch is available). - `python -I scripts/red_green.py`: red on base (9/10 switch-on checks fail, e.g. `2,883,584` bytes read where `65,536` are due), green on HEAD. - `cargo test --workspace --exclude xtask --locked --no-fail-fast -- --skip depth_bounds_pipeline_loads_and_filters_draws`: all 32 workspace test binaries green (`695 passed, 0 failed` in `leonida-gpu` on current `main`). - `cargo clippy --target x86_64-pc-windows-msvc -p leonida-gpu --lib --tests --no-deps` (`0` warnings in `texture.rs`), `python -I tools/d3d12_switches.py --check d3d12/docs/switches.md` (`rc=0`), and `python -I scripts/check_no_game_data.py` (`rc=0`). GPUs tested: NVIDIA GeForce RTX 3090, driver 32.0.16.1088 (610.88), Windows 11 Pro 10.0.26200 (synthetic D3D12 unit-test host only; no game files). AI-assisted: yes — authored with Claude Fable 5.2, design & diff audited across 9 rounds by GPT-6.2 Astra (`xhigh` read-only Codex CLI + rubric), and independently reviewed by a separate read-only Claude Opus 5.5 reviewer agent. ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. *(n/a — no shader translator rule changed)*
A write the write watch saw in a texture had every level of every layer read from title memory and
detiled again (texture.rs's own "shortcut: a change detiles the whole texture, not the pages written").
Now the levels and layers with a byte on a written page are read, each run of them by itself, into
their places in the read buffer, and detiled alone. The staging buffer keeps the others and is copied
to the card whole, as before. LEONIDA_PARTIAL_DETILE, on by default; =0 reads all of it as before, and
LEONIDA_AB can turn it while the title runs.

Measured on the PC this was written on (Ryzen 9 5950X, release build, the ignored test
a_written_level_against_the_whole_texture: a 1024x1024 BC7 texture of two layers and ten levels,
2.8 MB; eleven runs): a write to one of its 64 KiB levels is in the staging buffer after 31-40 us
(43-60 in three of the runs) where it took 385-500 with all of it read, 54-66 us a write (70-90 in
those three) with the read of all of it in its turn counted in; a write to its 1 MiB level after
165-190 us (211 in one run). A write to every level, time after time, costs 13-38 us more than it did
(seven runs: 419-485 against 397-447): every page is looked at so that the next refreshes can spare.

The levels not read must hold what the memory does, and only the write watch says so. They are spared
- only in the write-watched branch of a refresh (the hash and guard paths read all of it), not for a
  bake, not for a texture with levels on demand, not with title memory in place, not under the timing
  modes of copies, and not where a write cannot be to some parts and not others: a 3D or multisampled
  texture, more than 64 parts, parts that all lie on the same pages;
- on a host whose write watch notes the first touch of a page taken anew, a read too (asked once, of
  a page of our own; Windows 11 26200 does);
- after a read of all of the texture that found every page in the working set as memory of the
  process's own, in one write-watched allocation;
- while every page of the spared levels still is, looked at in the order a read of all of it would
  come by them, and the kernel has no write to them that no asking has taken, before the read and
  after it;
- with no mapping changing when the write watch was asked (an even count) and none changed by the end
  of the read;
- for 16 refreshes in a row at most; the next one that finds a write reads all of it.
Anything else reads all of the texture, as before, through the same copy.

What neither this nor the base sees: a write whose note the title has the kernel drop (MEM_RESET and
OfferVirtualMemory, measured), memory given back and other write-watched memory taken at its address
between two of the looks, and bytes an unbuffered read of the kernel's lands after an asking took its
pages' note (measured: the pages are noted while the read is pending, and not again when it is done).
Before, such a level was read again with the next write anywhere in the texture; now with its own next
write, or with the read of all of it after 16 refreshes in a row that spared. Closing these needs the
runtime to tell the textures of a range (watch.rs and the HLE's memory calls), which this change may
not touch.

Tests. mod dirty_mip_detile_tests stages textures in write-watched memory on the host and, in a process
of its own, checks what each refresh read and that the staging buffer then holds every level as the
memory has it: ten checks with the switch on and one with it off, made one after another under one
test, so that one test waits for them. On the base nine of the ten fail (2,883,584 bytes read where
65,536 are due); scripts/red_green.py says red then green. mod written_parts_tests checks where a
part's bytes lie against detiling itself, and the kernel-facing helpers without a host. Printed as
SKIP, not failed, where there is no host or the write watch does not qualify.

After monte-alt/vesper 3cf0c18 (GPL-3.0), "Limit trusted dirty-mip reads to the selected texture span",
which reads one span from the first written level to the last with title memory held still. Here each
run of written levels is read by itself, title memory is not held, and what the buffer holds of the
spared levels is checked against the kernel's own account of the memory.

GPUs tested: NVIDIA GeForce RTX 3090, driver 32.0.16.1088, Windows 11 Pro 26200 (the tests' host; no
title was run).

AI-assisted: Claude Fable 5.2 (author); GPT-6.2 Astra (design audit, diff review and rubric);
Claude Opus 5.5 (separate read-only reviewer agent).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 09:09:09 +00:00
Author
Owner

@⁠Kal0s-design on GitHub · 2026-12-02 09:47 UTC · original

Windows 11, MSVC toolchain 1.98.1. Head 06998df00 merged into current main a917c54d6: the merge is clean. Unit tests only, no game.

The tests ran for real here, not as a skip. With --nocapture, the dirty_mip_detile and written_parts tests printed no SKIP on the hardware device or on WARP, so this host qualifies.

  • Red/green by mutation. I made partial_detile() answer false. the_levels_written_are_read_alone_and_all_of_a_texture_as_before then fails with 7 of its checks: a_written_page_has_its_level_read_and_detiled_alone, levels_written_apart_are_read_apart, a_texture_read_from_a_later_level_has_its_written_level_read_alone, a_written_level_that_cannot_all_be_read_has_the_whole_texture_read, a_level_taken_anew_is_read_again_with_the_next_write, a_texture_with_levels_on_demand_is_read_whole and a_write_the_write_watch_lost_is_read_with_the_whole_texture_in_its_turn. With the change: 4 passed, 1 ignored.
  • cargo test -p leonida-gpu --lib, in parallel: 695 passed, 0 failed, 60 ignored.
  • cargo test -p leonida-gpu --features diagnostics --lib, in parallel:
run result
hardware 776 passed
WARP (LEONIDA_D3D12_WARP=1) 776 passed
WARP + LEONIDA_D3D12_DEBUG=1 776 passed
LEONIDA_PARTIAL_DETILE=0 776 passed
  • cargo clippy -p leonida-gpu --features diagnostics --lib --tests: no warning in texture.rs.
  • python -I tools/d3d12_switches.py --check d3d12/docs/switches.md: exit 0.

Not checked: the release bench, and the game.

GPUs tested: one NVIDIA desktop card + WARP.

AI-assisted: yes (Claude Code).

**@⁠Kal0s-design** on GitHub · 2026-12-02 09:47 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7341500025) Windows 11, MSVC toolchain 1.98.1. Head `06998df00` merged into current `main` `a917c54d6`: the merge is clean. Unit tests only, no game. The tests ran for real here, not as a skip. With `--nocapture`, the `dirty_mip_detile` and `written_parts` tests printed no `SKIP` on the hardware device or on WARP, so this host qualifies. - **Red/green by mutation.** I made `partial_detile()` answer false. `the_levels_written_are_read_alone_and_all_of_a_texture_as_before` then fails with 7 of its checks: `a_written_page_has_its_level_read_and_detiled_alone`, `levels_written_apart_are_read_apart`, `a_texture_read_from_a_later_level_has_its_written_level_read_alone`, `a_written_level_that_cannot_all_be_read_has_the_whole_texture_read`, `a_level_taken_anew_is_read_again_with_the_next_write`, `a_texture_with_levels_on_demand_is_read_whole` and `a_write_the_write_watch_lost_is_read_with_the_whole_texture_in_its_turn`. With the change: 4 passed, 1 ignored. - `cargo test -p leonida-gpu --lib`, in parallel: 695 passed, 0 failed, 60 ignored. - `cargo test -p leonida-gpu --features diagnostics --lib`, in parallel: | run | result | |---|---| | hardware | 776 passed | | WARP (`LEONIDA_D3D12_WARP=1`) | 776 passed | | WARP + `LEONIDA_D3D12_DEBUG=1` | 776 passed | | `LEONIDA_PARTIAL_DETILE=0` | 776 passed | - `cargo clippy -p leonida-gpu --features diagnostics --lib --tests`: no warning in `texture.rs`. - `python -I tools/d3d12_switches.py --check d3d12/docs/switches.md`: exit 0. Not checked: the release bench, and the game. GPUs tested: one NVIDIA desktop card + WARP. AI-assisted: yes (Claude Code).
Author
Owner

@⁠lixonik on GitHub · 2026-12-02 11:39 UTC · original

Verified locally on Windows 10 22H2 + NVIDIA GeForce RTX 5070 12 GB (driver 621.40, 16C/32T desktop CPU), PR head 06998df00 merged cleanly onto main a252854a2:

  • Unit tests & clean-room:
    • cargo test -p leonida-gpu --locked --lib texture:: -- exit 0 (28 passed, 0 failed, 5 ignored measurement benchmarks).
    • python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/texture.rs d3d12/docs/switches.md -- exit 0.
  • Live in-run A/B verification (diag build diagnostics,dlss,mimalloc, Series S, -NoFrameGen -NoPrecompile, LEONIDA_AB=8,LEONIDA_PARTIAL_DETILE, 8 s turns, standing in-world, ~4,420 draws/frame):
    • Stability: 0 ERROR lines across 49 A/B phases (397 s total, 260 s in-world; overall 3000-4999 draws median 26.4 fps, texture refresh 0.5 ms / 2.3 MB per frame).
    • Paired end-to-end frame time (13 stationary consecutive pairs, phases 24-47):
Metric OFF median ON median Paired mean diff (95% CI) Paired median diff ON < OFF
Frame median (ms) 37.40 37.30 +0.03 +- 0.54 +0.10 5/13
Frame mean (ms) 38.10 37.80 -0.09 +- 0.67 0.00 6/13
Frame p90 (ms) 40.70 40.80 -0.72 +- 1.23 0.00 6/13
Submitting thread worked (ms) 32.40 32.00 -0.11 +- 0.49 0.00 6/13
Card idle / busy (ms) 11.60 / 26.10 11.50 / 26.10 -0.24 / +0.13 -0.20 / 0.00 8/13 / 6/13
Draws / frame 4,421 4,417 +24 +- 27 +8 4/13

Result: PASS -- unit tests pass, 0 runtime errors, and clean non-regression standing in-world (where per-frame texture detile load is only ~0.5 ms; larger gains are expected during heavy streaming/driving).

AI-assisted: yes (Antigravity).

**@⁠lixonik** on GitHub · 2026-12-02 11:39 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7344222408) Verified locally on Windows 10 22H2 + NVIDIA GeForce RTX 5070 12 GB (driver `621.40`, 16C/32T desktop CPU), PR head `06998df00` merged cleanly onto `main` `a252854a2`: - **Unit tests & clean-room:** - `cargo test -p leonida-gpu --locked --lib texture::` -- exit `0` (28 passed, 0 failed, 5 ignored measurement benchmarks). - `python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/texture.rs d3d12/docs/switches.md` -- exit `0`. - **Live in-run A/B verification (`diag` build `diagnostics,dlss,mimalloc`, Series S, `-NoFrameGen -NoPrecompile`, `LEONIDA_AB=8,LEONIDA_PARTIAL_DETILE`, 8 s turns, standing in-world, ~4,420 draws/frame):** - **Stability:** **0 `ERROR` lines** across 49 A/B phases (397 s total, 260 s in-world; overall 3000-4999 draws median **26.4 fps**, texture refresh `0.5 ms` / `2.3 MB` per frame). - **Paired end-to-end frame time (13 stationary consecutive pairs, phases 24-47):** | Metric | OFF median | ON median | Paired mean diff (95% CI) | Paired median diff | ON < OFF | |---|---|---|---|---|---| | Frame median (ms) | 37.40 | 37.30 | +0.03 +- 0.54 | +0.10 | 5/13 | | Frame mean (ms) | 38.10 | 37.80 | -0.09 +- 0.67 | 0.00 | 6/13 | | Frame p90 (ms) | 40.70 | 40.80 | -0.72 +- 1.23 | 0.00 | 6/13 | | Submitting thread worked (ms) | 32.40 | 32.00 | -0.11 +- 0.49 | 0.00 | 6/13 | | Card idle / busy (ms) | 11.60 / 26.10 | 11.50 / 26.10 | -0.24 / +0.13 | -0.20 / 0.00 | 8/13 / 6/13 | | Draws / frame | 4,421 | 4,417 | +24 +- 27 | +8 | 4/13 | Result: **PASS** -- unit tests pass, 0 runtime errors, and clean non-regression standing in-world (where per-frame texture detile load is only ~0.5 ms; larger gains are expected during heavy streaming/driving). AI-assisted: yes (Antigravity).
Author
Owner

@⁠MoonEyes on GitHub · 2026-12-02 18:12 UTC · original

Checked #3072: the switches registry passes merged onto current main (Linux); the Rust was reviewed at the level of its design, not built (Windows-only). The code is careful and tested, but it adds about 2,000 lines to a hot path, on by default, and the only in-game A/B shows no frame-time change.

Head 06998df00e
Merged onto main 45dc41f95c (clean merge tree bbeb07c30f; merge base a917c54d6a, 184 commits behind)
Size d3d12/crates/leonida-gpu/src/texture.rs +2,015 / -42, d3d12/docs/switches.md +11 / -10
Windows evidence Kal0s-design (red/green by forcing partial_detile() false: 7 checks fail; crate green on hardware, WARP, WARP + debug layer), lixonik (RTX 5070 / 621.40: unit tests, plus an in-run A/B with LEONIDA_AB=8,LEONIDA_PARTIAL_DETILE)

Ran (Linux, on an export of the merge tree with its own git init)

python -I tools/d3d12_switches.py --check d3d12/docs/switches.md   exit 0
python -I tests/test_d3d12_switches.py                              Ran 20 tests  OK

Review

  • The design is conservative where it has to be. Levels are spared only on the write-watched path; never for levels on demand, LEONIDA_INPLACE, copy-timing modes, 3D/MSAA, more than 64 parts, or a mapping change in flight (odd watch::changes()). Any failed check falls back to the old whole copy and detile, and at most SPARING = 16 sparing refreshes run in a row before a whole one. detile_parts still reports a failed detile, and the refresh then counts zero sparing. The switch is A/B-able, and =0 restores the old path.
  • The synthetic numbers in the description (2 to 12x faster per refresh of one level) are believable, but they are per texture refresh, and lixonik measured texture refresh at about 0.5 ms a frame standing in the world. The paired A/B there gives frame median +0.03 +- 0.54 ms, mean -0.09 +- 0.67 ms, ON faster in 5 and 6 of 13 pairs: no measurable change. The claimed benefit ("larger gains are expected during heavy streaming/driving") has not been measured.

Concern (engineering bar, not a bug). AGENTS.md asks for simple code on hot paths and for measured gains (docs/measuring_fps.md). This is about 2,000 lines of subtle invariants (working-set queries, non-resetting GetWriteWatch, epoch parity) whose failure mode is a stale texture level, on by default, without a measured frame-time gain. Before merging, I would ask for one of:

  1. an A/B by turns while driving or streaming, following docs/measuring_fps.md, that shows a gain; or
  2. default off (LEONIDA_PARTIAL_DETILE=1 to opt in) until such a run exists.

The monte-alt/vesper 3cf0c18 (GPL-3.0) attribution is compatible with d3d12/ (GPL-3.0-or-later).

Verdict: defects (needs a measured gain, or default off). No correctness defect found in what I read.

AI-assisted: Claude Opus 5.5 (Claude Code), review only.

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

**@⁠MoonEyes** on GitHub · 2026-12-02 18:12 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7354108167) **Checked #3072: the switches registry passes merged onto current `main` (Linux); the Rust was reviewed at the level of its design, not built (Windows-only). The code is careful and tested, but it adds about 2,000 lines to a hot path, on by default, and the only in-game A/B shows no frame-time change.** | | | |---|---| | Head | `06998df00e` | | Merged onto | `main` `45dc41f95c` (clean merge tree `bbeb07c30f`; merge base `a917c54d6a`, 184 commits behind) | | Size | `d3d12/crates/leonida-gpu/src/texture.rs` +2,015 / -42, `d3d12/docs/switches.md` +11 / -10 | | Windows evidence | Kal0s-design (red/green by forcing `partial_detile()` false: 7 checks fail; crate green on hardware, WARP, WARP + debug layer), lixonik (RTX 5070 / 621.40: unit tests, plus an in-run A/B with `LEONIDA_AB=8,LEONIDA_PARTIAL_DETILE`) | **Ran (Linux, on an export of the merge tree with its own `git init`)** ``` python -I tools/d3d12_switches.py --check d3d12/docs/switches.md exit 0 python -I tests/test_d3d12_switches.py Ran 20 tests OK ``` **Review** - The design is conservative where it has to be. Levels are spared only on the write-watched path; never for levels on demand, `LEONIDA_INPLACE`, copy-timing modes, 3D/MSAA, more than 64 parts, or a mapping change in flight (odd `watch::changes()`). Any failed check falls back to the old whole copy and detile, and at most `SPARING = 16` sparing refreshes run in a row before a whole one. `detile_parts` still reports a failed detile, and the refresh then counts zero sparing. The switch is A/B-able, and `=0` restores the old path. - The synthetic numbers in the description (2 to 12x faster per refresh of one level) are believable, but they are per texture refresh, and lixonik measured texture refresh at about 0.5 ms a frame standing in the world. The paired A/B there gives frame median +0.03 +- 0.54 ms, mean -0.09 +- 0.67 ms, ON faster in 5 and 6 of 13 pairs: no measurable change. The claimed benefit ("larger gains are expected during heavy streaming/driving") has not been measured. **Concern (engineering bar, not a bug).** AGENTS.md asks for simple code on hot paths and for measured gains (`docs/measuring_fps.md`). This is about 2,000 lines of subtle invariants (working-set queries, non-resetting `GetWriteWatch`, epoch parity) whose failure mode is a stale texture level, on by default, without a measured frame-time gain. Before merging, I would ask for one of: 1. an A/B by turns while driving or streaming, following `docs/measuring_fps.md`, that shows a gain; or 2. default off (`LEONIDA_PARTIAL_DETILE=1` to opt in) until such a run exists. The `monte-alt/vesper` `3cf0c18` (GPL-3.0) attribution is compatible with `d3d12/` (GPL-3.0-or-later). **Verdict: defects (needs a measured gain, or default off).** No correctness defect found in what I read. AI-assisted: Claude Opus 5.5 (Claude Code), review only. AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠zmasi on GitHub · 2026-12-02 18:32 UTC · original

Thanks @⁠MoonEyes — makes complete sense on the hot-path bar. Implemented Option 2 in 192640e94f (merged with current origin/main):

  • Switched partial_detile() from toggled! to asked!("LEONIDA_PARTIAL_DETILE"), so partial write-watched mip detiling is now off by default (default path 100% unchanged; LEONIDA_PARTIAL_DETILE=1 opts in, and LEONIDA_AB=<s,>LEONIDA_PARTIAL_DETILE still toggles it live for driving/streaming A/B runs).
  • Updated the dirty_mip_detile_tests / written_parts_tests child-process harness to test LEONIDA_PARTIAL_DETILE=1 alongside both unset (default-off) and =0, and regenerated d3d12/docs/switches.md.

Verified on 192640e94f:

  • cargo test --manifest-path d3d12/Cargo.toml -p leonida-gpu --lib texture:: -> 28 passed; 0 failed (and --features diagnostics texture::dirty_mip_detile_tests -> passed)
  • python -I tools/d3d12_switches.py --check d3d12/docs/switches.md & python -I tests/test_d3d12_switches.py -> 20/20 OK.
**@⁠zmasi** on GitHub · 2026-12-02 18:32 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7354763696) Thanks @⁠MoonEyes — makes complete sense on the hot-path bar. Implemented Option 2 in `192640e94f` (merged with current `origin/main`): - Switched `partial_detile()` from `toggled!` to `asked!("LEONIDA_PARTIAL_DETILE")`, so partial write-watched mip detiling is now **off by default** (default path 100% unchanged; `LEONIDA_PARTIAL_DETILE=1` opts in, and `LEONIDA_AB=<s,>LEONIDA_PARTIAL_DETILE` still toggles it live for driving/streaming A/B runs). - Updated the `dirty_mip_detile_tests` / `written_parts_tests` child-process harness to test `LEONIDA_PARTIAL_DETILE=1` alongside both unset (default-off) and `=0`, and regenerated `d3d12/docs/switches.md`. Verified on `192640e94f`: - `cargo test --manifest-path d3d12/Cargo.toml -p leonida-gpu --lib texture::` -> `28 passed; 0 failed` (and `--features diagnostics texture::dirty_mip_detile_tests` -> passed) - `python -I tools/d3d12_switches.py --check d3d12/docs/switches.md` & `python -I tests/test_d3d12_switches.py` -> `20/20` OK.
Switches partial_detile() from toggled! to asked! so LEONIDA_PARTIAL_DETILE is
off by default (LEONIDA_PARTIAL_DETILE=1 opts in; LEONIDA_AB still toggles it
live in diagnostics builds) until an in-game driving/streaming A/B shows a
frame-time gain, per review on #3072.

Updates the child-process test harness in texture.rs to verify both opt-in (=1)
and default-off (unset and =0), and regenerates d3d12/docs/switches.md on top
of current origin/main.
Author
Owner

@⁠icdmkg2 on GitHub · 2026-12-02 20:35 UTC · original

Third-party Windows verification of #3072 (D3D12-TEXTURE-DIRTY-MIP-DETILE) on opt-in head 192640e94

Follow-up Windows verification of the new opt-in head (LEONIDA_PARTIAL_DETILE switched to asked!, off by default).

  • Head / base: 192640e94faf050434da3889344774cbd609d17a merged cleanly (git merge --no-ff) onto origin/main b41763227.
  • Machine: NVIDIA GeForce RTX 5060 Laptop GPU (8 GB, Profile M laptop), driver 621.24 (32.0.16.2124), AMD Ryzen 7 H 260 w/ Radeon 780M, 32 GB RAM, Windows 11 10.0.26300.9974, rustc 1.98.1.
  • Scope: synthetic / D3D12 hardware + WARP + D3D12 debug-layer + switch-registry tests (no retail title run).

Results (MEASURED)

Check Result
python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/texture.rs d3d12/docs/switches.md exit 0
python -I tools/d3d12_switches.py --check d3d12/docs/switches.md exit 0
python -I tests/test_d3d12_switches.py 20/20 OK
LEONIDA_ADAPTER=5060 cargo test -p leonida-gpu --features diagnostics --locked --lib -- texture:: 28 passed, 0 failed, 6 ignored (exercises LEONIDA_PARTIAL_DETILE=1, unset default-off, and =0)
LEONIDA_ADAPTER=5060 + LEONIDA_D3D12_DEBUG=1 cargo test -p leonida-gpu --features diagnostics --locked --lib -- texture::dirty_mip_detile_tests 1 passed, 0 failed, 1 ignored
LEONIDA_D3D12_WARP=1 + LEONIDA_D3D12_DEBUG=1 (same dirty_mip_detile_tests command, --features diagnostics) 1 passed, 0 failed, 1 ignored

Code note (READ IN CODE)

  • partial_detile() now uses crate::asked!("LEONIDA_PARTIAL_DETILE"), keeping the default path unchanged unless explicitly opted in or toggled via LEONIDA_AB.

AI-assisted: Gemini 4 Neon (High) via Antigravity (test execution, diff review, and write-up).

**@⁠icdmkg2** on GitHub · 2026-12-02 20:35 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7357982053) **Third-party Windows verification of #3072 (`D3D12-TEXTURE-DIRTY-MIP-DETILE`) on opt-in head `192640e94`** Follow-up Windows verification of the new opt-in head (`LEONIDA_PARTIAL_DETILE` switched to `asked!`, off by default). - **Head / base:** `192640e94faf050434da3889344774cbd609d17a` merged cleanly (`git merge --no-ff`) onto `origin/main` `b41763227`. - **Machine:** NVIDIA GeForce RTX 5060 Laptop GPU (8 GB, Profile M laptop), driver `621.24` (`32.0.16.2124`), AMD Ryzen 7 H 260 w/ Radeon 780M, 32 GB RAM, Windows 11 `10.0.26300.9974`, `rustc 1.98.1`. - **Scope:** synthetic / D3D12 hardware + WARP + D3D12 debug-layer + switch-registry tests (no retail title run). ### Results (MEASURED) | Check | Result | |---|---| | `python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/texture.rs d3d12/docs/switches.md` | exit `0` | | `python -I tools/d3d12_switches.py --check d3d12/docs/switches.md` | exit `0` | | `python -I tests/test_d3d12_switches.py` | `20/20` OK | | `LEONIDA_ADAPTER=5060` `cargo test -p leonida-gpu --features diagnostics --locked --lib -- texture::` | `28 passed, 0 failed, 6 ignored` (exercises `LEONIDA_PARTIAL_DETILE=1`, unset default-off, and `=0`) | | `LEONIDA_ADAPTER=5060` + `LEONIDA_D3D12_DEBUG=1` `cargo test -p leonida-gpu --features diagnostics --locked --lib -- texture::dirty_mip_detile_tests` | `1 passed, 0 failed, 1 ignored` | | `LEONIDA_D3D12_WARP=1` + `LEONIDA_D3D12_DEBUG=1` (same `dirty_mip_detile_tests` command, `--features diagnostics`) | `1 passed, 0 failed, 1 ignored` | ### Code note (READ IN CODE) - `partial_detile()` now uses `crate::asked!("LEONIDA_PARTIAL_DETILE")`, keeping the default path unchanged unless explicitly opted in or toggled via `LEONIDA_AB`. AI-assisted: Gemini 4 Neon (High) via Antigravity (test execution, diff review, and write-up).
Author
Owner

@⁠EdenBendheim on GitHub · 2026-12-02 21:02 UTC · original

RUN (standalone RTX 3090 300 s stress gate + Windows red/green unit tests) — PASS covering exact head 192640e94faf050434da3889344774cbd609d17a.

  • Build & unit verification: Fast-forwardable / clean merge onto 80910637f (diagnostics,dlss,mimalloc, exe_sha16 = 7e7b83c6c34f6399; changed-file clean-room scan exit 0).
    • Behavioral red on base (80910637f): focused dirty-mip test read 2,883,584 bytes where it expected 65,536.
    • Green on merged tree: cargo test -p leonida-gpu --lib --locked -- --test-threads=1 passed 707 default / 788 with --features diagnostics.
  • Hardware & setup: Windows 11, Ryzen 9 5900X (32 GB RAM), NVIDIA GeForce RTX 3090 24 GB, driver 610.88, Series X profile, 2560x1440, -NoFrameGen, LEONIDA_PARTIAL_DETILE=1, scripts/game-gate.ps1 (301.9 s in world) with downtown street-level teleport + 8-leg dynamic sprint/turn/strafe stress mod (GATE CONTROL moved=1.10 m, max_from_ctrl=5,073.6 m).
Metric #3072 (LEONIDA_PARTIAL_DETILE=1, 7e7b83c6c34f6399) main b41763227 baseline (cf499737bf684f6a)
Gate verdict / exit PASS (clean, 0 reasons, 0 warnings) PASS (clean, 0 reasons, 0 warnings)
World time 301.9 s 305.6 s
Device lost / crashes / missed pipeline waits 0 / 0 / 0 0 / 0 / 0
Rendered FPS (median) / p95 frame time 20.45 FPS / 68.68 ms 19.13 FPS / 74.01 ms
Median draws/frame / longest present gap 7,812 / 6.885 s 7,983 / 2.358 s
Peak private commit / peak VRAM 38,148 MB / 15,560 MB 37,803 MB / 16,220 MB

Verdict: PASS for the 300 s standalone in-game gate on 192640e94 with LEONIDA_PARTIAL_DETILE=1 active. (Single-run stability gate; we also plan an in-process LEONIDA_AB=4,LEONIDA_PARTIAL_DETILE measurement next.)

(AI-assisted verification: gemini-4-neon + gpt-6.2-astra.)

**@⁠EdenBendheim** on GitHub · 2026-12-02 21:02 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7358707963) **RUN (standalone RTX 3090 300 s stress gate + Windows red/green unit tests)** — **PASS** covering exact head `192640e94faf050434da3889344774cbd609d17a`. - **Build & unit verification:** Fast-forwardable / clean merge onto `80910637f` (`diagnostics,dlss,mimalloc`, `exe_sha16 = 7e7b83c6c34f6399`; changed-file clean-room scan exit `0`). - **Behavioral red on base (`80910637f`):** focused dirty-mip test read `2,883,584` bytes where it expected `65,536`. - **Green on merged tree:** `cargo test -p leonida-gpu --lib --locked -- --test-threads=1` passed **`707`** default / **`788`** with `--features diagnostics`. - **Hardware & setup:** Windows 11, Ryzen 9 5900X (32 GB RAM), NVIDIA GeForce RTX 3090 24 GB, driver `610.88`, Series X profile, `2560x1440`, `-NoFrameGen`, **`LEONIDA_PARTIAL_DETILE=1`**, `scripts/game-gate.ps1` (`301.9 s` in world) with downtown street-level teleport + 8-leg dynamic sprint/turn/strafe stress mod (`GATE CONTROL moved=1.10 m`, `max_from_ctrl=5,073.6 m`). | Metric | `#3072` (`LEONIDA_PARTIAL_DETILE=1`, `7e7b83c6c34f6399`) | `main` `b41763227` baseline (`cf499737bf684f6a`) | |---|---:|---:| | Gate verdict / exit | **PASS** (`clean`, `0` reasons, `0` warnings) | **PASS** (`clean`, `0` reasons, `0` warnings) | | World time | `301.9 s` | `305.6 s` | | Device lost / crashes / missed pipeline waits | `0` / `0` / `0` | `0` / `0` / `0` | | Rendered FPS (median) / p95 frame time | `20.45 FPS` / `68.68 ms` | `19.13 FPS` / `74.01 ms` | | Median draws/frame / longest present gap | `7,812` / `6.885 s` | `7,983` / `2.358 s` | | Peak private commit / peak VRAM | `38,148 MB` / `15,560 MB` | `37,803 MB` / `16,220 MB` | **Verdict:** **PASS** for the 300 s standalone in-game gate on `192640e94` with `LEONIDA_PARTIAL_DETILE=1` active. *(Single-run stability gate; we also plan an in-process `LEONIDA_AB=4,LEONIDA_PARTIAL_DETILE` measurement next.)* *(AI-assisted verification: `gemini-4-neon` + `gpt-6.2-astra`.)*
Author
Owner

@⁠fiestorra on GitHub · 2026-12-02 23:47 UTC · original

VERIFY-3072 — Windows nativo: red then green en el interruptor

Own commit 192640e94 — texture.rs (+48/−…), docs/switches.md (4 lines)

Ran at the head

cargo test -p leonida-gpu --lib texture     60 passed; 0 failed; 8 ignored
  texture::written_parts_tests::a_part_s_bytes_are_all_that_detiling_reads_of_it ... ok
  texture::title_memory_tests::the_small_texture_of_runs_72_and_73_detiles_the_same_both_ways ... ok

Negative control (synthetic): I made partial_detile() return true unconditionally — the switch forced on, the opposite of what the pull request makes it — and rebuilt:

failed: ["with_the_switch_off_the_whole_texture_is_read"]
FAILED. 59 passed; 1 failed; 8 ignored

It bites, and the failing test's name says exactly what was broken: with the switch off, the whole texture must be read, and my mutation made "off" impossible.

What the change is: LEONIDA_PARTIAL_DETILE becomes opt-in by default — the switch is now crate::asked!(...), so unset means the old whole-texture read — and docs/switches.md says so. Turning a default off is the kind of change that needs a test on the unset path, and this one has it: the failing name is the unset path.

What I could not test: the detiling itself on a title's texture — the tests drive the parts/pages bookkeeping, and the run numbers quoted in the comments (72, 73) are the author's.

Written with an AI assistant.

**@⁠fiestorra** on GitHub · 2026-12-02 23:47 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7362421719) ## VERIFY-3072 — Windows nativo: `red then green` en el interruptor | | | |---|---| | Own commit | `192640e94` — `texture.rs` (+48/−…), `docs/switches.md` (4 lines) | **Ran at the head** ``` cargo test -p leonida-gpu --lib texture 60 passed; 0 failed; 8 ignored texture::written_parts_tests::a_part_s_bytes_are_all_that_detiling_reads_of_it ... ok texture::title_memory_tests::the_small_texture_of_runs_72_and_73_detiles_the_same_both_ways ... ok ``` **Negative control (synthetic)**: I made `partial_detile()` return `true` unconditionally — the switch **forced on**, the opposite of what the pull request makes it — and rebuilt: ``` failed: ["with_the_switch_off_the_whole_texture_is_read"] FAILED. 59 passed; 1 failed; 8 ignored ``` **It bites**, and the failing test's name says exactly what was broken: **with the switch off, the whole texture must be read**, and my mutation made "off" impossible. **What the change is**: `LEONIDA_PARTIAL_DETILE` becomes **opt-in by default** — the switch is now `crate::asked!(...)`, so **unset means the old whole-texture read** — and `docs/switches.md` says so. **Turning a default off is the kind of change that needs a test on the *unset* path**, and this one has it: the failing name is the unset path. **What I could not test**: the detiling itself on a title's texture — **the tests drive the parts/pages bookkeeping**, and the run numbers quoted in the comments (72, 73) are the author's. Written with an AI assistant.
Author
Owner

@⁠EdenBendheim on GitHub · 2026-12-03 02:16 UTC · original

Follow-up RTX 3090 paired performance verification on unchanged head 192640e94faf050434da3889344774cbd609d17a: two additional sequential in-game runs completed, one idle and one with sustained traversal. Both passed a 300 s world gate and exited cleanly with 0 crashes/device losses. This extends the stability report above; it does not establish an FPS gain.

Windows 11 Home build 26200, Ryzen 9 5900X, 32 GiB RAM, RTX 3090 24 GB, NVIDIA 610.88. Series X title upscaler, 2560x1440 output, no frame generation, warm cache, same restored save template, no concurrent build/test suite. LEONIDA_AB=4,LEONIDA_PARTIAL_DETILE; these are within-run neighboring off/on phase comparisons, not separate-run ABBA.

Condition World time Accepted pairs / draw-jump exclusions On minus off, median-frame effect ± SE Nominal 95% interval
Idle 302.7 s 14 / 14 -1.43 ± 0.71 ms [-2.96, +0.10] ms
Traversal 304.5 s 13 / 17 -1.54 ± 1.39 ms [-4.57, +1.49] ms

Traversal was verified from 25 post-teleport warm position samples over 240.7 s: at least 171.4 m traveled, with movement in every third of the analysis window. All 13 accepted pairs were bracketed by movement. The on-phases still averaged 269 ± 103 more draws/frame, so residual scene variation limits attribution. Idle submitting-thread work fell 1.10 ± 0.50 ms/frame; traversal work changed +0.41 ± 0.47 ms/frame.

Verdict: five-minute stability PASS in both runs; frame-time improvement inconclusive (both intervals include zero). One session per condition, no visual-correctness verdict and no isolated RAM-saving claim.

Provenance: historical staged source head above, recorded base 80910637f14f212553135e06907cae81ade1b46d, executable SHA-256 7e7b83c6c34f63992d855441fec119b9b9dbd51dc86a46ac6a99ab5b598fa244, features diagnostics,dlss,mimalloc. Launcher checkout b41763227; this is not a fresh integration test against today's main. Raw logs/captures remain private.

AI-assisted: GPT-6.2 Astra ran and analyzed the captures; GPT-6 Astra inspected the sanitized report and posted this follow-up.

**@⁠EdenBendheim** on GitHub · 2026-12-03 02:16 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7365283204) Follow-up RTX 3090 paired performance verification on unchanged head `192640e94faf050434da3889344774cbd609d17a`: two additional sequential in-game runs completed, one idle and one with sustained traversal. Both passed a 300 s world gate and exited cleanly with 0 crashes/device losses. This extends the stability report above; it does not establish an FPS gain. Windows 11 Home build 26200, Ryzen 9 5900X, 32 GiB RAM, RTX 3090 24 GB, NVIDIA 610.88. Series X title upscaler, 2560x1440 output, no frame generation, warm cache, same restored save template, no concurrent build/test suite. `LEONIDA_AB=4,LEONIDA_PARTIAL_DETILE`; these are within-run neighboring off/on phase comparisons, not separate-run ABBA. | Condition | World time | Accepted pairs / draw-jump exclusions | On minus off, median-frame effect ± SE | Nominal 95% interval | |---|---:|---:|---:|---:| | Idle | 302.7 s | 14 / 14 | -1.43 ± 0.71 ms | [-2.96, +0.10] ms | | Traversal | 304.5 s | 13 / 17 | -1.54 ± 1.39 ms | [-4.57, +1.49] ms | Traversal was verified from 25 post-teleport warm position samples over 240.7 s: at least 171.4 m traveled, with movement in every third of the analysis window. All 13 accepted pairs were bracketed by movement. The on-phases still averaged 269 ± 103 more draws/frame, so residual scene variation limits attribution. Idle submitting-thread work fell 1.10 ± 0.50 ms/frame; traversal work changed +0.41 ± 0.47 ms/frame. Verdict: five-minute stability PASS in both runs; frame-time improvement inconclusive (both intervals include zero). One session per condition, no visual-correctness verdict and no isolated RAM-saving claim. Provenance: historical staged source head above, recorded base `80910637f14f212553135e06907cae81ade1b46d`, executable SHA-256 `7e7b83c6c34f63992d855441fec119b9b9dbd51dc86a46ac6a99ab5b598fa244`, features `diagnostics,dlss,mimalloc`. Launcher checkout `b41763227`; this is not a fresh integration test against today's main. Raw logs/captures remain private. AI-assisted: GPT-6.2 Astra ran and analyzed the captures; GPT-6 Astra inspected the sanitized report and posted this follow-up.
Author
Owner

@⁠zmasi on GitHub · 2026-12-03 03:32 UTC · original

Merged origin/main (516c9eaabf) into 98a5322491 strictly to regenerate d3d12/docs/switches.md (needs rebase); d3d12/crates/leonida-gpu/src/texture.rs has a byte-identical diff against origin/main compared to 192640e94f (verified by @⁠EdenBendheim and @⁠fiestorra above).

AI-assisted: Gemini 4 Carbon (High) and Gemini 4 Neon (XHigh).

**@⁠zmasi** on GitHub · 2026-12-03 03:32 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7366676420) Merged `origin/main` (`516c9eaabf`) into `98a5322491` strictly to regenerate `d3d12/docs/switches.md` (`needs rebase`); `d3d12/crates/leonida-gpu/src/texture.rs` has a byte-identical diff against `origin/main` compared to `192640e94f` (verified by @⁠EdenBendheim and @⁠fiestorra above). AI-assisted: Gemini 4 Carbon (High) and Gemini 4 Neon (XHigh).
Author
Owner

@⁠MoonEyes on GitHub · 2026-12-03 04:29 UTC · original

RUN (in game, batch of two pull requests), each head merged with git merge --no-ff onto main 516c9eaab, in one build: #2789 b511f5c93, #3072 98a532249. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, -Resolution 1080, frame generation 2x, -PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (48 samples) median 16.6, mean 16.6
Rendered fps, last 120 s median 16.3
Time under 5 fps in the world 3 %

For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain.

Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it.

Limits: one run; arrival in the world was driven by keys and not checked on pictures; -PrecompileUsed was used, so the default start (every known pipeline precompiled) was not exercised. Both were in earlier batches on other heads; this run covers their current heads. #2789's discard of stale pipeline libraries only acts after a driver update; the driver did not change here, so that path was not exercised.

AI-assisted (Claude Code).

**@⁠MoonEyes** on GitHub · 2026-12-03 04:29 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7367708098) RUN (in game, batch of two pull requests), each head merged with `git merge --no-ff` onto main `516c9eaab`, in one build: #2789 `b511f5c93`, #3072 `98a532249`. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, `-Resolution 1080`, frame generation 2x, `-PrecompileUsed`, the same walking route as the other runs on this machine, 330 s after reaching the world. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (48 samples) | median 16.6, mean 16.6 | | Rendered fps, last 120 s | median 16.3 | | Time under 5 fps in the world | 3 % | For reference, the same machine and route rendered 13.3 to 17.2 fps on other batches in the last day. These fps are a check that nothing fell over, not a measurement of a gain. Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. Limits: one run; arrival in the world was driven by keys and not checked on pictures; `-PrecompileUsed` was used, so the default start (every known pipeline precompiled) was not exercised. Both were in earlier batches on other heads; this run covers their current heads. #2789's discard of stale pipeline libraries only acts after a driver update; the driver did not change here, so that path was not exercised. AI-assisted (Claude Code).
Author
Owner

@⁠merzleckeier on GitHub · 2026-12-03 04:42 UTC · original

Integration check on 98a532249 with #3291 at a643d5ae. Git reports one conflict in the generated d3d12/docs/switches.md. I regenerated it from the paired sources, then ran the stricter checker from #3270 and all 21 catalog tests successfully.

The combined tree builds the leonida-gpu test binary for x86_64-pc-windows-msvc. Under Wine, all five frame-time tests and the two CPU dirty-part tests run and pass. The kernel write-watch case printed SKIP because this host does not qualify, and the staging cases printed SKIP because no D3D12 host was available. This covers the paired source build, catalog, and CPU checks. AI-assisted with OpenAI Codex.

**@⁠merzleckeier** on GitHub · 2026-12-03 04:42 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7367964351) Integration check on `98a532249` with #3291 at `a643d5ae`. Git reports one conflict in the generated `d3d12/docs/switches.md`. I regenerated it from the paired sources, then ran the stricter checker from #3270 and all 21 catalog tests successfully. The combined tree builds the `leonida-gpu` test binary for `x86_64-pc-windows-msvc`. Under Wine, all five frame-time tests and the two CPU dirty-part tests run and pass. The kernel write-watch case printed `SKIP` because this host does not qualify, and the staging cases printed `SKIP` because no D3D12 host was available. This covers the paired source build, catalog, and CPU checks. AI-assisted with OpenAI Codex.
Author
Owner

@⁠zmasi on GitHub · 2026-12-03 11:32 UTC · original

Merged origin/main (6e97990505, #3318) into 0f1e26355e strictly to regenerate d3d12/docs/switches.md (needs rebase); d3d12/crates/leonida-gpu/src/texture.rs has a byte-identical diff against origin/main compared to 98a5322491.

AI-assisted: Gemini 4 Carbon (High) and Gemini 4 Neon (XHigh).

**@⁠zmasi** on GitHub · 2026-12-03 11:32 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7376848111) Merged `origin/main` (`6e97990505`, `#3318`) into `0f1e26355e` strictly to regenerate `d3d12/docs/switches.md` (`needs rebase`); `d3d12/crates/leonida-gpu/src/texture.rs` has a byte-identical diff against `origin/main` compared to `98a5322491`. AI-assisted: Gemini 4 Carbon (High) and Gemini 4 Neon (XHigh).
Author
Owner

@⁠MoonEyes on GitHub · 2026-12-03 14:32 UTC · original

RUN (in game, third party, batch of five pull requests), each head merged with git merge --no-ff onto main b053a1813, in one build: #2686 c5269801b, #2643 2e0b23a00, #2789 4cd9d71f8, #3072 0f1e26355, #2999 91537d2af. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, -Resolution 1080, frame generation 2x, -PrecompileUsed, the same walking route as the other runs on this machine, 330 s after reaching the world.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (46 samples) median 16.3, mean 16.4
Rendered fps, last 120 s median 16.2
Frames over 100 ms 21.3 per 1000; 2 pauses over 1 s
Time under 5 fps in the world 0 %

For reference, the same machine and route rendered 13.3 to 17.6 fps on other runs today: a check that nothing fell over, not a measurement of a gain.

Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. #2834 was left out of the batch (it conflicts with the others).

Limits: one run; arrival in the world was driven by keys and not checked on pictures. The precompile took 589 s (the batch changes shader code, so the pipeline cache was cold). Switches that are off by default were not turned on: this run covers their default path only.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠MoonEyes** on GitHub · 2026-12-03 14:32 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3072#issuecomment-7381603444) RUN (in game, third party, batch of five pull requests), each head merged with `git merge --no-ff` onto main `b053a1813`, in one build: #2686 `c5269801b`, #2643 `2e0b23a00`, #2789 `4cd9d71f8`, #3072 `0f1e26355`, #2999 `91537d2af`. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, `-Resolution 1080`, frame generation 2x, `-PrecompileUsed`, the same walking route as the other runs on this machine, 330 s after reaching the world. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (46 samples) | median 16.3, mean 16.4 | | Rendered fps, last 120 s | median 16.2 | | Frames over 100 ms | 21.3 per 1000; 2 pauses over 1 s | | Time under 5 fps in the world | 0 % | For reference, the same machine and route rendered 13.3 to 17.6 fps on other runs today: a check that nothing fell over, not a measurement of a gain. Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch, on the heads listed above. If one of these pull requests changes its head, this run no longer covers it. #2834 was left out of the batch (it conflicts with the others). Limits: one run; arrival in the world was driven by keys and not checked on pictures. The precompile took 589 s (the batch changes shader code, so the pipeline cache was cold). Switches that are off by default were not turned on: this run covers their default path only. AI-assisted (Claude Code, Claude Opus 5.5).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3072/head:github-bot/gh-3072'
git switch 'github-bot/gh-3072'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3072'
git switch 'github-bot/gh-3072'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3072'
git switch 'github-bot/gh-3072'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3072'
git switch 'main'
git merge --squash 'github-bot/gh-3072'
git switch 'main'
git merge --ff-only 'github-bot/gh-3072'
git switch 'main'
git merge 'github-bot/gh-3072'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!3072
No description provided.