From 2f39b27fb6f4a96dc5810c19520c37c89a419049 Mon Sep 17 00:00:00 2001 From: chrg6 Date: Thu, 12 Nov 2026 06:20:05 -0500 Subject: [PATCH] Record the draw replay on three replay workers by default, and start the draft notes after 0.9.0. replay_workers = 0 records everything on the submitting thread, as before. Co-Authored-By: Claude Fable 5.2 --- docs/releases/v0.9.1.md | 11 +++++++++++ nx2navi.ini.example | 9 +++++---- runtime/cfg.c | 2 +- runtime/vk_exec.c | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 docs/releases/v0.9.1.md diff --git a/docs/releases/v0.9.1.md b/docs/releases/v0.9.1.md new file mode 100644 index 00000000..7a7d84a4 --- /dev/null +++ b/docs/releases/v0.9.1.md @@ -0,0 +1,11 @@ +## Faster + +- **A new install no longer builds its pipelines while you play.** A release now carries a list of the graphics + pipelines the game is known to draw. The install builds all of them while it prepares the shaders, and every start + builds them before play, as it already did for the pipelines your own install had drawn. Before, a new install met + each pipeline in play first: in Hyrule Field one ten-second stretch of a first visit had 1,769 draws wait for their + pipelines, 461 ms in all, the longest frame 88 ms. `pipe_seed = 0` in nx2navi.ini leaves the list out. +- **The draw replay runs on several CPU cores by default** (`replay_workers = 3`; contributed by epicmeme546): a + frame's large groups of draws are recorded on three threads beside the one that submits them. On an RX 7900 XT in + Hyrule Field it gave 51.7 instead of 43.6 fps standing. `replay_workers = 0` records on one thread as before; try + it if a picture looks wrong, and please report it. diff --git a/nx2navi.ini.example b/nx2navi.ini.example index 0e83b836..2f1b76c5 100644 --- a/nx2navi.ini.example +++ b/nx2navi.ini.example @@ -66,10 +66,11 @@ # of latency, and can show a dark or flickering frame now and then: the other thread reads vertex and buffer memory # the game has sometimes rewritten by then. # replay_async = 0 -# EXPERIMENTAL, work in progress. Record the draws of a submission on replay worker threads, 0 to 16. Default: 0, the -# replay records everything on one thread. With 1 a worker records each long run of draws while the submitting thread -# waits for it: no faster yet, it checks that the pictures stay the same before several workers record at once. -# replay_workers = 0 +# Record the large groups of draws of a submission on this many replay worker threads beside the submitting one, 0 to +# 16. Default: 3 (Hyrule Field standing on an RX 7900 XT: 51.7 instead of 43.6 fps). 0: the replay records everything +# on one thread, as before; try it if a picture looks wrong. With 1 a worker records each long run of draws while the +# submitting thread waits for it: no faster, it checks that the pictures stay the same. +# replay_workers = 3 # EXPERIMENTAL, THE GAME CRASHES WITH 1. 1 lifts the virtual core gate: guest threads run without the console's limit # of one thread per core, and the game keeps per-core data without locks. With 1 the game crashes or hangs, # usually at start. Keep 0 to play. diff --git a/runtime/cfg.c b/runtime/cfg.c index dba3331c..ca39163a 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -249,7 +249,7 @@ static const CfgMeta metas[] = { {"COOP_ACCEPT", "ask", NULL, LIVE}, // Advanced: scheduling {"ASYNC_PREEMPT", "1", "0|1|2", RESTART}, {"REPLAY_ASYNC", "0", "0|1", RESTART}, - {"REPLAY_WORKERS", "0", "0..16", RESTART}, {"REPLAY_PIPE", "0", "0..4", RESTART}, + {"REPLAY_WORKERS", "3", "0..16", RESTART}, {"REPLAY_PIPE", "0", "0..4", RESTART}, {"FREE_CORES", "0", "0|1", RESTART}, {"TIMER_1MS", "1", "0|1", RESTART}, // dynamic resolution (dynres.c): the scene follows the GPU time toward DYN_RES_TARGET milliseconds {"DYN_RES", "0", "0|1", LIVE}, {"DYN_RES_TARGET", "16.7", "1..100", LIVE}, {"DYN_RES_STEP", "45", "8..600", LIVE}, diff --git a/runtime/vk_exec.c b/runtime/vk_exec.c index 9728f5d5..c82cc622 100644 --- a/runtime/vk_exec.c +++ b/runtime/vk_exec.c @@ -1760,7 +1760,7 @@ static void op_one(VkExec *ex, const op_hdr *h) { } } -// ---- replay workers (NX2NAVI_REPLAY_WORKERS, default 0: the replay records every op on the submitting thread) +// ---- replay workers (NX2NAVI_REPLAY_WORKERS, default 3; 0: the replay records every op on the submitting thread) // 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