Test the default frame-generation limit mode #3295

Merged
leonida/mandy
merzleckeier merged 2 commits from github-pr/3295 into main 2026-12-05 09:37:33 +00:00

Pull request successfully merged and closed

merzleckeier commented 2026-12-03 04:52:18 +00:00

Claimed in #2570 as D3D12-FG-LIMIT-DEFAULT-TEST.

Depends on #3062 (merged).

What and why

The launcher can set LEONIDA_FG_LIMIT_FPS=auto when it selects frame generation automatically. A typed -FrameGen can leave the variable unset. Since #3062 both inputs select the adaptive limit. Test that equivalence, including empty and padded, mixed-case inputs, and check that explicit 0 and 28 keep adaptation off.

The test calls the predicate used by the runtime’s existing OnceLock. It passes settings directly and leaves the process environment alone.

Tested

  • Built the Windows MSVC leonida-gpu test binary with the locked dependencies. All 18 fg:: tests passed under Wine 11.22.
  • The independent reviewer compiled the exact predicate and tests on Linux. Restoring the behavior from just before 69d30852c made the adaptive-default test fail on an unset variable. The reviewer also checked nine settings in fresh Linux processes, including non-Unicode input and the cache after an environment change.
  • All 20 switch-catalog tests passed. The catalog check, changed-file clean-room scan, and Git whitespace check passed.

GPUs tested: n/a (synthetic CPU-only tests).

AI-assisted: OpenAI Codex (GPT-6.2), independently reviewed read-only by GPT-6.2 Sol.

Checklist

  • Based on upstream main (d9b618f10).
  • One topic.
  • Synthetic fixtures only.
Claimed in [#2570](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7368065083) as D3D12-FG-LIMIT-DEFAULT-TEST. Depends on #3062 (merged). ### What and why The launcher can set `LEONIDA_FG_LIMIT_FPS=auto` when it selects frame generation automatically. A typed `-FrameGen` can leave the variable unset. Since #3062 both inputs select the adaptive limit. Test that equivalence, including empty and padded, mixed-case inputs, and check that explicit `0` and `28` keep adaptation off. The test calls the predicate used by the runtime’s existing `OnceLock`. It passes settings directly and leaves the process environment alone. ### Tested - Built the Windows MSVC `leonida-gpu` test binary with the locked dependencies. All 18 `fg::` tests passed under Wine 11.22. - The independent reviewer compiled the exact predicate and tests on Linux. Restoring the behavior from just before `69d30852c` made the adaptive-default test fail on an unset variable. The reviewer also checked nine settings in fresh Linux processes, including non-Unicode input and the cache after an environment change. - All 20 switch-catalog tests passed. The catalog check, changed-file clean-room scan, and Git whitespace check passed. GPUs tested: n/a (synthetic CPU-only tests). AI-assisted: OpenAI Codex (GPT-6.2), independently reviewed read-only by GPT-6.2 Sol. ### Checklist - [x] Based on upstream `main` (`d9b618f10`). - [x] One topic. - [x] Synthetic fixtures only.
MoonEyes commented 2026-12-03 05:53:00 +00:00

RUN (in game, one pull request, built together with another), its head merged with git merge --no-ff onto main d9b618f10, in one build with #3296 at efecc7f60: #3295 af01c295f. 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.4, mean 16.9
Rendered fps, last 120 s median 17.2
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. This pull request only adds a test, so the run shows that the game path is as it was with it merged, nothing more.

AI-assisted (Claude Code).

RUN (in game, one pull request, built together with another), its head merged with `git merge --no-ff` onto main `d9b618f10`, in one build with #3296 at `efecc7f60`: #3295 `af01c295f`. 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.4, mean 16.9 | | Rendered fps, last 120 s | median 17.2 | | 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. This pull request only adds a test, so the run shows that the game path is as it was with it merged, nothing more. AI-assisted (Claude Code).
fiestorra commented 2026-12-03 06:07:50 +00:00

VERIFY-3295 — después del merge de #3272 esta PR se quedó en 22 líneas, y son dos tests de fg.rs

La medí ayer como «15 ficheros, +2 936» y hoy su cambio propio es:

d3d12/crates/leonida-gpu/src/fg.rs   1 file changed, 22 insertions(+), 4 deletions(-)

Porque su base ya absorbió lo grande: #3272 fusionó el launcher y los 401 ficheros de i18n que yo estaba contando como «de esta PR» — eran de la rama donde está montada, no suyos. Es la trampa de la deriva de base al revés: ayer el diff apuntaba a 15 ficheros propios; hoy apunta a uno.

Lo que queda es pequeño y bueno:

cargo test -p leonida-gpu --lib fg::     18 passed

unset_and_auto_frame_limits_follow_the_render_rate — que comprueba None, "", " \t ", "auto" y " AuTo " — y numeric_frame_limits_leave_the_adaptive_limit_off.

Y los cinco valores del primero son la lección de esta noche entera en cinco líneas: un Option vacío, una cadena en blanco, y la misma palabra en tres capitalizaciones distintas. Es exactamente lo que #3272 (PLAY/PLAY) y mis propios defectos han tenido que aprender: una variable de entorno no llega «normalizada», llega como la escribió el jugador.

Lo que verifiqué ahora: 18 tests de fg en verde en su cabeza, y que su diff ya sólo toca fg.rs.
Lo que verifiqué antes del merge: 144 tests del launcher y 401 claves en los cuatro idiomas — que ahora son de main, y por eso los volví a correr allí.

Y la consecuencia práctica: ya no es «la PR grande del launcher»; es un PR de 22 líneas que puede entrar hoy.

## VERIFY-3295 — después del merge de `#3272` **esta PR se quedó en 22 líneas**, y son dos tests de `fg.rs` **La medí ayer como «15 ficheros, +2 936» y hoy su cambio propio es**: ``` d3d12/crates/leonida-gpu/src/fg.rs 1 file changed, 22 insertions(+), 4 deletions(-) ``` **Porque su base ya absorbió lo grande**: **`#3272` fusionó el launcher y los 401 ficheros de i18n que yo estaba contando como «de esta PR»** — **eran de la rama donde está montada, no suyos.** **Es la trampa de la deriva de base al revés**: **ayer el diff apuntaba a 15 ficheros propios; hoy apunta a uno.** **Lo que queda es pequeño y bueno**: ``` cargo test -p leonida-gpu --lib fg:: 18 passed ``` **`unset_and_auto_frame_limits_follow_the_render_rate`** — **que comprueba `None`, `""`, `" \t "`, `"auto"` y `" AuTo "`** — **y `numeric_frame_limits_leave_the_adaptive_limit_off`.** **Y los cinco valores del primero son la lección de esta noche entera en cinco líneas**: **un `Option` vacío, una cadena en blanco, y la misma palabra en tres capitalizaciones distintas.** **Es exactamente lo que `#3272` (`PLAY`/`PLAY`) y mis propios defectos han tenido que aprender**: **una variable de entorno no llega «normalizada», llega como la escribió el jugador.** **Lo que verifiqué ahora**: **18 tests de `fg` en verde en su cabeza, y que su diff ya sólo toca `fg.rs`.** **Lo que verifiqué antes del merge**: **144 tests del launcher y 401 claves en los cuatro idiomas** — **que ahora son de `main`, y por eso los volví a correr allí.** **Y la consecuencia práctica**: **ya no es «la PR grande del launcher»; es un PR de 22 líneas que puede entrar hoy.**
TurboTheTurtle commented 2026-12-03 06:20:22 +00:00

tested: the two new tests run and nothing else moves. Machine: Windows 11, NVIDIA GeForce RTX 5080, driver 621.47, hardware-accelerated GPU scheduling on, page file 49,152 MB, tree at e5c777734 (three d3d12/README.md commits on main d9b618f10).

cargo test --workspace --exclude xtask --locked in d3d12/ -> leonida-gpu 717 passed / 1 failed / 59 ignored against 715 / 1 on the base, so the default frame-generation limit mode adds exactly two assertions; the one failure is the known descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in, which passes with LEONIDA_VIEW_COPY=0. node --test tests/test_*.cjs -> 113 tests, 0 fail. Head af01c295f.

In case it helps the note in the table: on this card the limit follows the rendered rate, so the two paths read differently for the same picture - the automatic path lands at the 35.7 ms cadence and a typed -FrameGen 2, which leaves LEONIDA_FG_LIMIT_FPS unset, at 16.7 ms on the 60 Hz panel. Both are correct for their own path.

tested: the two new tests run and nothing else moves. Machine: Windows 11, NVIDIA GeForce RTX 5080, driver 621.47, hardware-accelerated GPU scheduling on, page file 49,152 MB, tree at `e5c777734` (three `d3d12/README.md` commits on main `d9b618f10`). `cargo test --workspace --exclude xtask --locked` in `d3d12/` -> `leonida-gpu` 717 passed / 1 failed / 59 ignored against 715 / 1 on the base, so the default frame-generation limit mode adds exactly two assertions; the one failure is the known `descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in`, which passes with `LEONIDA_VIEW_COPY=0`. `node --test tests/test_*.cjs` -> 113 tests, 0 fail. Head `af01c295f`. In case it helps the note in the table: on this card the limit follows the rendered rate, so the two paths read differently for the same picture - the automatic path lands at the 35.7 ms cadence and a typed `-FrameGen 2`, which leaves `LEONIDA_FG_LIMIT_FPS` unset, at 16.7 ms on the 60 Hz panel. Both are correct for their own path.
lixonik commented 2026-12-03 06:40:04 +00:00

Windows native verification -- PASS on head af01c295f (merged cleanly via git merge --no-ff onto main d9b618f10).

Checks (Windows 10 x64)

  • python -I scripts/check_no_game_data.py -> PASS
  • cargo test -p leonida-gpu --lib --locked fg:: -> test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 759 filtered out; finished in 0.00s
  • Test-only PR (confirmed new test compiles and passes cleanly on native Windows).

AI-assisted: yes (Antigravity -- Gemini 4 Neon).

**Windows native verification -- PASS** on head `af01c295f` (merged cleanly via `git merge --no-ff` onto `main` `d9b618f10`). ### Checks (Windows 10 x64) - `python -I scripts/check_no_game_data.py` -> **PASS** - `cargo test -p leonida-gpu --lib --locked fg::` -> **test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 759 filtered out; finished in 0.00s** - Test-only PR (confirmed new test compiles and passes cleanly on native Windows). AI-assisted: yes (Antigravity -- Gemini 4 Neon).
merzleckeier commented 2026-12-03 08:41:28 +00:00

Verified this head af01c295 together with the field-of-view change in #3111 b877dc5b, on main d9b618f1. The two branches merge cleanly even though both touch fg.rs. A Windows MSVC build under Wine 11.22 passed all 23 fg:: tests, including the two new default-limit tests here and the five FOV tests there. The run used synthetic fixtures. AI-assisted with OpenAI Codex.

Verified this head `af01c295` together with the field-of-view change in #3111 `b877dc5b`, on `main` `d9b618f1`. The two branches merge cleanly even though both touch `fg.rs`. A Windows MSVC build under Wine 11.22 passed all 23 `fg::` tests, including the two new default-limit tests here and the five FOV tests there. The run used synthetic fixtures. AI-assisted with OpenAI Codex.
Member

Merged by Moon's agent, on Moon's written authorization (two maintainers). Checked before merging: cargo test --locked -p leonida-gpu -p leonida-shader -p xtask green on main + this PR (1247 passed, 0 failed, Windows 11, RTX 4060; both new fg::limit_tests ok), check_no_game_data.py clean, a separate reviewer agent returned ACCEPT, and the in-game gate on RTX 4060 PASS 304 s (head 785a2c073, roam, no device loss, 15.3 fps, in the usual range; the only warning, fault_after_stop, predates this PR). Main is now d99bb4d7a0.

Merged by Moon's agent, on Moon's written authorization (two maintainers). Checked before merging: `cargo test --locked -p leonida-gpu -p leonida-shader -p xtask` green on main + this PR (1247 passed, 0 failed, Windows 11, RTX 4060; both new `fg::limit_tests` ok), `check_no_game_data.py` clean, a separate reviewer agent returned ACCEPT, and the in-game gate on RTX 4060 PASS 304 s (head 785a2c073, roam, no device loss, 15.3 fps, in the usual range; the only warning, `fault_after_stop`, predates this PR). Main is now `d99bb4d7a0`.
Sign in to join this conversation.
No description provided.