2 Commits

Author SHA1 Message Date
chrg6
712568d4fb Make the release 0.11.0: the release prepared and previewed as 0.10.2 takes this number, with its notes.
The user asked for the release to go out as 0.11.0. No final 0.10.2 was published: only the previews 0.10.2-rc1,
-rc3 and -rc4 carry that name, and the launcher counts 0.11.0 as newer than each of them, so testers are offered it
on either update channel.

VERSION holds 0.11.0 and the notes move to docs/releases/v0.11.0.md, with a line for those on a preview. Every line
that named 0.10.2 as the release in which something changed names 0.11.0 now: comments in the runtime, the two log
lines that give a version (the removed low-end GPU mode in cfg.c, the page generations in vk_memory.c),
nx2navi.ini.example, docs/building.md, the labels of tests/tex_release_check.c and a comment of
tests/audio_params_check.c. AUDIT.md names the release 0.11.0 throughout and records the earlier name and the
previews once, in its status line. Nothing else changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 09:24:25 -05:00
chrg6
7432f7375c Ask for the C runtime heap's summary before play only.
The memory report's system line asked for the heap's summary at every report until one was slow. The summary holds
the heap's lock, and every malloc of every thread with it, while it adds the heap up: 54 and 70 ms in two sessions
on an RTX 5090 PC, and the frame of the first report, 30 seconds into each session, took 55 to 82 ms, the longest
frame of play in both. One slow summary switched the question off, so every session paid for it once.

It is now asked for before play only (the boot and the title screen), and at every report with mem_census = 1,
which already accepts a late frame for the walk of the address space. In play the line gives what the runtime knows
it allocated, the same figure from one report to the next. The rule is in runtime/vk_mem_heap.h with
tests/mem_heap_check, which fails against the rule before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-14 08:53:26 -05:00
16 changed files with 162 additions and 42 deletions

View File

@@ -10,8 +10,10 @@ has been reviewed.
- Phase 3 (the eight passes): started 2026-11-10 and stopped at the user's request before its end. Section 12 says what is done and what is left.
- Phase 4 (fixes): started 2026-11-10 at the user's word; 17 fix commits, section 13 says which are verified.
- Phase 5: not started.
- Stability pass for 0.10.2: 2026-11-13 on branch `stability-pass` (worktree `E:\nx2pass`, cut from `next-0.10.0` at
- Stability pass for 0.11.0: 2026-11-13 on branch `stability-pass` (worktree `E:\nx2pass`, cut from `next-0.10.0` at
`f1a2a64e`), 225 commits to `87777fea`. Section 14 says what it did; its findings are F-1-13 to F-8-15 in section 8.
The release was planned as 0.10.2 until 2026-11-14 and its previews went out under that name (`0.10.2-rc1`, `-rc3`
and `-rc4`); it ships as 0.11.0, and this file names it so throughout.
Citations name our code by file and function; a `~line` after them is a hint taken at `ed36773d` and will drift.
Hashes in the stability pass's text are `stability-pass` commits; the older rows' hashes are the audit branch's
@@ -1164,7 +1166,7 @@ back.
**Texture cache eviction.**
- *Release overflow.* `sweep_released`: `RELEASED_MAX` 2048 entries, and `NX2NAVI_TEX_RELEASED_MB` (default
budget/32 clamped 384-1024 MiB since 0.10.2, `vk_tex_release.h` `trl_cap_mb`; before it RAM/32 clamped 512-2048
budget/32 clamped 384-1024 MiB since 0.11.0, `vk_tex_release.h` `trl_cap_mb`; before it RAM/32 clamped 512-2048
MiB, raised by budget/4 up to 8192).
- *Stale.* `drop_stale`: `STALE_FRAMES` 120 presents, `GPU_STALE_FRAMES` 1800.
- *Overwritten.* `drop_overwritten`: `OVERWRITTEN_KEEP` 600.
@@ -1433,7 +1435,7 @@ suspicion.
Phase 2 entered F-1-01 and F-1-02. Phase 3 (section 12, stopped before its end) added the rest. "Suspected" rows come from reading code and are not bugs until reproduced; "confirmed" rows name the run or tool output that shows them.
The stability pass for 0.10.2 (section 14) added F-1-13 to F-8-15: one row per finding its verifiers did not refute,
The stability pass for 0.11.0 (section 14) added F-1-13 to F-8-15: one row per finding its verifiers did not refute,
joined findings in one row, numbered within each pass by severity. Their Lead column says "stability pass" with the
pass's own ids (A-4, Fv-1, …; lane letter, then number; a `v` marks one the verifiers found), or names the second wave's
design or review that found it. A "re-check of" an older row means the pass found that row still open; both rows then
@@ -1532,7 +1534,7 @@ part `ccc31ad5`, F-4-01 `b933e3d9`, F-4-11 `e887a1d1`, F-6-01 `79661811`, F-6-03
| F-3-04 | S3 | Audio (18), Kernel (3) | `audio_mixer.c` change events (~1213-1218, ~1296, ~1365) | Each call of the audio device's change-event commands makes a new kernel event, which takes a slot of the handle table (`MAX_H` 4096, fatal when full) and is never closed; events past the 16th are never signalled | Each call of those commands. Handles grew 112 → 116 and 112 → 117 across one reload (section 11.3); which calls took them was not traced | suspected; the handle growth is measured, its source is not | One shared event per kind, as the other audio commands already use | Low | L-25 | **Stability pass:** fixed by `d3a5c3c3`, `ef2e5e24` (F-3-16). |
| F-3-05 | S3 | Services (5) | `ipc.c` domain objects (`objects[32]`, `ipc.h` ~54; CloseVirtualHandle ~428) | A domain's object table is never compacted and closing a virtual handle frees nothing; the 33rd object is answered with an unknown-command error | A domain session that opens and closes sub-objects repeatedly (the applet proxy), for instance at each return to the title | suspected; needs a run with `NX2NAVI_TRACE=ipc` counting the commands per title return | Free the slot on close and reuse it | Low | L-25 | **Stability pass:** fixed by `e9becc12`, `2c59addd` (F-3-17). |
| F-3-06 | S4 | Platform | `platform/win32.c` `sleep_timer` (~478), `plat_file_pread` / `plat_file_pwrite` events (~1267, ~1526), `plat_thread_detach` (~73) | Per-thread timer and event handles are never closed when a thread exits, and a detached thread's small record stays. One "save commit" thread per changed Commit and one "camera speed" thread per search leak about two handles each | Every save and every sensitivity change | suspected; tens per hour against a limit of millions | Close them when the thread ends | None | L-26 | **Stability pass:** fixed on `next-0.10.0` by `222a025c`; `tests/thread_end_check.py` covers it. |
| F-3-07 | S4 | GPU memory (12) | `vk_headroom.c` `room` (~112-120) | The headroom thread measures against the driver's budget, not the capped one, so under `NX2NAVI_VRAM_BUDGET_MB` it still keeps its spare blocks. A capped test run understates what a small card does | Any capped run | suspected (code read). The cap is a test switch | Compare against the smaller of the driver's budget and the cap | None outside capped runs | L-27 | **Stability pass:** changed after the 0.10.2 candidate: with a cap set, `room` also compares the device-local use with 85 % of the capped budget (`vk_mem_vram`), so a capped run keeps no spare block where the card it stands for keeps none. Without a cap nothing changes. Not run: a capped session is the user's to play. |
| F-3-07 | S4 | GPU memory (12) | `vk_headroom.c` `room` (~112-120) | The headroom thread measures against the driver's budget, not the capped one, so under `NX2NAVI_VRAM_BUDGET_MB` it still keeps its spare blocks. A capped test run understates what a small card does | Any capped run | suspected (code read). The cap is a test switch | Compare against the smaller of the driver's budget and the cap | None outside capped runs | L-27 | **Stability pass:** changed after the 0.11.0 candidate: with a cap set, `room` also compares the device-local use with 85 % of the capped budget (`vk_mem_vram`), so a capped run keeps no spare block where the card it stands for keeps none. Without a cap nothing changes. Not run: a capped session is the user's to play. |
| F-3-08 | S3 | Replay (11) | `vk_usnap.c` `vk_usnap_drop` (~433), `vk_usnap_begin` (~358), `arena_get` (~90) | With uniform snapshots switched off (`NX2NAVI_UBO_SNAPSHOT=0`, not the default) the GPU-write list is appended on every write and never pruned, and its linear scan slows without limit. In the default mode the list is pruned (199-250 entries at every snapshot) but the free arenas are never trimmed (3-6 arenas, 12-24 MiB measured) | Only with the switch off | suspected for the off mode; the default mode's sizes are measured and flat | Return early in `vk_usnap_drop` when snapshots are off; trim arenas idle for some submissions | None | L-29 | `3966d878`. Non-default mode only; not run in that mode. Not reproduced before, so not shown fixed. Regression: the route with the fixed exe: `p4_route` went through every segment with no FATAL and committed the save five times. Its frame rates cannot be compared with the baseline: the exe name is new and it has a pipeline cache folder of its own, so pipelines were still compiling on other threads (Kakariko 118.1 fps against 140.7; 17 frames over 25 ms in the 12 s after the reload, against 0 and 6) |
| F-3-09 | S4 | Replay (11) | `vk_exec_draw.c` `mesh_ring_entry` (~5044-5053), `mesh_count_buf` (~4990) | The allocation handles of the mesh ring (48 KiB) and the count buffer (16 KiB) are dropped, so neither is ever freed | Once per process | suspected; a fixed 64 KiB | Keep the handles and destroy them at shutdown | None | L-30 | **Stability pass:** fixed on `next-0.10.0` by `a8c6e992` (`mesh_ring_release`). |
| F-3-10 | S3 | Textures (13) | `vk_texture.c` `upload` (~2336-2342 with ~2272) | When a texture's storage is released during its upload it is uploaded as zeros, but the content hash already holds the bytes from before. If the game maps the same bytes back, `same_content` matches and the upload is skipped: the texture stays zero | Storage unmapped in the middle of an upload, then mapped again with equal content | suspected (code read) | Clear `chash_ok` whenever the bytes that reached the image are not the storage's (the same change as F-3-01) | Low | — | `054bd556`. Not reproduced before, so not shown fixed. Regression: the route with the fixed exe: `p4_route` went through every segment with no FATAL and committed the save five times. Its frame rates cannot be compared with the baseline: the exe name is new and it has a pipeline cache folder of its own, so pipelines were still compiling on other threads (Kakariko 118.1 fps against 140.7; 17 frames over 25 ms in the 12 s after the reload, against 0 and 6) |
@@ -1592,14 +1594,14 @@ part `ccc31ad5`, F-4-01 `b933e3d9`, F-4-11 `e887a1d1`, F-6-01 `79661811`, F-6-03
| F-5-01 | S3 | Textures (13) | `vk_texture.c` `alias_compatible` (~2567), `start_at` → `init_new` (~2755) | A new depth image made over a live depth target's memory starts cleared unless `depth_alias` is on and both are depth-only with one format; a shadow map that starts cleared shadows everything for one frame | The known one-frame dark shadow at the Castle Town gate | suspected cause of a known problem; `NX2NAVI_DEPTH_ALIAS_LOG=1` would line the dark frame up with an alias logged as cleared. Not run (the gate is not on the route) | Carry depth content across the alias for depth-stencil pairs and partial covers too | Rendering behaviour: needs the user's eye on the result | — | **Stability pass:** changed by `8bc23ea0` (a new depth image cleared at the replay's position; `depth_alias` is gone); unconfirmed here (F-5-03: the play-test at the gate). |
| F-5-02 | S2 | GPU memory (12) | `vk_memory.c` shadow storage (`shadow_sync_pool` ~1248, default on for the Linux build ~1676) | On the Linux build CPU-written pools reach the GPU through a per-submission snapshot; a write made after the snapshot goes with the next submission, so per-frame instance data can be one frame behind the buffers around it | The known foliage flicker on Linux with an AMD card | suspected cause of a known problem; cannot be run here (no Linux machine, no AMD card). `NX2NAVI_SHADOW=0` on that machine would tell this from the shader-side suspects in `docs/maxwell.md` | Depends on that test | — | — | **Stability pass:** changed: on Linux guest memory is imported through udmabuf (`eaf10677`), with shadow storage as the fallback. Untested on AMD Linux. |
| F-5-03 | S3 | Textures (13) | `vk_texture.c` `alias_compatible`, `init_new`, `depth_init_inline`, `init_image` | The gate's case changed since F-5-01: `8bc23ea0` clears a new depth image at the replay's position and `depth_alias` is gone; a new depth image over a live one still starts at depth 0 with no content | The Castle Town gate (a new depth descriptor over a live one about 40 times a second) | suspected (code read; a contributor counted 0 dark frames in 5,423 with the change against 12 in 2,728 without; not confirmed here) | Measure at the gate with `NX2NAVI_DEPTH_ALIAS_LOG=1`, `oq_hold` 0 and 1; carrying content or a 1.0 clear changes rendering | Rendering: needs the user's eye | stability pass C-11; re-check of F-5-01 | Open: play-test at the gate |
| F-5-04 | S3 | Shaders (14) | `gfx_shader.c` `carry_load`, `carry_find`, `carry_usable`, `carry_last`, `get_one`; `tools/make_game.py` `step_shaders` | After an update, translations carried from the 0.9.2 translator (identity 4d051299…) still clamp texture pool handles to slot 32767 for the session: the see-through ground with the fixed translator | An update whose shader step carries the old translations | suspected (the clamp shown by a probe through the old translator) | A carried translation whose pool array has the earlier length (32768) is not served: it is translated again, and served only where the current translator fails the shader | The first session after such an update translates those shaders once; a refused compute shader is translated while its dispatch waits | stability pass D-3; issues #569, #824 (brief section 5) | Fixed in the first wave under the user's request to fix issues #569 and #824 in 0.10.2 (the verifier had marked it for approval; it stays inside `gfx_shader.c`): `46c764a4`, `6c6e7b39`, `a47c6d69`, `d2e23ce9`. Not reproduced before; `carry_pool_check` passes. Play-test: the update from 0.10.1 |
| F-5-04 | S3 | Shaders (14) | `gfx_shader.c` `carry_load`, `carry_find`, `carry_usable`, `carry_last`, `get_one`; `tools/make_game.py` `step_shaders` | After an update, translations carried from the 0.9.2 translator (identity 4d051299…) still clamp texture pool handles to slot 32767 for the session: the see-through ground with the fixed translator | An update whose shader step carries the old translations | suspected (the clamp shown by a probe through the old translator) | A carried translation whose pool array has the earlier length (32768) is not served: it is translated again, and served only where the current translator fails the shader | The first session after such an update translates those shaders once; a refused compute shader is translated while its dispatch waits | stability pass D-3; issues #569, #824 (brief section 5) | Fixed in the first wave under the user's request to fix issues #569 and #824 in 0.11.0 (the verifier had marked it for approval; it stays inside `gfx_shader.c`): `46c764a4`, `6c6e7b39`, `a47c6d69`, `d2e23ce9`. Not reproduced before; `carry_pool_check` passes. Play-test: the update from 0.10.1 |
| F-5-05 | S3 | Upscaling and frame generation (17) | `vk_dlaa.c` `pb_images`, `pb_destroy`, `idle_release` | A picture size change cleared `PB.used` with the old prebloom images, so `idle_release` freed the new ones at the next present without a wait, while the frame that drew into them could still be in flight | `dlss_prebloom = 1` (off by default), each picture size change after the first 600 presents | suspected (code read); 'prebloom: the picture-size images went unused for 600 presents: freed' right after a resize would show it | Set `PB.used` again once the new images are made | None | stability pass, second wave, upscaler side finding 1 | Fixed: `c1498815`, `bede842d`. Not reproduced; compile check |
| F-5-06 | S3 | Upscaling and frame generation (17) | `vk_dlaa.c` `vk_ngxfg_evaluate` | Linux NGX frame generation releases `FG.feat` on the present thread at a backbuffer size or format change, with no regard to the previous present's command buffer, which may still be evaluating it | Linux with NGX frame generation and a resize or format change | suspected (code read) | A fence check before the release | Linux only | stability pass, second wave, upscaler side finding 2 | Open: outside the approved item |
| F-5-07 | S4 | Shaders (14), Textures (13) | `gfx_shader.c` `pool_short_note`, `mem_insert`; `vk_texture.c` `vk_texture_register` | No log line said a pool shader of the earlier translator's length was in use, or that registered slots 32768 and up are out of its reach | Carried old translations with the game's pool of 33,068 descriptors | suspected (code read) | Count such shaders and log once; log a registered slot of 32768-40959 while one is in use | None | stability pass D-9 | Fixed: `b04e7c85`. `carry_pool_check` passes |
| F-6-01 | S3 | In-game menu (21) | `menu_assets.c` `dicts_load` (~56-73, callers ~92, ~125) | The dictionaries are loaded lazily with no lock, and `ndicts` is set to 0 before the load: a second caller meanwhile sees "loaded, none" and gets nothing. The menu's fonts then fall back for the whole run, as the font read is tried once | The "menu-art" thread and the present path both asking during the first frames | suspected (code read). Not reproduced: 54 of 54 logs here show `menu: the game's interface fonts: text ClarimoUDPE, titles CetraDisplayPro` | Load once behind a `plat_once` | None | L-14 | `b4bfb7b6`. Not reproduced before (54 of 54 logs had the game's fonts). The fixed exe's runs show the game's fonts too. Not reproduced before, so not shown fixed. Regression: the route with the fixed exe: `p4_route` went through every segment with no FATAL and committed the save five times. Its frame rates cannot be compared with the baseline: the exe name is new and it has a pipeline cache folder of its own, so pipelines were still compiling on other threads (Kakariko 118.1 fps against 140.7; 17 frames over 25 ms in the 12 s after the reload, against 0 and 6) |
| F-6-02 | S3 | Launcher | `launcher/ui/app.py` `play_only` (~2175-2196) against `watch_game` (~1387-1399) | Started from the launcher, a fatal exit (codes 70, 71) shows the game's FATAL line; started from the Steam shortcut the launcher only logs the exit code, and the runtime raises no message itself: the window disappears | Any fatal exit of a game started from the shortcut, F-1-01 included | suspected (code re-read by the auditor) | Show the last FATAL line on codes 70 and 71 in `play_only` as well | Launcher only | — | **Stability pass:** fixed by `8f42883a` (F-6-08). |
| F-6-03 | S4 | Settings (8) | `nvn_api_obj.c` `nvnWindowAcquireTexture` (~833), `perf.c` `rt_knob` | `NX2NAVI_ACQUIRE_WAIT` is read with `rt_knob`, which maps every value but "0" and "ab" to 1 and "ab" to 2: the documented mode 2 cannot be chosen, and "ab" selects it instead of alternating | Setting the key to 2 or ab | suspected (code read); a diagnostics switch | Read it as a number | None | — | `4b47a10a`. The value 2 was not run. Not reproduced before, so not shown fixed. Regression: the route with the fixed exe: `p4_route` went through every segment with no FATAL and committed the save five times. Its frame rates cannot be compared with the baseline: the exe name is new and it has a pipeline cache folder of its own, so pipelines were still compiling on other threads (Kakariko 118.1 fps against 140.7; 17 frames over 25 ms in the 12 s after the reload, against 0 and 6). **Stability pass:** `7684734b` logs values other than 0, 1 and ab (F-6-15). |
| F-6-04 | S3 | Build kit and launcher, Shaders (14) | `tools/build_xlate.py` `main`, `check_built`, `source_identity`; `tools/make_launcher.py` `check_xlate`; `tools/make_release.py` `check_translator`; `tools/make_appimage.py`; `tools/make_kit.py` | The packaging guard against the 0.9.2 translator (the see-through ground) could be passed: `--id-only` wrote a matching id beside any exe, `make_release` hashed whatever prepared tree was in `build/xlate`, `make_appimage` and `make_kit` checked nothing, and `make_launcher` checked after the downloads and the deletion of `--out` | A release from a folder holding an old translator, or after a patch change without a rebuild | confirmed by probe: a 20-byte stand-in passed `check_xlate` after `--id-only` | `--id-only` removed; every packaging script calls `build_xlate.check_built` before any download or delete; `make_launcher` also asks the shipped translator for its texture pool length | Release tooling only. The exe build record (a sha256 beside the id) waits until after 0.10.2 | stability pass D-1, D-4, G-11, G-12; issues #569, #824 | Fixed in part (the exe build record of D-1 and G-12 waits until after 0.10.2): `f3d8f086`, `78bfb83b`, `ad0e934f`. `xlate_package_check` passes: it refuses the 0.9.2 translator beside a current id and passes `work\xlate_6866a13e` |
| F-6-04 | S3 | Build kit and launcher, Shaders (14) | `tools/build_xlate.py` `main`, `check_built`, `source_identity`; `tools/make_launcher.py` `check_xlate`; `tools/make_release.py` `check_translator`; `tools/make_appimage.py`; `tools/make_kit.py` | The packaging guard against the 0.9.2 translator (the see-through ground) could be passed: `--id-only` wrote a matching id beside any exe, `make_release` hashed whatever prepared tree was in `build/xlate`, `make_appimage` and `make_kit` checked nothing, and `make_launcher` checked after the downloads and the deletion of `--out` | A release from a folder holding an old translator, or after a patch change without a rebuild | confirmed by probe: a 20-byte stand-in passed `check_xlate` after `--id-only` | `--id-only` removed; every packaging script calls `build_xlate.check_built` before any download or delete; `make_launcher` also asks the shipped translator for its texture pool length | Release tooling only. The exe build record (a sha256 beside the id) waits until after 0.11.0 | stability pass D-1, D-4, G-11, G-12; issues #569, #824 | Fixed in part (the exe build record of D-1 and G-12 waits until after 0.11.0): `f3d8f086`, `78bfb83b`, `ad0e934f`. `xlate_package_check` passes: it refuses the 0.9.2 translator beside a current id and passes `work\xlate_6866a13e` |
| F-6-05 | S3 | Settings and logging (8) | `cfg.c` `cfg_load`, `add`, `cfg_bool`, `cfg_int` | `nx2navi.ini` values were taken unchecked: a trailing comment stayed in the value, `cfg_bool` read anything but 0 as on, out-of-range values passed, and nothing was logged | A hand-edited file: 'pace_smooth = 0 ; off', 'fullscreen = false', 'sharpness = 250' | confirmed by probe (`cfg.c` with stand-ins) | Log values outside their settings' sets, with the line they came from | None: log lines | stability pass F-7 | Fixed: `8c1ec424`. `cfg_parse_check` passes |
| F-6-06 | S3 | Settings and logging (8), Build kit and launcher | `cfg.c` `cut_comment`, `switch_of`, `cfg_bool`, `lowend_of`; `perf.c` `rt_knob`; `tools/make_game.py` `ini_choice`; `launcher/gameini.py` | Players' trailing comments and the words false, off and no turned settings on or broke them (as F-7) | As F-7 | confirmed (probe) | Cut a comment after a value that has a list of choices or a range; settings whose values are 0 and 1 take off, false, no and on, true, yes; `make_game.py`'s readers agree | Changes what existing files do, pacing and presentation keys included (approved) | stability pass F-8 | Fixed with approval: `b6709da8`, `8c9011d5`, `4fe13391`. `cfg_parse_check`, `rt_knob_check`, `launcher_test` pass. Play-test: an ini with comments |
| F-6-07 | S3 | Build kit and launcher | `launcher/ui/app.py` `EXIT_CODES`, `game_end`, `watch_game` | The launcher explained exit code 72 (a lost device) with neither its meaning nor the game's FATAL line | Any device-lost end (the RX 6600 logs) | confirmed (the field logs end with the bare code 72) | Codes 70, 71 and 72 show the FATAL line; 72 has a text that fits without one too | Launcher text only | stability pass G-1 | Fixed: `8de99df6`. Not reproduced in the launcher; `launcher_test` passes |
@@ -1612,13 +1614,13 @@ part `ccc31ad5`, F-4-01 `b933e3d9`, F-4-11 `e887a1d1`, F-6-01 `79661811`, F-6-03
| F-6-14 | S4 | Settings and logging (8), Device and present (16) | `cfg.c` `default_number`; `gfx_present.c` `gfx_cfg_window_size` | Both read `cfg_meta()` without a NULL check; the window-size fallback ignores the device profile | Unreachable today for `default_number`; an unparsable window size on a Steam Deck | confirmed by test (`cfg_int` of an unset row's key crashed the check program) | NULL checks; the profile's fallback needs approval | None for the checks | stability pass F-20 | Fixed (the NULL checks): `153295b6`. `cfg_parse_check` failed before and passes. The Deck fallback waits for the user's word |
| F-6-15 | S4 | Settings and logging (8) | `perf.c` `rt_knob` | `rt_knob` read every value but 0 and ab as 1, silently | 'cache_die = off' | confirmed (code) | Log once per switch; F-8 reads the words | None | stability pass F-21; F-6-03 | Fixed: `7684734b` (the words: `b6709da8`). `rt_knob_check` passes |
| F-6-16 | S4 | Build kit and launcher | `launcher/build.py` `game_running` | `game_running` took an exe the user cannot write for a running game, so the launcher refused Play, Steam play and rebuilds for good | An ACL or Controlled Folder Access denying writes to `ocarina.exe` | confirmed (probe with a scratch exe) | Only a sharing violation means running; access denied is logged | Launcher only | stability pass G-4 | Fixed: `01057202`. `launcher_test` passes |
| F-6-17 | S4 | Build kit and launcher | `rel_next.sh` (the coordinator's scratch, outside the repository) | `rel_next.sh` would package `f1a2a64e` from `E:\nx2pl5` as 0.10.1 with 0.10.1's notes, not 0.10.2 | Running it to make 0.10.2 | confirmed (script read) | A corrected script with a preflight; it must also pass the rebuilt `nx2navi_dlssg.dll` (A-16) | Packaging only; publishing needs the user's word | stability pass G-5 | Not in the repository: waits for the user's word on the release |
| F-6-17 | S4 | Build kit and launcher | `rel_next.sh` (the coordinator's scratch, outside the repository) | `rel_next.sh` would package `f1a2a64e` from `E:\nx2pl5` as 0.10.1 with 0.10.1's notes, not 0.11.0 | Running it to make 0.11.0 | confirmed (script read) | A corrected script with a preflight; it must also pass the rebuilt `nx2navi_dlssg.dll` (A-16) | Packaging only; publishing needs the user's word | stability pass G-5 | Not in the repository: waits for the user's word on the release |
| F-6-18 | S4 | Recompiler (1) (tests) | `tests/movie_timeline_check.py` `main` | The check asserted that the movie timestamp sites belong to set `ostep`; they moved to `omovie` (`70c99357`) | Every run | confirmed: it failed at `f1a2a64e` | Point it at `omovie` | None: a test | stability pass G-8, E-16 | Fixed: `e5632aea`. It passes |
| F-6-19 | S4 | Build kit and launcher | `tools/check_platform.py` `scan` | `check_platform.py` failed on 12 runtime files whose Win32 use sits in Windows-only branches, so it guarded nothing | Every run | confirmed (it failed at `f1a2a64e`) | Skip the Windows-only branches | None | stability pass G-13 | Fixed: `56db0d48`. `check_platform_test` passes |
| F-6-20 | S4 | Build kit and launcher | `tools/check_isa.py` `DISPATCHED` | `kern_ap_stub_ymm` was not listed as dispatched, so the `--cpu v2` check failed on every build | `tools/build_game.py --cpu v2` | confirmed (objdump of 0.10.0's runtime) | List it | None | stability pass G-14 | Fixed: `6b051eea`. `check_isa_test` passes |
| F-6-21 | S4 | Build kit and launcher, Recompiler (1) | `tools/make_game.py` `modules_c`; `recomp/layout.py` `write` | The generated `modules.c` and `layout.h` carried no `GENERATED_MARKER`, so `check_content` would not refuse them in a commit | Copying a gen folder into the repository | confirmed (code) | Mark `modules.c`; `layout.h` waits for a release that changes `recomp/` anyway (a full re-lift for every player) | Every install recompiles `modules.c` once | stability pass G-15 | Fixed in part: `5f90486c`. The `layout.h` half is open |
| F-6-22 | S4 | Build kit and launcher | `launcher/cli.py` `run` (update) | `launcher.cli update` switched to the new version without checking whether the game runs | The command-line update while the game runs | suspected (code read) | Refuse it while the game runs, as the window does | None | stability pass G-16 | Fixed: `73d6c8ff`. `launcher_test` passes |
| F-6-23 | S4 | Build kit and launcher | `launcher/native/nx2navi.c` `swap_python`; `launcher/jobs.py` `BackgroundUpdate.install` | The stub's Python swap can fail while a Steam `--play` process still runs from `python/`, so a release starts on the wrong Python | A release that brings a new Python, installed right after a Steam-started game closes | suspected; 0.10.2 keeps the same Python | None for 0.10.2; retry the swap when a release next changes the Python | — | stability pass G-17 | Not fixed, by decision |
| F-6-23 | S4 | Build kit and launcher | `launcher/native/nx2navi.c` `swap_python`; `launcher/jobs.py` `BackgroundUpdate.install` | The stub's Python swap can fail while a Steam `--play` process still runs from `python/`, so a release starts on the wrong Python | A release that brings a new Python, installed right after a Steam-started game closes | suspected; 0.11.0 keeps the same Python | None for 0.11.0; retry the swap when a release next changes the Python | — | stability pass G-17 | Not fixed, by decision |
| F-6-24 | S4 | Build kit and launcher | `tools/cheats.py` `BASE` | `cheats.py` hard-coded main's base instead of taking it from `recomp/layout.py` | A change of the layout | suspected (code read) | Take `FIRST_BASE` | Installs with code cheats lift once more | stability pass G-18 | Fixed: `a0fd6edc`. `launcher_test` passes |
| F-6-25 | S4 | Build kit and launcher | `launcher/ui/app.py` `play_only`; `launcher/jobs.py` `running_job` | Play from the Steam shortcut started the game while the launcher window ran a job in the game folder (a rebuild, an update, a mods build) | The Steam shortcut during such a job | suspected (code read) | Try the launcher folder's lock; a running job gets a message box | Launcher only | stability pass Gv-1 | Fixed: `814c10b3`. `launcher_test` passes |
| F-7-01 | S3 | NVN front end (10), Replay (11) | `nvn_api_core.c` `nvnQueueSubmitCommands` (~670-677, `NX2NAVI_SUBMIT_FINISH`, default mask 1), `nvn_api_obj.c` `nvnWindowAcquireTexture` (~832-843, `NX2NAVI_ACQUIRE_WAIT`) | Every frame the game's thread waits for the GPU to run the frame's first submission, and again at the acquire for the image's last present. While the GPU is ahead the waits are short; when the GPU is the slower side they make the CPU frame wait for it | Every frame; the cost should grow at high frame rates or with a loaded GPU | suspected; not determined. The A/B was started and is not valid: the run folder's pipeline state changed under it (F-4-11) and three of its runs lost the device (F-1-11). The one finished pair reads 99.9 fps with the waits and 121.1 without the submit wait in the day field, but the first run also carried more background pipeline builds. The comments say the submit wait prevents white frames in dialogue (3 % of frames without it) and the acquire wait is mostly covered by it | Depends on a valid A/B: drop the acquire wait when the submit wait is on, or wait on the passes' timeline | Changes when frames are drawn against the game's data rewrites (the white-frame case): ask the user first | L-31 | **Stability pass:** still open and not measured; `7b3edac1` times the GPU's parts of frames that waited 20 ms or more. |
@@ -2468,12 +2470,12 @@ The stability pass (section 14) brought this list up to date; the rows it names
- F-1-27 (C-4) landed in the first wave on the coordinator's call although its verifier marked it for approval: it
crosses `dispatch.c`, `vk_device.c` and the platform layer, and the exit codes stay 70 and 72. Keep it, or take it
back (`8f952d28`; not a plain revert: later exit fixes call its `plat_terminate`). F-5-04 landed under the user's
request to fix issues #569 and #824 in 0.10.2, which it completes for installs updated from 0.10.0 or 0.10.1.
request to fix issues #569 and #824 in 0.11.0, which it completes for installs updated from 0.10.0 or 0.10.1.
- F-4-12's option (a): no limit in RTSS's profile during every movie, so that RTSS cannot hold the catch-up frames at
the default limit of 60 (a one-character change in `rtss_decide.h` `rtss_target`, with two test cases).
- F-6-12: a settings table larger than 512 keys; F-6-14: the Steam Deck's window-size fallback; F-4-41: a cap on the
GPU-drawn textures per hard-count batch, once its timing is known; F-1-33: making the surface again after it is lost.
- F-6-17: the 0.10.2 release itself, with the corrected release script and an `nx2navi_dlssg.dll` rebuilt from this tree
- F-6-17: the 0.11.0 release itself, with the corrected release script and an `nx2navi_dlssg.dll` rebuilt from this tree
(a release now refuses the 0.8.0 one, F-4-17).
**Measure first** (a probe run or the play-test, section 14): F-4-13 (RTSS's sleep under the queue lock), F-4-30
@@ -2497,13 +2499,13 @@ F-8-03 (a pad that disappears), F-8-12 (the item jingle: locate it first), F-4-4
generation's values against the hook thread), F-5-06 (Linux NGX frame generation's release), F-3-19 (the camera search
and the lazy heap), F-4-36's refinement, F-6-21's `layout.h` half (for a release that changes `recomp/` anyway),
F-1-36's second part (the owner of every lock and each thread's wait site in the hang report), and F-6-04's exe
build record (after 0.10.2).
build record (after 0.11.0).
- Not fixed, by decision: F-2-16 (AMD Anti-Lag's switch-off), F-2-19 (`ov_movie.c` `find`, unused by 1.1.1), F-2-22
(LL/SC and ABA), F-6-23 (the launcher stub's Python swap).
---
## 14. The stability pass for 0.10.2
## 14. The stability pass for 0.11.0
Done on 2026-11-13 on branch `stability-pass` (worktree `E:\nx2pass`), cut from `next-0.10.0` at `f1a2a64e`: release
0.10.1, the AMD device-loss fixes and a packaging guard for the translator. 225 commits to `87777fea`; nothing pushed.
@@ -2599,4 +2601,4 @@ time):
A/B of the two GPU waits (F-7-01); a VRAM-pressure route with `vram_budget_mb = 6144` (F-7-05, F-4-23, F-4-25,
F-3-02); a first visit with `texup_log_ms = 16` (F-4-38); a carry probe with a 0.10.1 shader cache (F-5-04); a
detached prewarm (F-7-11); a seeded generation wrap (F-8-08); `stutter_map = 1` at a capped 30 fps (F-4-27);
`replay_async = 1` across area loads (F-1-20); the 0.9.2 to 0.10.2 update in a test install.
`replay_async = 1` across area loads (F-1-20); the 0.9.2 to 0.11.0 update in a test install.

View File

@@ -1 +1 @@
0.10.2
0.11.0

View File

@@ -919,7 +919,7 @@ A change to how nx2navi.ini and the environment are read (`runtime/cfg.c` `cfg_l
`cfg_bool`, `check_value`) passes `python tests\cfg_parse_check.py`, which builds `cfg.c` with stand-ins for what it
links with and loads scratch files: a comment after a value of a setting with a set of values is cut and logged once
with its line, free text, a value in double quotes and the environment keep theirs; switches written as words read as
0 or 1 through every reader; `low_end_gpu`, the switch of the low-end GPU mode that 0.10.2 removed, turns nothing on
0 or 1 through every reader; `low_end_gpu`, the switch of the low-end GPU mode that 0.11.0 removed, turns nothing on
and is named once in the log (`lowend_set`), and the mode's keys are read by themselves; values
outside their sets are logged with their line, at most 16 lines and a count; a full settings table logs one line at
load and one for the menu. The launcher's reader (`launcher/gameini.py`) has the same comment lines in

View File

@@ -1,9 +1,11 @@
## Install or update
- **Already have 0.6.0 or newer:** start the launcher; it offers 0.10.2, updates itself and keeps your saves and
- **Already have 0.6.0 or newer:** start the launcher; it offers 0.11.0, updates itself and keeps your saves and
settings. This update translates the game's code once more (for the ocarina recorder's fix) and prepares every shader
again with the fixed shader translator: a few minutes, once.
- **New install:** download **`NX2navi-Setup-0.10.2.exe`** below, put it next to your `.nup` dump of the game and start
- **On a 0.10.2 preview:** the same; the launcher offers 0.11.0 on either update channel. 0.10.2 was this release's
name while it was tested, and no final 0.10.2 follows.
- **New install:** download **`NX2navi-Setup-0.11.0.exe`** below, put it next to your `.nup` dump of the game and start
it. Windows SmartScreen warns on the first start because the setup is not signed: choose *More info* and *Run
anyway*. The launcher checks your game files, builds the game (10 to 25 minutes, once), prepares every shader and
starts it.
@@ -54,7 +56,7 @@ cards).
## Fixed
- **See-through ground** (issues #569 and #824). 0.10.0 and 0.10.1 shipped an older shader translator, whose shaders
could not reach the newest texture slots, so ground and walls could turn see-through after some play. 0.10.2 ships
could not reach the newest texture slots, so ground and walls could turn see-through after some play. 0.11.0 ships
the translator built from its own sources, prepares the shaders again with it, and no longer uses translations kept
from the old one. The release tools now refuse a translator that was not built from the release's sources.
- **AMD Radeon RX 5000 and 6000 cards losing the device** (the game ending with code 72): on AMD's driver these cards
@@ -79,6 +81,10 @@ cards).
frame as the scene after a later one had been named, and the upscaler then took that image for one frame. At one
place in Kakariko with both settings as a tester had them, 51 and 52 frames flashed in two runs of 100 seconds, and
none with the fix. Both settings stay off by default.
- **One long frame about 30 seconds into every session** (55 to 82 ms, the longest frame of play in the two sessions
it was found in): the first memory report asked Windows for a summary of the game's heap, and that summary holds
every allocation of the game while it is taken. It is now taken before play only (`mem_census = 1` asks for it in
play too, for a diagnosis).
- **Crashes and hangs found in a review of the whole runtime**; none was seen in our own play, and each fix has a check
of its own:
- a crash when the game read memory the lazy write-back was just handing to the GPU (NVIDIA and Intel cards);

View File

@@ -416,19 +416,19 @@
# left. In play the game took released textures back within a minute or not at all; one taken back after its drop is
# made again and shows its stand-in for a frame. A texture whose content only the GPU made waits twice as long, and one
# the GPU drew into since its last copy back to game memory stays. 0: released textures stay up to tex_released_mb for
# the whole session (as before 0.10). Default: 60 (180 until 0.10.2). Read at start.
# the whole session (as before 0.10). Default: 60 (180 until 0.11.0). Read at start.
# tex_released_hold = 60
# Megabytes the released textures may hold (0: no bound). Past it the oldest go even when young; while tex_released_hold
# is on, young ones may stay past it, up to twice it, as long as video memory and the system's commit have room.
# What they hold at their fullest is video memory the game keeps for the rest of the session, so this is what the cache
# costs. Default: a thirty-second of the video memory budget, at least 384 and at most 1024 (until 0.10.2 a quarter of
# costs. Default: a thirty-second of the video memory budget, at least 384 and at most 1024 (until 0.11.0 a quarter of
# the budget, up to 8192: on a run through Hyrule Field that held 3.3 GB more video memory and saved one texture in
# thirty from being loaded again). A larger value keeps more textures the game may take back, which are otherwise made
# again and show their stand-in for a frame. Read at start.
# tex_released_mb = 1024
# A texture whose memory the game writes again with the bytes it already held is left as it is instead of being
# uploaded (and, for most, decoded on the graphics card) a second time: its bytes are compared by a hash taken at the
# upload. Textures up to 64 KB always were; since 0.10.2 those up to 8 MB are too. Running through Hyrule Field the
# upload. Textures up to 64 KB always were; since 0.11.0 those up to 8 MB are too. Running through Hyrule Field the
# game does this all the time: 52,000 second uploads in three minutes without it, 600 with it. 0: only the small ones,
# as before (for a comparison; nothing should look different). Read at start.
# tex_same_big = 1
@@ -821,7 +821,7 @@
# takes up to a frame of the game's off the delay from the controller to the screen. The game's own limiter takes the
# limit back while a movie plays, while the window is minimised, and for the rest of the run when the frames show that
# Reflex does not hold it; the log's "frame rate:" lines say which one holds it. 0 leaves the limit to the game's own
# limiter, as before 0.10.2. Needs the nx2navi_dlssg.dll of 0.10.2 or later (an older one leaves the limit to the
# limiter, as before 0.11.0. Needs the nx2navi_dlssg.dll of 0.11.0 or later (an older one leaves the limit to the
# game). Changes while the game runs take effect at once.
# reflex_limit = 1
# Low latency without frame generation: 0 off, 1 on, 2 on with boost (NVIDIA's: the GPU keeps a high clock; on AMD 2
@@ -932,7 +932,7 @@
# audio_catchup = 1
# When the game sends an audio value this version cannot use (an effect setting out of range, an id it does not have),
# that effect or sound is left out and the log gets one line per kind (0, the default). 1 ends the game there instead,
# with the details in the log, as versions before 0.10.2 did for most of them: for bug reports. Takes effect at the
# with the details in the log, as versions before 0.11.0 did for most of them: for bug reports. Takes effect at the
# next start.
# audio_strict = 0
# Volume in percent (0 to 100), on top of the game's own. Changes while the game runs take effect at once.
@@ -1104,7 +1104,9 @@
# stands in for it) and where its committed memory lies every 3600 frames, and when the process's own commit (without
# the video memory Windows charges to it) rose 1 GiB over the highest it was, at most once a minute (the "commit
# census" lines). Each walk holds the address-space lock for 100-260 ms and delays the next frame by as much, so they
# are off unless asked for: leave it off in a run whose smoothness is judged.
# are off unless asked for: leave it off in a run whose smoothness is judged. With or without the trace, 1 also has
# every memory report ask for the C runtime heap's summary in play, which holds every allocation of the game for as
# long as it takes (50 to 70 ms with a heap of a few GB); without it the summary is taken before play only.
# mem_census = 0
# 1: with trace = perf, the process's handles counted by kind (events, sections, threads, files...) at the 600-frame
# report when their number grew by 16 or more since the last count (the "mem: handles" line). It reads the system's
@@ -1159,7 +1161,7 @@
# device_lost_at = 0
# A test of the page write generations (how the renderer tells which game memory changed since it last looked): they
# start after this number instead of 0, so a run reaches 4294967296, where the 32-bit generations of versions before
# 0.10.2 ran out, within its first seconds (4294966000 does that). Decimal, or hexadecimal with 0x; at most
# 0.11.0 ran out, within its first seconds (4294966000 does that). Decimal, or hexadecimal with 0x; at most
# 4611686018427387904. The log says where they start. Nothing else changes. Read at start. Default: 0.
# gen_seed = 0
# Once a second, puts the crash report's exception filter back if a GPU driver or an overlay loaded after the start set

View File

@@ -212,7 +212,7 @@ typedef struct AudioRenderer {
// A value the game sent that this host cannot use: the caller refuses the update or leaves the one record, effect or
// sink out. Logs the first of each kind per renderer, with the game frame, and counts every one; with
// NX2NAVI_AUDIO_STRICT=1 it ends the process instead, as most of these values did before 0.10.2. Any thread; takes no
// NX2NAVI_AUDIO_STRICT=1 it ends the process instead, as most of these values did before 0.11.0. Any thread; takes no
// lock but the log's.
void audio_bad(AudioRenderer *r, int kind, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
// audio_bad for a refused RequestUpdate, as an expression that gives AUDREN_R_INVALID_UPDATE.

View File

@@ -1440,7 +1440,7 @@ void cfg_init(void) {
rt_log("cfg: device profile Steam Deck: defaults for the keys nx2navi.ini does not set (NX2NAVI_DEVICE_PROFILE=desktop "
"turns it off)");
if (lowend_set())
rt_log("cfg: low_end_gpu is on, and the low-end GPU mode was removed in 0.10.2: the line does nothing, and the game "
rt_log("cfg: low_end_gpu is on, and the low-end GPU mode was removed in 0.11.0: the line does nothing, and the game "
"runs as it does without it. The mode's single settings (mesh_emulation, tex_clobber, foliage, "
"vram_reserve_mb and the others) still count where nx2navi.ini or the environment sets them");
start_values();

View File

@@ -1903,7 +1903,7 @@ static void op_one(VkExec *ex, const op_hdr *h) {
// dispatch (op_dispatch: 20x1x1 groups of cs d7566eb1, a depth probe) and nothing after it marked, since the group of
// draws that followed was recorded by the workers, whose passes have no marks; an occlusion query slot was found
// unavailable after its fence just before. An RX 6600 lost it the same way twice (0.9.2). The cause is not known;
// auto gives that driver no workers (vk_exec_replay_workers_auto), and auto is the default again since 0.10.2.
// auto gives that driver no workers (vk_exec_replay_workers_auto), and auto is the default again since 0.11.0.
// A submission's draws come in runs between ops that have to stay in the replay's order on its own thread (dispatches,
// copies, texture and buffer clears, events, the game's barriers, calls). Hyrule Field, standing (NX2NAVI_REPLAY_RUNS,
// 2026-11-11): about 3,500 draws a frame in 82 runs, 96% of them in runs of 16 draws or more and 67% in runs of 256 or

17
runtime/vk_mem_heap.h Normal file
View File

@@ -0,0 +1,17 @@
// When the memory report asks for the C runtime heap's summary (vk_memory.c system_log, plat_heap_info). Header only,
// so that tests/mem_heap_check.c checks the rule without a device.
//
// The summary holds the heap's lock while it adds the heap up, and every malloc and free of every thread waits for
// it. With a heap of a few GiB that took 54 and 70 ms in two sessions (2026-11-14, RTX 5090 PC), and the frame of the
// first report, 30 seconds into each session, took 55 to 82 ms: the longest frame of play in both. One slow summary
// switched the question off for the rest of the run, so each session paid for it exactly once.
//
// The summary is therefore not asked for in play at all: only before play (the boot and the title screen, where a
// long frame is not seen and the heap is small), and no more once one was slow there. NX2NAVI_MEM_CENSUS=1, the
// switch that already accepts a late frame for the walk of the address space, asks for it at every report. In play
// the report gives what the runtime knows it allocated instead, the same figure from one report to the next, which is
// what the growth bookkeeping compares.
#pragma once
// census: NX2NAVI_MEM_CENSUS is on; in_play: a save's first frame was shown; slow: a summary took too long before.
static inline int mem_heap_summary_due(int census, int in_play, int slow) { return census || (!in_play && !slow); }

View File

@@ -27,6 +27,7 @@
#include "vk_dlaa.h"
#include "vk_exec.h"
#include "vk_gpa.h"
#include "vk_mem_heap.h"
#include "wb_lazy_choice.h"
#include "wb_merge_spv.h"
#include "platform/platform.h"
@@ -1184,7 +1185,7 @@ _Static_assert(__atomic_always_lock_free(sizeof(uint64_t), 0), "64-bit page gene
static void gen_mark(uint64_t g) {
uint64_t frames = __atomic_load_n(&gfx_counters.frames, __ATOMIC_RELAXED);
double secs = rt_guest_start_ns ? (double)(kern_now_ns() - rt_guest_start_ns) / 1e9 : 0;
rt_log("mem: page generations reached %llu at frame %llu after %.1f h of play (%.0f a frame); before 0.10.2 they "
rt_log("mem: page generations reached %llu at frame %llu after %.1f h of play (%.0f a frame); before 0.11.0 they "
"were 32 bits and ran out here, after which textures and pool mirrors could miss the CPU's writes",
(unsigned long long)g, (unsigned long long)frames, secs / 3600, frames ? (double)g / (double)frames : 0.0);
}
@@ -5755,15 +5756,16 @@ static void system_log(uint64_t frame, const ReportFig *f, const VkPipeMem *pm,
const double M = 1048576.0;
uint64_t res, priv;
plat_process_memory(&res, &priv);
// The C runtime heap's summary holds the heap's lock while it adds up: asked at the report only, and no more once
// one was slow, so that a heap grown past what the summary handles quickly does not hold every malloc up again.
static int heap_off;
// The C runtime heap's summary holds the heap's lock while it adds up, and every malloc with it: asked before play
// only (and with NX2NAVI_MEM_CENSUS at every report), and no more once one was slow (vk_mem_heap.h).
static int heap_off, heap_census = -1;
if (heap_census < 0) heap_census = cfg_bool("NX2NAVI_MEM_CENSUS");
PlatHeapInfo hi = {0};
if (!heap_off) {
if (mem_heap_summary_due(heap_census, frame_step_world_us() >= 0, heap_off)) {
uint64_t t0 = plat_now_ns();
plat_heap_info(&hi);
uint64_t took = plat_now_ns() - t0;
if (took > HEAP_SLOW_NS)
if (took > HEAP_SLOW_NS && !heap_census)
heap_off = 1, rt_log("mem: the C runtime heap's summary took %.1f ms; it is not asked for again in this run",
took / 1e6);
}

View File

@@ -25,7 +25,7 @@
// The size bound (trl_cap_mb: a thirty-second of the video memory budget, TRL_CAP_MIN_MB to TRL_CAP_MAX_MB) is what
// decides how much video memory the cache costs: past it the oldest released textures go even when young, and with the
// hold on, young ones past it are kept while the card and the system have room (trl_room), up to TRL_ROOM_TIMES the
// bound. Until 0.10.2 the hold was 180 s and the bound a quarter of the budget (4 GiB on a 32 GiB card, 8 with room).
// bound. Until 0.11.0 the hold was 180 s and the bound a quarter of the budget (4 GiB on a 32 GiB card, 8 with room).
// A run through Hyrule Field showed what that bought (2026-11-14, RTX 5090, 5120x2160 with DLSS Performance, about
// three minutes of running; the game keeps 4.8 GiB of textures live there and lets go of and loads about 190 a
// second): the released textures held 5.3 GiB on average and 6.4 at most, the video memory in use went from 11.1 to

View File

@@ -2634,7 +2634,7 @@ static uint64_t released_cap_bytes(void) {
// By the card: a thirty-second of its budget, 384 MiB to 1 GiB (vk_tex_release.h trl_cap_mb, which has the
// run that set it). What the released textures hold at their fullest stays in use for the rest of the
// session, as free space inside the allocator's blocks once they are dropped, so the bound is the price of
// the cache; until 0.10.2 it was a quarter of the budget, up to 8 GiB. The two pressure rules still come
// the cache; until 0.11.0 it was a quarter of the budget, up to 8 GiB. The two pressure rules still come
// first: released entries go before anything else above NX2NAVI_TEX_VRAM_PRESSURE of the budget, and the
// bound falls to COMMIT_LOW_KEEP while the commit is low.
uint64_t vused = 0, vbudget = 0;
@@ -3669,7 +3669,7 @@ static void astc_check(const Tex *e, const uint8_t *raw, const VkAstcRegion *ar,
// costs a staging buffer, a copy and a barrier, several microseconds, where hashing 1.5 KiB takes a fraction of one.
// A CPU write during the hash sets the pages' write bits again, so the next check sees it.
//
// NX2NAVI_TEX_SAME_BIG (default 1 since 0.10.2; ab): textures up to CHASH_BIG_MAX keep the hash too. While the player runs through
// NX2NAVI_TEX_SAME_BIG (default 1 since 0.11.0; ab): textures up to CHASH_BIG_MAX keep the hash too. While the player runs through
// a town the game moves about 32 textures to new storage every four or five frames, back to back in one block, and a
// frame after their first upload every page of the block shows a write again. Of the ones the hash covers, 0 to 4 in a
// hundred are uploaded again (128x128, 171x171, 256x256 BC1: 9 of 440 in one recording of 600 frames); of the others,
@@ -3687,7 +3687,7 @@ static void astc_check(const Tex *e, const uint8_t *raw, const VkAstcRegion *ar,
// The second uploads took 2.9 s of the submitting thread in such a run, the two hashes about 3 s. A texture the CPU
// really rewrites would pay the hash for nothing each time: after CHASH_MISSES comparisons in a row that found other
// bytes its uploads take no hash any more. An area load takes none either (vk_exec_pool_loading): it uploads
// gigabytes in a few frames. NX2NAVI_TEX_SAME_BIG=0 hashes only the textures up to CHASH_MAX, as before 0.10.2.
// gigabytes in a few frames. NX2NAVI_TEX_SAME_BIG=0 hashes only the textures up to CHASH_MAX, as before 0.11.0.
// The pool log's buckets line counts the comparisons and the hashed bytes.
enum { CHASH_MAX = 64 << 10, CHASH_BIG_MAX = 8 << 20, CHASH_MISSES = 2 };
static uint64_t content_hash(const void *p, uint64_t n) {

View File

@@ -918,7 +918,7 @@ static void in_range_quiet(void) {
}
}
/* 6. NX2NAVI_AUDIO_STRICT=1: such a value ends the process, as most did before 0.10.2 (tests/audio_params_check.py
/* 6. NX2NAVI_AUDIO_STRICT=1: such a value ends the process, as most did before 0.11.0 (tests/audio_params_check.py
runs these in their own processes and expects exit 2). */
static int strict(const char *what) {
strict_setting = 1;

50
tests/mem_heap_check.c Normal file
View File

@@ -0,0 +1,50 @@
// runtime/vk_mem_heap.h: when the memory report asks for the C runtime heap's summary, which holds every allocation of
// the game while it runs. Never in play, unless NX2NAVI_MEM_CENSUS asks for it. Built and run by
// tests/mem_heap_check.py; prints each failed check and exits 1 on any.
#include <stdio.h>
#include "vk_mem_heap.h"
static int fails;
#define CHECK(c, ...) do { if (!(c)) { fails++; printf("FAIL line %d: ", __LINE__); printf(__VA_ARGS__); printf("\n"); } } while (0)
// A session as the report sees it: a report every 3600 presents, play from `play_at` on; the summary takes `ms`
// milliseconds each time and counts as slow past 2 ms (vk_memory.c HEAP_SLOW_NS). Returns the summaries taken in play,
// and through *before those before it.
static int session(int census, int reports, int play_at, double ms, int *before) {
int slow = 0, in_play_n = 0;
*before = 0;
for (int r = 1; r <= reports; r++) {
int in_play = r * 3600 >= play_at;
if (!mem_heap_summary_due(census, in_play, slow)) continue;
if (in_play) in_play_n++;
else ++*before;
if (ms > 2.0 && !census) slow = 1; // as system_log notes it
}
return in_play_n;
}
int main(void) {
// ---- the rule
CHECK(mem_heap_summary_due(0, 0, 0), "before play the summary is not asked for");
CHECK(!mem_heap_summary_due(0, 1, 0), "the summary is asked for in play");
CHECK(!mem_heap_summary_due(0, 0, 1) && !mem_heap_summary_due(0, 1, 1), "a slow summary is asked for again");
CHECK(mem_heap_summary_due(1, 1, 0) && mem_heap_summary_due(1, 1, 1) && mem_heap_summary_due(1, 0, 1),
"the census switch does not ask at every report");
int before;
// ---- the sessions of 2026-11-14: play from the first seconds on, the first report at present 3600 in play, the
// summary 54 and 70 ms. The rule before asked there once (the hitch); now it asks never.
CHECK(session(0, 6, 2400, 70.0, &before) == 0 && before == 0, "a session that plays before its first report asks");
// ---- a long title screen: two reports before play, each fast there, then play: asked twice, both before play
CHECK(session(0, 10, 9000, 0.4, &before) == 0 && before == 2, "a title screen of two reports: %d before play", before);
// ---- a slow summary before play (a heap that is large already at the title screen): once, and no more
CHECK(session(0, 10, 20000, 30.0, &before) == 0 && before == 1, "a slow summary before play: %d taken", before);
// ---- with the census switch every report asks, in play too, slow or not
CHECK(session(1, 6, 2400, 70.0, &before) == 6 && before == 0, "the census switch: not every report in play asks");
CHECK(session(1, 6, 9000, 70.0, &before) == 4 && before == 2, "the census switch across a title screen");
if (fails) printf("%d checks failed\n", fails);
else printf("mem_heap_check: ok\n");
return fails != 0;
}

41
tests/mem_heap_check.py Normal file
View File

@@ -0,0 +1,41 @@
"""Build and run tests/mem_heap_check.c: runtime/vk_mem_heap.h, when the memory report asks for the C runtime heap's
summary (vk_memory.c system_log): never in play, where it held every allocation of the game for 54 to 70 ms at the
first report of a session, unless mem_census asks for it.
No GPU, no game files, any Python.
Usage: mem_heap_check.py
"""
import os
import shutil
import subprocess
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
MSYS_BIN = Path(r'C:\msys64\ucrt64\bin')
def compiler():
"""$CC, else MSYS2 UCRT64's clang, else clang on PATH (as tests/diff/common.py picks it, without its Unicorn)."""
if os.environ.get('CC'):
return os.environ['CC']
if os.name == 'nt' and (MSYS_BIN / 'clang.exe').exists():
return str(MSYS_BIN / 'clang.exe')
return shutil.which('clang') or 'clang'
def main():
work = ROOT / 'build' / 'test' / 'mem_heap'
work.mkdir(parents=True, exist_ok=True)
exe = work / ('mem_heap_check.exe' if os.name == 'nt' else 'mem_heap_check')
env = dict(os.environ)
if os.name == 'nt' and MSYS_BIN.exists():
env['PATH'] = str(MSYS_BIN) + os.pathsep + env.get('PATH', '')
subprocess.check_call([compiler(), '-std=gnu11', '-O1', '-Wall', '-Werror', '-I', str(ROOT / 'runtime'),
str(ROOT / 'tests' / 'mem_heap_check.c'), '-o', str(exe)], env=env)
return subprocess.run([str(exe)], env=env).returncode
if __name__ == '__main__':
sys.exit(main())

View File

@@ -231,10 +231,10 @@ static void print_result(const char *scenario, const Policy *p, int room, const
}
static void session_checks(void) {
// RTX 5090, 31 GiB budget: until 0.10.2 a quarter of it (4008 MiB, the logs' figure) and 180 s; now trl_cap_mb
const Policy was = {"until 0.10.2", MB(4008), 180}, now = {"0.10.2", MB(trl_cap_mb(31419)), TRL_HOLD_S};
// RTX 5090, 31 GiB budget: until 0.11.0 a quarter of it (4008 MiB, the logs' figure) and 180 s; now trl_cap_mb
const Policy was = {"until 0.11.0", MB(4008), 180}, now = {"0.11.0", MB(trl_cap_mb(31419)), TRL_HOLD_S};
// an 8 GiB card: no room in play
const Policy was8 = {"until 0.10.2", MB(1920), 180}, now8 = {"0.10.2", MB(trl_cap_mb(7680)), TRL_HOLD_S};
const Policy was8 = {"until 0.11.0", MB(1920), 180}, now8 = {"0.11.0", MB(trl_cap_mb(7680)), TRL_HOLD_S};
struct { const char *name; uint32_t burst_s; double burst_mbs; uint32_t end_s; double calm_mbs; } sc[] = {
// the Balanced session's second line: 3.2 GiB released and kept within 35 s; then 10 minutes in one area
{"area changes 70 s, calm 10 min", 70, 93.0, 670, 1.0},