Test the default frame-generation limit mode #3295

Open
merzleckeier wants to merge 1 commit from upstream-pr/3295 into main
merzleckeier commented 2026-12-03 04:52:18 +00:00 (Migrated from github.com)

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


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.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5620220976 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3295). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T04:52:18Z. --- 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 (Migrated from github.com)

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


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7369216771 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3295#issuecomment-7369216771). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T05:53:00Z. --- 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T06:07:50Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7369486680 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3295#issuecomment-7369486680). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T06:07:50Z. --- ## 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TurboTheTurtle on 2026-12-03T06:20:22Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7369723710 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3295#issuecomment-7369723710). Originally posted by [TurboTheTurtle](https://github.com/TurboTheTurtle) on 2026-12-03T06:20:22Z. --- 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-03T06:40:04Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7370093457 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3295#issuecomment-7370093457). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-03T06:40:04Z. --- **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 (Migrated from github.com)

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


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7372607505 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3295#issuecomment-7372607505). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T08:41:28Z. --- 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.
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/3295:upstream-pr/3295'
git switch 'upstream-pr/3295'

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/3295'
git switch 'upstream-pr/3295'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3295'
git switch 'upstream-pr/3295'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3295'
git switch 'main'
git merge --squash 'upstream-pr/3295'
git switch 'main'
git merge --ff-only 'upstream-pr/3295'
git switch 'main'
git merge 'upstream-pr/3295'
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!3295
No description provided.