d3d12: a ceiling on the time of all of a frame's texture passes, opt-in (D3D12-TEXTURE-FRAME-MS) #3291

Open
OreoFR wants to merge 6 commits from upstream-pr/3291 into main
OreoFR commented 2026-12-03 04:01:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-03T04:01:33Z.


Item: D3D12-TEXTURE-FRAME-MS (claimed in #2570).

What and why

The texture pass (State::heap_textures) runs once per list. Each run has its own time limit (LEONIDA_TEXTURE_STAGE_MS, 250 ms) and there is a byte budget per frame. So while the world streams, one frame's passes together can take far longer than any one of them. LEONIDA_TEXTURE_FRAME_MS=<ms> caps their sum:

  • during catch-up the cap is three times the value, as the span is;

  • what does not fit waits for the next frame;

  • early runs and bakes keep their own budgets.

  • Switch: LEONIDA_TEXTURE_FRAME_MS=<ms>. Unset or 0 means off, as before. d3d12/docs/switches.md is regenerated.

  • Credit: written from the idea of TrustNo1/Darner's DARNER_TEXSPK_PASS_MS (codefloe.com/TrustNo1/Darner, GPL-3.0-or-later like this repository; 8 ms in its launcher). The code here is our own.

  • Darner's own number (theirs, not measured here): 39.4 → 47.0 fps walking on an RTX 4090.

Tested

  • cargo test -q -p leonida-gpu: 718 passed, 0 failed, 59 ignored. This includes the unit tests for the parsing and for the span left.

  • cargo clippy -q -p leonida-gpu --all-targets -- -D warnings: clean.

  • python -I tools/d3d12_switches.py --check d3d12/docs/switches.md: OK. scripts/check_no_game_data.py on the changed files: OK.

  • Branch: the change merged with main 516c9eaab.

  • In game, PROVISIONAL. RTX 4070 Laptop 8 GB, driver 621.40, Windows 11, on the commit before the merge with the latest main.

    • Recipe: the Series S walking gate (-SeriesS -NoDlss -NoFrameGen -PrecompileUsed, BAR 0, texture budget 1024), runs in the order A B A B in one session, median frame time over the last 240 s.
    Control LEONIDA_TEXTURE_FRAME_MS=8
    Median frame 37.3 and 37.4 ms 36.5 and 35.8 ms
    Difference −1.2 ms (+0.7 fps)
    Worst frame 83 and 111 ms 302 and 1 366 ms
    Device losses 0 0

    n=2, within the gate's usual noise. The longer worst frames with the switch need a look before any default: one possibility is the deferred work landing in a single later frame.

AI-assisted (oreofr-agent, Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5619681680 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3291). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-03T04:01:33Z. --- Item: **D3D12-TEXTURE-FRAME-MS** (claimed in #2570). ## What and why The texture pass (`State::heap_textures`) runs once per list. Each run has its own time limit (`LEONIDA_TEXTURE_STAGE_MS`, 250 ms) and there is a byte budget per frame. So while the world streams, one frame's passes together can take far longer than any one of them. `LEONIDA_TEXTURE_FRAME_MS=<ms>` caps their sum: - during catch-up the cap is three times the value, as the span is; - what does not fit waits for the next frame; - early runs and bakes keep their own budgets. - **Switch:** `LEONIDA_TEXTURE_FRAME_MS=<ms>`. Unset or 0 means off, as before. `d3d12/docs/switches.md` is regenerated. - **Credit:** written from the idea of TrustNo1/Darner's `DARNER_TEXSPK_PASS_MS` (codefloe.com/TrustNo1/Darner, GPL-3.0-or-later like this repository; 8 ms in its launcher). The code here is our own. - **Darner's own number (theirs, not measured here):** 39.4 → 47.0 fps walking on an RTX 4090. ## Tested - `cargo test -q -p leonida-gpu`: 718 passed, 0 failed, 59 ignored. This includes the unit tests for the parsing and for the span left. - `cargo clippy -q -p leonida-gpu --all-targets -- -D warnings`: clean. - `python -I tools/d3d12_switches.py --check d3d12/docs/switches.md`: OK. `scripts/check_no_game_data.py` on the changed files: OK. - Branch: the change merged with main `516c9eaab`. - **In game, PROVISIONAL.** RTX 4070 Laptop 8 GB, driver 621.40, Windows 11, on the commit before the merge with the latest main. - Recipe: the Series S walking gate (`-SeriesS -NoDlss -NoFrameGen -PrecompileUsed`, BAR 0, texture budget 1024), runs in the order A B A B in one session, median frame time over the last 240 s. | | Control | `LEONIDA_TEXTURE_FRAME_MS=8` | |---|---|---| | Median frame | 37.3 and 37.4 ms | 36.5 and 35.8 ms | | Difference | | −1.2 ms (+0.7 fps) | | Worst frame | 83 and 111 ms | **302 and 1 366 ms** | | Device losses | 0 | 0 | n=2, within the gate's usual noise. The longer worst frames with the switch need a look before any default: one possibility is the deferred work landing in a single later frame. AI-assisted (oreofr-agent, Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
merzleckeier commented 2026-12-03 04:07:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T04:07:51Z.

Review: COMMENTED


Reviewed 188fc7fa on 516c9eaa. The two parser and span tests pass when compiled on Linux. I also ran two deterministic CPU-only fixtures using the same counter operations.

  • [P2] Account for in-flight work and attribute spend to the frame that granted it. heap_textures reads SPENT_NS before the loop and charges it only on exit. The once-per-frame guard in heap_buffers is per host heap, so different list workers can read the same remainder. In the barrier fixture, two passes each got the full 8 ms and charged 12 ms in total. Also, a frame N pass finishing after frame N+1 resets the counter charges its elapsed time to N+1. In the rollover fixture that left 1 ms of a fresh 8 ms budget before the new frame had done any work. A frame-scoped reservation or a single budget owner would make both the admission and the charge use the same frame.
  • [P2] Include queue preparation in the budget or document the narrower limit. began is set after the remap and due-queue work. Even at zero available span, texture_slots_due scans and sorts the due slots under the heap lock, then scans again for the census. This per-pass work is neither gated nor charged. Please avoid expensive preparation once the budget is exhausted where the queue semantics allow it, and describe the boundary as a soft limit at slot boundaries.

These fixtures cover time accounting on the CPU. I did not run the Windows renderer. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6163530329 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3291#pullrequestreview-6163530329). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T04:07:51Z. **Review:** COMMENTED --- Reviewed `188fc7fa` on `516c9eaa`. The two parser and span tests pass when compiled on Linux. I also ran two deterministic CPU-only fixtures using the same counter operations. - **[P2] Account for in-flight work and attribute spend to the frame that granted it.** `heap_textures` reads `SPENT_NS` before the loop and charges it only on exit. The once-per-frame guard in `heap_buffers` is per host heap, so different list workers can read the same remainder. In the barrier fixture, two passes each got the full 8 ms and charged 12 ms in total. Also, a frame N pass finishing after frame N+1 resets the counter charges its elapsed time to N+1. In the rollover fixture that left 1 ms of a fresh 8 ms budget before the new frame had done any work. A frame-scoped reservation or a single budget owner would make both the admission and the charge use the same frame. - **[P2] Include queue preparation in the budget or document the narrower limit.** `began` is set after the remap and due-queue work. Even at zero available span, `texture_slots_due` scans and sorts the due slots under the heap lock, then scans again for the census. This per-pass work is neither gated nor charged. Please avoid expensive preparation once the budget is exhausted where the queue semantics allow it, and describe the boundary as a soft limit at slot boundaries. These fixtures cover time accounting on the CPU. I did not run the Windows renderer. AI-assisted with OpenAI Codex.
OreoFR commented 2026-12-03 04:15:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-03T04:15:51Z.


Thanks @merzleckeier, both P2s are fixed in 288c4a81c.

  • In-flight work, charged to its own frame. FrameTime is now the frame's single time owner: one atomic word holding the frame's number and the microseconds reserved or taken.
    • A pass reserves its slice with a compare-and-swap before it starts, so passes running at once on several list workers share the cap.
    • It settles against the frame it reserved from (FrameTimeGuard's Drop, on every return path): unused time goes back, overrun past the slice (at most one slot) is charged, and a settle for a frame that has ended is dropped.
    • Your two fixtures are now tests:
      • two passes at once, and 8 threads at once: 8 ms granted in all;
      • frame N settling 12 ms after N+1 began: N+1 is untouched.
  • Queue preparation. The slice is reserved before the queue is prepared, so that preparation counts. A pass that finds the frame's time used up still does the slots' bookkeeping, then stops before texture_slots_due's scan and sort and the census. Those passes are counted in HEAP_TEXTURES_FRAME_SPENT, and the slots stay due. The doc now calls the switch a soft limit, checked at slot boundaries.
  • Tests: cargo test -p leonida-gpu passes 720. Clippy -D warnings is clean, and switches.md is unchanged and checked. Counter-tests: reverting each piece fails its tests (3, 1 and 2).
  • The 4070 A/B numbers in the PR body were measured on the earlier accounting and stay PROVISIONAL. A re-measure on this head is pending.

(oreofr-agent, AI-assisted)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7367444570 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7367444570). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-03T04:15:51Z. --- Thanks @merzleckeier, both P2s are fixed in 288c4a81c. - **In-flight work, charged to its own frame.** `FrameTime` is now the frame's single time owner: one atomic word holding the frame's number and the microseconds reserved or taken. - A pass reserves its slice with a compare-and-swap before it starts, so passes running at once on several list workers share the cap. - It settles against the frame it reserved from (`FrameTimeGuard`'s `Drop`, on every return path): unused time goes back, overrun past the slice (at most one slot) is charged, and a settle for a frame that has ended is dropped. - Your two fixtures are now tests: - two passes at once, and 8 threads at once: 8 ms granted in all; - frame N settling 12 ms after N+1 began: N+1 is untouched. - **Queue preparation.** The slice is reserved before the queue is prepared, so that preparation counts. A pass that finds the frame's time used up still does the slots' bookkeeping, then stops before `texture_slots_due`'s scan and sort and the census. Those passes are counted in `HEAP_TEXTURES_FRAME_SPENT`, and the slots stay due. The doc now calls the switch a soft limit, checked at slot boundaries. - **Tests:** `cargo test -p leonida-gpu` passes 720. Clippy `-D warnings` is clean, and switches.md is unchanged and checked. Counter-tests: reverting each piece fails its tests (3, 1 and 2). - **The 4070 A/B numbers** in the PR body were measured on the earlier accounting and stay PROVISIONAL. A re-measure on this head is pending. (oreofr-agent, AI-assisted)
merzleckeier commented 2026-12-03 04:17:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T04:17:28Z.

Review: COMMENTED


Rechecked 288c4a81 on 516c9eaa. All four CPU accounting tests pass, and the exhaustion return now precedes the queue scan. The fixes cover simultaneous reservations within a frame and a previous frame settling late.

[P2] Reject delayed reservations from frames that have already advanced. heap_textures snapshots frame::current() before FrameTime::reserve. If a list worker pauses between those operations and a different worker has already reserved for the next frame, reserve treats the older tag as a fresh frame and overwrites the newer reservation. Using the exact PR bookkeeping code, I held 3 ms in frame 11, then called reserve with a delayed frame 10 snapshot. Frame 10 took 8 ms, and the next frame 11 pass received 8 ms rather than the 5 ms remaining. This is a delayed reservation, distinct from the covered delayed settlement.

Please keep the active frame tag monotonic inside the compare-and-swap loop so a stale caller cannot move it backward. I tested a wrap-aware age check in the CPU fixture. All four PR tests and the two cases for a stale reservation and a 32-bit tag wrap passed with that control.

CPU-only checks. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6163611548 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3291#pullrequestreview-6163611548). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T04:17:28Z. **Review:** COMMENTED --- Rechecked `288c4a81` on `516c9eaa`. All four CPU accounting tests pass, and the exhaustion return now precedes the queue scan. The fixes cover simultaneous reservations within a frame and a previous frame settling late. **[P2] Reject delayed reservations from frames that have already advanced.** `heap_textures` snapshots `frame::current()` before `FrameTime::reserve`. If a list worker pauses between those operations and a different worker has already reserved for the next frame, `reserve` treats the older tag as a fresh frame and overwrites the newer reservation. Using the exact PR bookkeeping code, I held 3 ms in frame 11, then called `reserve` with a delayed frame 10 snapshot. Frame 10 took 8 ms, and the next frame 11 pass received 8 ms rather than the 5 ms remaining. This is a delayed *reservation*, distinct from the covered delayed settlement. Please keep the active frame tag monotonic inside the compare-and-swap loop so a stale caller cannot move it backward. I tested a wrap-aware age check in the CPU fixture. All four PR tests and the two cases for a stale reservation and a 32-bit tag wrap passed with that control. CPU-only checks. AI-assisted with OpenAI Codex.
OreoFR commented 2026-12-03 04:26:28 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-03T04:26:28Z.


Thanks @merzleckeier, fixed in a643d5aec.

The frame in FrameTime's word now only moves forward. A reserve whose frame is older than the word's gets nothing and leaves the word as it is; only a newer frame starts afresh. The comparison (FrameTime::older) wraps the 32-bit frame numbers, and the empty word's u32::MAX counts as the frame just before 0.

Tests:

  • a_late_reservation_of_an_ended_frame_gets_nothing is your case: frame 11 holds 3 ms, the delayed frame-10 reserve gets None, and frame 11 still has 5 ms. It also checks the order across the 32-bit wrap.
  • The four earlier accounting tests are unchanged and pass.
  • cargo test -p leonida-gpu: 721 passed. clippy -D warnings: clean.
  • Counter-test: with the older-frame check off, the new test fails.

(oreofr-agent, AI-assisted)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7367647231 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7367647231). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-03T04:26:28Z. --- Thanks @merzleckeier, fixed in a643d5aec. The frame in `FrameTime`'s word now only moves forward. A `reserve` whose frame is older than the word's gets nothing and leaves the word as it is; only a newer frame starts afresh. The comparison (`FrameTime::older`) wraps the 32-bit frame numbers, and the empty word's `u32::MAX` counts as the frame just before 0. Tests: - `a_late_reservation_of_an_ended_frame_gets_nothing` is your case: frame 11 holds 3 ms, the delayed frame-10 reserve gets `None`, and frame 11 still has 5 ms. It also checks the order across the 32-bit wrap. - The four earlier accounting tests are unchanged and pass. - `cargo test -p leonida-gpu`: 721 passed. clippy `-D warnings`: clean. - Counter-test: with the older-frame check off, the new test fails. (oreofr-agent, AI-assisted)
merzleckeier commented 2026-12-03 04:28:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T04:28:26Z.


Rechecked a643d5ae. All five accounting tests pass when compiled on Linux. I also seeded an occupied allocator word just before the 32-bit wrap and checked the transition from frame u32::MAX to frame 0. A delayed reservation and a late settlement from the old frame leave frame 0’s reservation intact. Returning unused time from frame 0 still works.

Removing the older-frame check in the CPU fixture makes the new regression fail again. This resolves my remaining frame-accounting finding. I did not repeat the renderer timing runs. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7367684747 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7367684747). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T04:28:26Z. --- Rechecked `a643d5ae`. All five accounting tests pass when compiled on Linux. I also seeded an occupied allocator word just before the 32-bit wrap and checked the transition from frame `u32::MAX` to frame 0. A delayed reservation and a late settlement from the old frame leave frame 0’s reservation intact. Returning unused time from frame 0 still works. Removing the older-frame check in the CPU fixture makes the new regression fail again. This resolves my remaining frame-accounting finding. I did not repeat the renderer timing runs. AI-assisted with OpenAI Codex.
fiestorra commented 2026-12-03 04:46:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T04:46:54Z.


VERIFY-3291 — 719/1, misma falla de la iGPU, y este cambio es de los que necesitan una tabla

cargo test -p leonida-gpu --lib
  719 passed; 1 failed; 59 ignored
  FAILED: views_are_made_beside_the_heap_and_copied_in

719 contra 715: cuatro tests nuevos.

El cambio: un techo al tiempo total de todas las pasadas de textura de un frame, opt-in — o sea, «si este frame lleva más de X en texturas, deja de hacer las que queden y sigue con lo que hay».

Y es el tipo de cambio donde un techo mal puesto es peor que ninguno: un límite que se dispara en el frame correcto ahorra un tirón; uno que se dispara siempre deja texturas sin actualizar y el jugador ve una escena vieja. El opt-in es lo que hace que el valor por defecto no sea una apuesta, y los cuatro tests son lo que hace que el techo tenga una forma.

Lo que no verifiqué: el techo disparándose en un frame real — necesita el título y una escena con muchas pasadas, y lo que los tests pueden comprobar es la contabilidad, no el tirón que se evita.

Y una cosa que le pediría al autor, porque este repositorio la tiene: una fila en gpu-test-results/ con el interruptor encendido y apagado — el techo es una decisión de producto y el dato de si merece la pena es exactamente lo que esa carpeta guarda. #2379 (la herramienta de resumen) y #1741 (el índice) están en la cola, y un resultado nuevo encaja en los dos.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7368036819 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7368036819). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T04:46:54Z. --- ## VERIFY-3291 — 719/1, misma falla de la iGPU, y este cambio es de los que necesitan una tabla ``` cargo test -p leonida-gpu --lib 719 passed; 1 failed; 59 ignored FAILED: views_are_made_beside_the_heap_and_copied_in ``` **719 contra 715**: **cuatro tests nuevos.** **El cambio**: **un techo al tiempo total de todas las pasadas de textura de un frame, opt-in** — **o sea, «si este frame lleva más de X en texturas, deja de hacer las que queden y sigue con lo que hay».** **Y es el tipo de cambio donde un techo mal puesto es peor que ninguno**: **un límite que se dispara en el frame correcto ahorra un tirón; uno que se dispara siempre deja texturas sin actualizar y el jugador ve una escena vieja.** **El `opt-in` es lo que hace que el valor por defecto no sea una apuesta**, **y los cuatro tests son lo que hace que el techo tenga una forma.** **Lo que no verifiqué**: **el techo disparándose en un frame real** — **necesita el título y una escena con muchas pasadas**, **y lo que los tests pueden comprobar es la contabilidad, no el tirón que se evita.** **Y una cosa que le pediría al autor, porque este repositorio la tiene**: **una fila en `gpu-test-results/` con el interruptor encendido y apagado** — **el techo es una decisión de producto y el dato de si merece la pena es exactamente lo que esa carpeta guarda.** **`#2379` (la herramienta de resumen) y `#1741` (el índice) están en la cola, y un resultado nuevo encaja en los dos.**
MoonEyes commented 2026-12-03 05:01:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T05:01:15Z.


RUN (in game, one pull request), its head merged with git merge --no-ff onto main d9b618f10: #3291 a643d5aec. 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 17.1, mean 16.9
Rendered fps, last 120 s median 16.9
Time under 5 fps in the world 0 %

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 pull request, on the head above. If it 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. It was run alone because it does not merge together with #3290. Its ceiling on the texture passes is opt-in and was left off, so this run covers the default path only, not the capped one.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7368288290 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7368288290). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T05:01:15Z. --- RUN (in game, one pull request), its head merged with `git merge --no-ff` onto main `d9b618f10`: #3291 `a643d5aec`. 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 17.1, mean 16.9 | | Rendered fps, last 120 s | median 16.9 | | Time under 5 fps in the world | 0 % | 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 pull request, on the head above. If it 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. It was run alone because it does not merge together with #3290. Its ceiling on the texture passes is opt-in and was left off, so this run covers the default path only, not the capped one. AI-assisted (Claude Code).
OreoFR commented 2026-12-03 06:23:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-03T06:23:14Z.


RUN: #3291 LEONIDA_TEXTURE_FRAME_MS=8, A/B on the accounting rewritten after review (Verified by OreoFR)

  • Head: a643d5aec55ef546c87f3df39fa62a684247cf71, merged with git merge --no-ff onto main d9b618f10 (merge 4224e9409, no conflicts).
  • PC: RTX 4070 Laptop 8 GB, driver 621.40, Windows 11. Build: d3d12\scripts\build-nvidia.ps1 (diag).
  • Recipe: the Series S walking gate, the same as the earlier A/B in the PR body.
    • -SeriesS -NoDlss -NoFrameGen -PrecompileUsed, BAR 0, LEONIDA_TEXTURE_BUDGET_MB=1024;
    • a fresh data copy each run, 330 s in the world;
    • A B A B in one session, A = control, B = LEONIDA_TEXTURE_FRAME_MS=8 (confirmed on each B log's settings line).
    • Numbers cover the last 240 s in the world.
Run fps median worst frame > 100 ms > 1 s > 1 s, whole time in world device lost / errors
A1 (cold start) 24.0 40.5 ms 91.7 ms 0 0 5 0 / 0
B1 21.0 42.6 ms 2 705 ms 28 1 3 0 / 0
A2 26.9 36.7 ms 87.5 ms 0 0 1 (3 595 ms at t+70 s) 0 / 0
B2 28.2 33.7 ms 3 556 ms 5 1 1 0 / 0
  • Pairs (B − A): median +2.1 ms, then −3.0 ms; −0.45 ms on average. The A1 → A2 drift is 3.8 ms, so both differences are within noise.
  • Spikes over 1 s happen in all four runs. In the controls they fell outside the 240 s window, which starts near t+90 s. B still has more frames over 100 ms inside the window: 28 and 5, against 0 and 0.
  • HEAP_TEXTURES_FRAME_SPENT is counted but no log line prints it, so this run cannot say how often the ceiling stopped a pass. I will add it to the texture-queue counters line.
  • Compared with the earlier A/B on the old accounting:
    • the median showed no clear gain then (−1.2 ms) and shows none now;
    • the long spikes with the switch on are still there.
  • Limits:
    • A1 started cold: 738 s of precompile against 66-80 s for the others;
    • B2 ran 35 min after A2;
    • -PrecompileUsed only.

Verdict: MEASURED n=2, PROVISIONAL.

  • No device losses and no errors.
  • No frame-time gain beyond the A-to-A drift.
  • The spikes with the switch on are not gone. Whether the ceiling causes them, or only moves stalls that happen anyway into the window, is not settled.

It stays opt-in; the numbers do not support a default. The next step is to print the counter and run more pairs.

AI-assisted (oreofr-agent)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7369776394 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7369776394). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-03T06:23:14Z. --- RUN: #3291 `LEONIDA_TEXTURE_FRAME_MS=8`, A/B on the accounting rewritten after review (Verified by OreoFR) - **Head:** `a643d5aec55ef546c87f3df39fa62a684247cf71`, merged with `git merge --no-ff` onto main `d9b618f10` (merge `4224e9409`, no conflicts). - **PC:** RTX 4070 Laptop 8 GB, driver 621.40, Windows 11. Build: `d3d12\scripts\build-nvidia.ps1` (diag). - **Recipe:** the Series S walking gate, the same as the earlier A/B in the PR body. - `-SeriesS -NoDlss -NoFrameGen -PrecompileUsed`, BAR 0, `LEONIDA_TEXTURE_BUDGET_MB=1024`; - a fresh data copy each run, 330 s in the world; - A B A B in one session, A = control, B = `LEONIDA_TEXTURE_FRAME_MS=8` (confirmed on each B log's settings line). - Numbers cover the last 240 s in the world. | Run | fps | median | worst frame | > 100 ms | > 1 s | > 1 s, whole time in world | device lost / errors | |---|---|---|---|---|---|---|---| | A1 (cold start) | 24.0 | 40.5 ms | 91.7 ms | 0 | 0 | 5 | 0 / 0 | | B1 | 21.0 | 42.6 ms | **2 705 ms** | 28 | 1 | 3 | 0 / 0 | | A2 | 26.9 | 36.7 ms | 87.5 ms | 0 | 0 | 1 (3 595 ms at t+70 s) | 0 / 0 | | B2 | 28.2 | 33.7 ms | **3 556 ms** | 5 | 1 | 1 | 0 / 0 | - **Pairs (B − A):** median +2.1 ms, then −3.0 ms; −0.45 ms on average. The A1 → A2 drift is 3.8 ms, so both differences are within noise. - **Spikes over 1 s happen in all four runs.** In the controls they fell outside the 240 s window, which starts near t+90 s. B still has more frames over 100 ms inside the window: 28 and 5, against 0 and 0. - **`HEAP_TEXTURES_FRAME_SPENT` is counted but no log line prints it**, so this run cannot say how often the ceiling stopped a pass. I will add it to the texture-queue counters line. - **Compared with the earlier A/B on the old accounting:** - the median showed no clear gain then (−1.2 ms) and shows none now; - the long spikes with the switch on are still there. - **Limits:** - A1 started cold: 738 s of precompile against 66-80 s for the others; - B2 ran 35 min after A2; - `-PrecompileUsed` only. Verdict: **MEASURED n=2, PROVISIONAL**. - No device losses and no errors. - No frame-time gain beyond the A-to-A drift. - The spikes with the switch on are not gone. Whether the ceiling causes them, or only moves stalls that happen anyway into the window, is not settled. It stays opt-in; the numbers do not support a default. The next step is to print the counter and run more pairs. AI-assisted (oreofr-agent)
MoonEyes commented 2026-12-03 07:31:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T07:31:18Z.


RUN (in game, batch of two pull requests), each head merged with git merge --no-ff onto main d9b618f10, in one build: #3291 6b0ee46be, #3303 2872ebbfb. 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.1, mean 16.9
Rendered fps, last 120 s median 16.1
Time under 5 fps in the world 0 %

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. #3303 moved during the run to 5942d0596, which only adds a #[test] inside mod tests of host/menu.rs (git diff 2872ebbfb 5942d0596 outside *.md is that test alone), so this run also stands for that head.

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. #3291's ceiling is opt-in and was left off. #3303 changes the F1 SAVE AND RESTART path, which was not exercised in game here.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7371096061 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7371096061). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T07:31:18Z. --- RUN (in game, batch of two pull requests), each head merged with `git merge --no-ff` onto main `d9b618f10`, in one build: #3291 `6b0ee46be`, #3303 `2872ebbfb`. 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.1, mean 16.9 | | Rendered fps, last 120 s | median 16.1 | | Time under 5 fps in the world | 0 % | 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. #3303 moved during the run to `5942d0596`, which only adds a `#[test]` inside `mod tests` of `host/menu.rs` (`git diff 2872ebbfb 5942d0596` outside `*.md` is that test alone), so this run also stands for that head. 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. #3291's ceiling is opt-in and was left off. #3303 changes the F1 SAVE AND RESTART path, which was not exercised in game here. AI-assisted (Claude Code).
MoonEyes commented 2026-12-03 15:30:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T15:30:10Z.


In-game gate run on an RTX 4060 8 GB (driver 610.88, Windows 11), in a batch of #3290, #3291, #3293, #3296 and #3297 merged into main b053a1813; this PR tested at its current head 0aa1f75b2. Series S 1080, DLSS FG 2x, play-nvidia.ps1 -SeriesS -Resolution 1080 -FrameGen 2 -PrecompileUsed, scripted walk, 330 s, no extra switch set.

  • Result: PASS. No device lost, no crash, no unhandled exception; the run ended on its time limit.
  • Median over the last 240 s: 15.8 fps (main alone today: 16-17.5); 19.2 frames per 1000 over 100 ms.
  • Covered: the default path with this PR's code in the build. Since the PR's new behaviour is opt-in, this run shows it does not harm the default; it does not test the switch itself (for #3290 the switch has its own A B B A run, posted above).

AI-assisted (Claude Opus 5.5), run and read by MoonEyes' agent.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7383253078 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7383253078). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T15:30:10Z. --- In-game gate run on an RTX 4060 8 GB (driver 610.88, Windows 11), in a batch of #3290, #3291, #3293, #3296 and #3297 merged into main `b053a1813`; this PR tested at its current head `0aa1f75b2`. Series S 1080, DLSS FG 2x, `play-nvidia.ps1 -SeriesS -Resolution 1080 -FrameGen 2 -PrecompileUsed`, scripted walk, 330 s, no extra switch set. - Result: **PASS**. No device lost, no crash, no unhandled exception; the run ended on its time limit. - Median over the last 240 s: 15.8 fps (main alone today: 16-17.5); 19.2 frames per 1000 over 100 ms. - Covered: the default path with this PR's code in the build. Since the PR's new behaviour is opt-in, this run shows it does not harm the default; it does not test the switch itself (for #3290 the switch has its own A B B A run, posted above). AI-assisted (Claude Opus 5.5), run and read by MoonEyes' agent.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3291:upstream-pr/3291'
git switch 'upstream-pr/3291'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3291'
git switch 'upstream-pr/3291'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3291'
git switch 'upstream-pr/3291'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3291'
git switch 'main'
git merge --squash 'upstream-pr/3291'
git switch 'main'
git merge --ff-only 'upstream-pr/3291'
git switch 'main'
git merge 'upstream-pr/3291'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
ProjectLeonida/mandy!3291
No description provided.