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

Open
github-bot wants to merge 6 commits from github-bot/gh-3291 into main AGit
Owner

@⁠OreoFR on GitHub · 2026-12-03 04:01 UTC · original
OreoFR:perf/texture-frame-ms → main · +280 −9 · 3 files · 6 commits · open

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

**@⁠OreoFR** on GitHub · 2026-12-03 04:01 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3291) `OreoFR:perf/texture-frame-ms` → `main` · +280 −9 · 3 files · 6 commits · open 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)
The texture pass (State::heap_textures) runs once per list with its own
time (LEONIDA_TEXTURE_STAGE_MS, 250) and a byte budget per frame, so while
the world streams one frame's passes together could take far more than any
one of them. LEONIDA_TEXTURE_FRAME_MS=<ms> caps their sum (three times
during catch-up, as the span); what does not fit waits for the next frame.
Early runs and bakes keep their own budgets. Unset or 0: off, as before.

After TrustNo1/Darner DARNER_TEXSPK_PASS_MS (GPL-3.0-or-later; 8 ms in its
launcher), which measured 39.4 -> 47.0 fps walking on an RTX 4090. Unit
tests for the parsing and the span left; switches.md regenerated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	d3d12/docs/switches.md
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 04:05:45 +00:00
Author
Owner

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

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.

**@⁠merzleckeier** on GitHub · 2026-12-03 04:07 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3291#pullrequestreview-6163530329) · **reviewed** 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.
merzleckeier's review of 188fc7faf:
- [P2] heap_textures read SPENT_NS before its loop and charged it only on
  exit, so list workers running passes at once each got the full budget
  (two passes got 8 ms each and charged 12 ms), and a frame N pass ending
  after frame N+1 began charged frame N+1. FrameTime is now the one owner
  of the frame's time: one word, 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 at once share the cap; it settles against
  the frame it reserved from when it ends (FrameTimeGuard's Drop, on every
  return): unused time goes back, time past the slice (at most one slot)
  is charged, and a settle for a frame that has ended is dropped.
- [P2] The slice is reserved before the queue's preparation, so that
  preparation counts. A pass that finds the frame's time used up still does
  the slots' bookkeeping (it notes what changed), then stops before
  texture_slots_due's scan and sort and the census (counted in
  HEAP_TEXTURES_FRAME_SPENT); the slots stay due. The catch-up ceiling
  follows the backlog the last pass found. The switch's doc now calls it a
  soft limit, checked at slot boundaries. Unchanged with the switch unset.

Tests: texture_frame_tests (passes at once share one budget, also from 8
threads: 8 ms granted in all; a late pass charges its own frame only; a pass
over its slice is charged, an exhausted frame gives no slice, a catch-up
ceiling still has room, the next frame starts afresh). cargo test -p
leonida-gpu 720 passed; clippy -D warnings clean; switches.md unchanged and
checked. Counter-tests: without the reservation counted 3 tests fail, with
the late settle charged to the new frame 1 fails, with an empty slice
instead of none 2 fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠OreoFR on GitHub · 2026-12-03 04:15 UTC · original

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)

**@⁠OreoFR** on GitHub · 2026-12-03 04:15 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7367444570) 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)
Author
Owner

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

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.

**@⁠merzleckeier** on GitHub · 2026-12-03 04:17 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3291#pullrequestreview-6163611548) · **reviewed** 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.
merzleckeier's review of 288c4a81c: heap_textures reads frame::current()
before FrameTime::reserve, so a worker paused between the two could reserve
with an older frame after another worker had reserved for the next one, and
reserve took the older tag as a fresh frame: it reset the word and granted
the full budget, then the newer frame started over (frame 11 holding 3 ms, a
late frame-10 reserve took 8 ms, and the next frame-11 pass got 8 ms, not 5).

The frame in the word now only moves forward: a reserve whose frame is older
than the word's (FrameTime::older, a wrapping comparison of the 32-bit frame
numbers, so the empty word's u32::MAX is one before frame 0) gets nothing
and leaves the word alone; only a newer frame starts afresh.

Tests: a_late_reservation_of_an_ended_frame_gets_nothing (his case: None for
the late frame 10, 5 ms left for frame 11; the order across the 32-bit wrap).
cargo test -p leonida-gpu 721 passed, 59 ignored; clippy -D warnings clean.
With the older-frame check off the new test fails.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠OreoFR on GitHub · 2026-12-03 04:26 UTC · original

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)

**@⁠OreoFR** on GitHub · 2026-12-03 04:26 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7367647231) 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)
Author
Owner

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

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.

**@⁠merzleckeier** on GitHub · 2026-12-03 04:28 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7367684747) 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.
Author
Owner

@⁠fiestorra on GitHub · 2026-12-03 04:46 UTC · original

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.

**@⁠fiestorra** on GitHub · 2026-12-03 04:46 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7368036819) ## 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.**
Author
Owner

@⁠MoonEyes on GitHub · 2026-12-03 05:01 UTC · original

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).

**@⁠MoonEyes** on GitHub · 2026-12-03 05:01 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7368288290) 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).
Author
Owner

@⁠OreoFR on GitHub · 2026-12-03 06:23 UTC · original

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)

**@⁠OreoFR** on GitHub · 2026-12-03 06:23 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7369776394) 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)
HEAP_TEXTURES_FRAME_SPENT was counted but printed nowhere, so the A/B on
the 4070 could not say how often the ceiling stopped a pass. It is now in
the periodic stats line beside the other texture-queue counters.

Tests: cargo test -p leonida-gpu passes; clippy -D warnings clean.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠MoonEyes on GitHub · 2026-12-03 07:31 UTC · original

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** on GitHub · 2026-12-03 07:31 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7371096061) 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).
Author
Owner

@⁠MoonEyes on GitHub · 2026-12-03 15:30 UTC · original

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.

**@⁠MoonEyes** on GitHub · 2026-12-03 15:30 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3291#issuecomment-7383253078) 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 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/3291/head:github-bot/gh-3291'
git switch 'github-bot/gh-3291'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3291'
git switch 'github-bot/gh-3291'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3291'
git switch 'github-bot/gh-3291'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3291'
git switch 'main'
git merge --squash 'github-bot/gh-3291'
git switch 'main'
git merge --ff-only 'github-bot/gh-3291'
git switch 'main'
git merge 'github-bot/gh-3291'
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!3291
No description provided.