Every read checks the address with a system call, and before the save loads the probe read a count from a manager that is not one yet: up to 16,384 groups a present made every frame about 1.9 s.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Above 60 fps Link stands still on the Deku Tree's floating platform while it moves under him, and the code that carries
him is not found yet. With floor_probe set (off by default), each present logs the frame's step, Link's position and
how far he moved, and the nearest moving ground group of the engine's ground manager with how far it moved, so one run
at 60 and one above it show where the carry is lost.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The physics' two water managers and the game's interactive floor simulation (the Deku Tree's ground webs) step their
surfaces in fixed steps of 1/60 s, as many whole steps as the frame's time holds, and drop the fraction, so every
frame shorter than 1/60 s ran none and the surfaces stood still above 60 fps. The new set owater (water_steps, on by
default) calls the page between the division and the game's cut, which keeps the fraction per object; at 60 fps the
count is the game's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After an update that keeps the prepared shaders, --warm-shaders built all 42,000 of them into the graphics driver's
cache again: 10 to 20 s at every update on a player's PC while the driver gave every one back at once, and the full
build when it no longer had them (380 s there once, after a change of what they are built with). It now builds twelve
fragment libraries spread over the list first, into the driver's cache alone, as the game's check at every start
does, and builds the whole list only when fewer than three quarters of them came from that cache.
On copies of an install's caches (RTX 5090): with the driver's cache partly cold after a relink, 5 of 12 came from it
and the whole list was built (313 s); the run after it found 12 of 12 and built nothing more, the step taking 3 s.
lib_warm = force builds the whole list whatever the sample says.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comment added to the replay_workers row swallowed the replay_pipe row behind it on the same line, so every start stopped with "NX2NAVI_REPLAY_PIPE has no row in the settings table".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The patch set text_speed scales the typewriter speed of a message the game lets the player skip (fast, three times as
fast, its scripted waits as long) or runs the game's own skip on the first frame of each page (instant). Messages the
game marks unskippable, such as those that turn their page on a timer, keep the game's speed. The setting is live and
has a row on the Game tab in all four menu languages; with it at normal the set is off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release of what the upscaler leaves now waits for frame generation's own inputs too: in that mode the DLSS sizes
are made for frame generation alone while the upscaler does not run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The line freed the upscaler stand-in's scratch images, FSR 1's and SMAA's images and the DLSS sizes on its own while
this pass did: its versions stay. Of this pass's versions, what they do not cover stays: the stand-in's views of a game
image it read as it is now go with that image (vk_tonemap_forget from vk_exec_image_gone, under a lock), and the
upscaler release frees only what the line's idle release leaves, the reactive mask's snapshots, the FSR upscale
contexts and the DLSS sizes after a failure, at the same 600 presents and with vram_use = high keeping them as well.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With frame generation running and no DLSS or FSR upscaling, vk_dlaa.c arms and ends the frame in the same places and,
where the upscaler's evaluation would run, makes only frame generation's inputs (fg_only_frame): the scene's depth and
camera found as before, motion vectors from the same pass at the scene's size, no jitter at all, and the picture without
the HUD copied from the game's own scaled picture. DLSS Frame Generation and AMD's frame generation no longer need an
upscaler set; NVIDIA's through NGX still needs DLSS at the start and then keeps running when the upscaler is switched
off. The menu's Frame generation row stays usable with every Upscaling choice and the Upscaling row keeps frame
generation as set, with texts in all four menu languages. The log says at the start and at each change whether frame
generation takes its inputs from the upscaler or runs without one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each made its images at the picture's or the scene's size the first time it ran and kept them until the process
ended, also after the menu switched it off:
- the HDR encode's picture and menu image (28 and 14 MiB at 2560x1440, 63 and 32 MiB at 2160 lines) now go when the
swapchain is made without HDR, after a wait for the presents that may still read them;
- FSR 1's two images (56 MiB, 127 MiB at 2160 lines) go after 300 presents it did not scale, with the same wait;
- SMAA's three work images (35 MiB, 79 MiB at 2160 lines) go after 600 frames of another anti-aliasing, deferred past
the submission being recorded.
Each makes them anew when it runs again; one log line says when they go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A frame generation failure turns it off for the run, but the present compared what is wanted with what runs only when
a setting changed, so AMD's swapchain and both of its contexts stayed until some other setting moved. A frame
generator that runs and is no longer wanted is now noticed at every present, and the swapchain is made again without
it, as when it is switched off in the menu. The other way round, wanted and not made, is still tried only at a
settings change, so a swapchain that cannot be made is not tried at every frame.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Frame dumps show the upscaler reads the bloom composite's output, which the game has already exposed, bloomed and
tonemapped to 0..1. With dlss_prebloom = 1 it runs at the bloom chain's first pass on the scene's linear light. Without
upscaling its picture goes back into the light target. With upscaling the lens flares and the bloom composite are
drawn at the picture's size and that picture replaces the game's upscaler's output. Off by default; with it off
nothing changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switched off in the menu or failed, the upscaler kept everything it had made for the process: per scene size its
output, motion vector, mask and sharpening images and a DLSS feature (81 MiB of images at 2560x1440 with DLAA, 182 MiB
at 2160 lines, and about 0.5 GB per DLSS feature), the reactive mask's snapshots, the HUD-less pair and the FSR 3.1
and FSR 4 upscale contexts. Eight presents after it goes off they are freed on the replay thread, which makes every
evaluation, after a wait for the device to be idle, as the code already does for a size it replaces. Switched on
again, it makes them anew with a new history, as any switch on does.
The HUD-less picture was made and copied every frame, and kept, after frame generation went off, since the flag that
asks for it was never cleared on Windows: the frame generator's release clears it now, and the pair goes once no frame
generation swapchain is up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The row writes scene_share = 1 with dlaa = 0, which the start already sized the render-target heap for; widescreen.c now
reads the share live, says when the heap needs a restart for it (the row's note and the Restart count), and logs the
scene size, the picture size and how the scene is scaled once the fixed share takes over and at each change. The
stand-in copies a scene of the picture's size texel for texel with a nearest sampler, and the performance overlay shows
Ocarina's real scene size instead of the other builds' placeholders. scene_share gets its settings row and its ini
text; the row's texts are in all four menu languages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scratch images of the fallback blit, one per size and format, were kept for the process, the first eight ever
asked for. Their sizes follow the scene's resolution, which DLSS modes, the dynamic resolution and a window or
picture size change move, at up to 32 MiB each at 2160 lines; a ninth size got no scratch and its blit was left out.
A new size now takes the place of the one used longest ago, which goes once the GPU is past the submission being
recorded, and never one the submission being recorded uses. The cache is under a lock, since replay workers record
blits side by side.
The tonemap pass's views were kept by image handle for the process, a game image's view naming a destroyed image that
a new image could get the handle of, and no view at all past sixteen. A view now goes with its image: at a scratch
image's replacement, and with a game image through the replay's image-gone hook.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A mirror is made on the replay thread after a look at the pool index; a pool finalized on another thread in between
had no mirror to forget, and the new mirror then joined the list for a record already retired: freed twice, or
never. The index is searched again under the exclusive lock where the mirror joins the list, and a pool that is gone
has its new buffer deferred past the submission being recorded instead. The count of mirrors waiting for their table
hand-over is raised under the same lock that the finalize and the prologue take it down under.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The back end's record of the old pool was left behind with nothing naming it: its import, a VRAM mirror that stayed
on the mirror list and in its byte count until some later mirror evicted it, a physical pool's device-local memory
for good, its device address table record and its GPU address range. Initialize now runs Finalize's work first when
the object still holds a live pool, as texture initialize already does, and the back end lets the memory go once the
GPU is past the submissions that may use it. The log counts it (the first four, then at each doubling), since how
often the game does this is not known.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the graphics pipeline library a draw's first pipeline is linked from stage libraries, and the optimised build
replaces it when ready. The fast link was kept until the process ended, so each pipeline a run drew held the driver
memory of two: one play session replaced 907 fast links while the video memory outside the allocator, where the
driver keeps compiled pipelines, grew by 491 MiB, and a 68,400-frame session grew it from 1,672 to 2,485 MiB.
The replaced fast link is now destroyed on the completion thread once the GPU is past the submission being recorded
and one after it. The draws read the pipeline from the cache entry each time they record and keep no handle past
their submission, so none can name the old one later. The gpl log line counts the fast links given back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Auto gives half the physical cores less one, at most 6: 2 on 6 cores, 3 on 8 (the count measured best on an 8-core CPU), 5 on 12. Four cores or fewer get none, and so does AMD's Windows driver for RX 6000 and older, where a player's device was lost with workers on and the cause is not known. The menu's row lists Automatic first with the count it gives on this PC, and the log says how many were started and why.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rows keep their plain names. Their descriptions now say what the number counts and that 0 turns the setting
off: 0 to 4 for replay_pipe, 0 to 64 in steps of 4 for replay_small.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The rows are now CPU helper threads, Helpers work ahead, Helpers take small jobs and Start next frame early, each
with a short description of what it does and what it gained. Helpers work ahead and Helpers take small jobs are
switches: on writes replay_pipe = 4 and replay_small = 16, the values measured best, and another value set in
nx2navi.ini shows as on and stays.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A window minimized for minutes, a frozen game or a long load aged every released texture past its hold while nothing could take it back, so the first frames after it would make again the textures the frames just before it released. A gap between two submissions now counts at most a second.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Low, the default, lets released textures go after the hold and frees what switched-off upscalers and SMAA hold; High
keeps both for the session. The row shows Low for any setting but high, the old balanced among them. The descriptions
in all four languages no longer promise simpler surfaces or missing objects, since the default no longer trades them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A released texture now goes once nothing has used it for three minutes (six for content only the GPU made), measured
in wall seconds from a clock of the presents. In two players' sessions the game took released textures back within a
minute of the release or never, so the hold drops nothing it would ask for again. The size bound stays as the safety
net for a burst of area changes, and young textures may pass it, up to twice it, while the card and the system's
commit have room. vram_use defaults to low, which now means this hold; high turns it off and keeps the released
textures up to the bound as before, and balanced reads as low. The old low's values stay available as their own keys.
The reuse log line counts drops past the hold and splits its ages around it. tests/tex_release_check checks the rules
and the clock, and simulates sessions shaped by the logs against the old and new defaults.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Worker groups in flight (replay_pipe), Small groups to one worker (replay_small) and Early frame end (tail_early)
sit under Replay workers. A row whose setting does nothing without another one is greyed out and says which it needs.
The example settings file and the draft release notes name the rows, and the notes gain the replay_pipe and
replay_small entry.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Balanced, the default, is what the earlier commits made the default. High keeps what DLSS, frame generation's
HUD-less picture, FSR 1 and SMAA made after they are switched off, as before them. Low also sets, for the keys the
player leaves unset: released textures keep at most 1 GiB (tex_released_mb), textures give way from 70% of the video
memory budget (tex_vram_pressure) and the shared pipeline list is built at first draw (pipe_seed_boot = 0). Unsampled
live textures are not dropped in any of them: that eviction left the ground see-through for good. The values come
after the device profile and the low-end mode (cfg.c VRAMLOW); the row is in the Screen tab under Texture detail and
takes effect after a restart. The architecture notes describe the new memory report lines.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cache kept the first eight sizes and formats for the whole run and refused every other one, so after a few
window, resolution or DLSS mode changes the stand-in's blit of a new size was left out, while the old sizes' images
stayed. A new size now takes a free entry or the one used longest ago, whose image goes through the deferred
destruction after the tonemap pass drops its views of it (vk_tonemap_forget), before another image can take its
handle. tests/scratch_lru_check.py checks the choice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DLSS's sizes (their images and features), the HUD-less picture for frame generation, FSR 1's two window-size
images and SMAA's three work images stayed for the rest of the run after their setting was turned off. They now go
after ten seconds without use (SMAA's after a minute, since its passes only run where the game's own SMAA does): the
DLSS sizes on the replaying thread with no wait for the GPU, FSR's once every present slot that read them has been
waited for, SMAA's through the deferred destruction. Switching a feature on again makes them again, as its first
frame in a run does. At 5120x2142 that is about 0.9 GiB with DLSS off, 168 MiB of FSR and 109 MiB of SMAA.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every VMA allocation is counted under the file that made it until it is freed, so the new "mem: by owner" line
splits the device-local memory the driver reports into textures (live, GPU-drawn, idle, released, released too
lately to drop), pools and VRAM mirrors, upscalers, replay buffers, uniform snapshots, the device address table,
the ASTC decoder, present and post-processing, headroom spares, the free space inside VMA's blocks and what VMA
never allocated. "mem: host" gives the host-visible allocations, the process's commit and working set and the
game's heap. "vk: released textures" counts take-backs by how long the texture was released and textures made
again after a drop by a bound or a pressure, with the drop's reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stance site called page +0xf50, which the 0.10.0 line gives the water ripples above 60 fps: the second
registration ends every 1.1.1 start with "registered twice", the sprint button off included. It calls +0xf30 now, and
the comments say which slots the other sets hold. The set's switch is NX2NAVI_SPRINT_BUTTON_PATCH, not a name another
open request uses for a set of its own.
The stand-still timings count 60 Hz frames (frame_step_frames), so a toggled sprint no longer ends on a short stop at
high frame rates. A press is decided at its start for its whole length: kept from the game and the sprint's when it
begins in gameplay (B: while Link moves), else the game's alone, so a held B is not handed to the game half way and a
B that closes the pause menu starts no sprint. A sprint switched off with the button setting does not come back by
itself, Link's state is read only where the memory is readable, and the row, nx2navi.ini.example and the controls
page say that B is the jump under the game's Swap Jump Controls and name the button without assuming the layout.
tests\sprint_check.py covers the press latch, the menu press, 240 fps and the switch-off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A compute warm request the same as one built before still made its shader module, with the SPIR-V fixes, pool rebind
and marks, before the reuse table answered; the table is now asked first, all of its key being known by then. The
table is cleared under its lock, the count of reused requests is in the prebuild's and the preparation's report
instead of a line at every autosave, and NX2NAVI_COMPUTE_WARM_REUSE is a known setting, so nx2navi.ini can set it
without an "unknown key" line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Taken from pull request 760 and redone on the line's check: the sample was built at below-normal priority as the
guest started beside the boot's background builds, and on an RTX 5080 (0.9.2) it read a warm cache as cold, a median
of 136 ms, after which 42,231 libraries were built again in 873 s although the driver had them. The sample is now built
at normal priority and into the driver's cache only, as the warm's workers build (a library our own pipeline cache
holds read fast whatever the driver had), and a sample that says cold is taken again 10 s later, except while the start
waits for the whole warm after a driver change, where cold is the expected answer. The thread goes back to below
normal afterwards only when the game runs beside it.
Two parts of the pull request are not taken. The third fastest of twelve called a cache warm when three libraries
were in it, which is the partly evicted cache the warm is for; the cache counts as warm when three quarters of the
sample are fast. A resumed warm was sampled and stamped done when it looked fast, which a warm cut off past a quarter
of the list would pass with the rest never built; it is not sampled, and goes on from the variant the earlier run
reached, which shader-warm.txt now keeps every 8,000 variants, instead of from the first variant again: the cause of
the warm at every start the pull request saw with sessions shorter than a warm.
Co-Authored-By: Leyukaka <45659323+Leyukaka@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The RAM-based default gave 509 MB on a 16 GB machine, below the about 550 MB a full cache of the pipeline list reaches
on an NVIDIA card: with the limit kept on the write side the files would stop there and every pipeline past it would
compile again at every start, on the most common RAM size. The default is now RAM / 32 between 1024 and 4096 MB.
A fold was taken when the merged cache fitted the limit at the boot, but pipeline-cache.bin is written at the first
autosave, after the boot's builds have added to it. Past the limit that save was refused while the play file was
written over with the new run's pipelines, and what had been folded from it in memory was then in neither file. The
fold now needs a play file's worth of room (pipeline_cache_play_mb) under the limit, and the play file is not written
while a fold is not yet in pipeline-cache.bin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The limit was only checked when a file was read, all or nothing, so a run could write a file the next start then
dropped whole. On an RTX 5080 (0.9.2) pipeline-cache-play.bin reached 524.9 MB in one session and the next start began
empty; pipeline-cache.bin grows 14-28 MB at each fold and crosses 512 MB within a few sessions. Now a fold is made only
when its result fits, and a cache past the limit is not saved again, so the file keeps its last save under the limit.
Unset, the limit is the RAM / 32 between 512 and 4096 MB (512 on 16 GB as before, 2048 on 64 GB), which on that PC
took boot hits from 14 to 84 % and left no pipeline to background builds.
Taken into the 0.10.0 line with its conflicts resolved: the line had raised the limit to 1024 MB and says why in
the comment above cache_data_read, in nx2navi.ini.example and in AUDIT.md; those texts keep that reason and give the
RAM-based default, whose floor the next commit raises to match.
It can show a dark or flickering frame now and then, so the mode no longer turns it on with its other defaults. Its row under the mode's switch still turns it on for a player who wants it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two sites that count a movie's event frames from the shown picture's timestamp were part of the real-time step's
set, so the only way back to the old count also turned the step off. They are set omovie now, NX2NAVI_MOVIE_PTS
(movie_pts in nx2navi.ini), on by default.
The comment says what the new count changes at the default movie cap: nothing while the decoder keeps up; in a stall
the cues wait with the picture instead of going on with the soundtrack, and step by 2 or more when a picture is
dropped. The counter's reader, main+0x3b3ec10, hands it out as a float frame through a virtual call; its callers were
not traced, so whether a cue on a dropped picture's tick can be missed is said to be unknown, which is what the
switch is for.
The movie cap's comment keeps the measurements it rests on, the narration 2.4 times early and the fade at 65 s of 154
at 144 fps, with one sentence on the new sites. The new test is described in prose with what it does not cover,
instead of a row in the lifter's table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The larger pool asks for 655,360 sampled images in one set where 524,288 were asked before. The start now logs the
device's limits for one set and one stage next to that count, warns when the count is over them, and a refused
layout ends the start with the limits named instead of a bare failure.
The log line for a slot registered past the pool names both slots a shader reads instead: the pool's last entry, and
the last of the old length for a translation carried over from the translator before. The comments say what they say
without an issue number.
The translator's identity changes with this pool size: after the update every install translates its shaders again
in the background, the earlier translations serve meanwhile, and a shader gets the ground fix once it is translated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After an update the game keeps the previous translator's translations until a background pass translates them again. Those still declare texture pool arrays of 32768, which spirv_pool_rebind no longer took for pool arrays once VK_POOL_TEX grew, so their textures were never bound and areas loaded with empty images. They now bind to the first 32768 entries of the larger binding.
The game makes a texture pool of 33068 descriptors, and the translator clamped every pool handle to 32767, so the textures registered from 32768 up were drawn with whatever slot 32767 held, often an empty image: ground went see-through after an area load until the area was loaded again. VK_POOL_TEX and the translator's TexturePoolLength go to 40960, and a slot registered past it is logged once.