Triforce v0.6.0 "Sage Of Power"

Faster frames (the replay's memory work, held submits, helper threads, collection and capture cuts), the game letting old areas go (QueryMemoryInfo), the 0.5.2 stutter fixed, AMD RX 5000/6000 and integrated-GPU fixes, the GPU device chosen by name, the in-game menus and launcher reworked, controller, Linux and benchmark fixes.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-20 17:06:21 -06:00
parent b0e46adb48
commit 6c7117635c
265 changed files with 26893 additions and 2549 deletions

View File

@@ -84,13 +84,17 @@ screen. It costs some GPU time on cards that cull quickly, so it is off unless s
| `HOS_OUTPUT_RES=<0..3>`, `HOS_HANDHELD=1`, `HOS_ASPECT=<ratio>` | Over the options file: the output resolution (0 2048x1152, 1 2560x1440, 2 3840x2160, 3 1920x1080), the handheld profile, a picture wider than 16:9 (2.3889 for 3440x1440; the Ultrawide row's 21:9 is 2.3704, 64:27, and its 32:9 3.5556) |
| `HOS_DYNRES=0`, `HOS_REALTIME_STEP=0`, `HOS_TEXT_SPEED=<0..3>` | Over the options file: Resolution 100% (non-zero: Auto), Game speed Per frame (1: Real time), Text speed |
| `HOS_STEP_STEADY=0` | (Triforce, on by default since the lab's A/B; `=0` the mean of the last five as before) The game's real-time step kept steady, after NX2navi's steady step (`host/step_steady.h`, `host/nn_vi.c` `realtime_step`): the mean of the last 12 present intervals without their longest and shortest in place of the mean of the last five (`HOS_REALTIME_WINDOW`), the paced period itself where that mean is within 3% of it, and what the display showed and the game was not given repaid at a 64th a frame, 10% of the step at most (a quarter second owed at most). A cap the game holds steps it by the period exactly, and a hitch is paid back over most of a second instead of in the next five frames (a 50 ms frame at 240: 200 frames of at most 10% more, where the mean of five gave five steps of 13 ms). Game time still follows the clock |
| `RX_VK_FRAMEGEN=0`, `RX_VK_FRAMEGEN_MULT=<2..8>`, `RX_VK_PACE=0`, `RX_VK_UPSCALE=<0..2>` | No frame generation whatever the menu says; over the options file: its multiplier, frame pacing, the upscaling filter |
| `RX_VK_FRAMEGEN=0`, `RX_VK_FRAMEGEN_MULT=<0..9>`, `RX_VK_PACE=0`, `RX_VK_UPSCALE=<0..2>` | No frame generation whatever the menu says; over the options file: the Frame generation row's value (0 Off, 1 Auto, 2 to 8 the multiplier, 9 AMD FSR frame generation: a lab run's pin for each generator; `gpu/vk/framegen_rows.h` `env_row`), frame pacing, the upscaling filter |
| `RX_VK_FG_OWN_MOTION=0` | (Triforce, FG-4) Frame generation's motion the camera's alone, as before, for comparing. Without it, while NVIDIA DLSS or AMD FSR 4 upscale, the depth and motion frame generation takes (AMD's, NVIDIA DLSS frame generation, FSR 3.1's interpolation) are made from the upscaler chain's frame, with what moves by itself drawn into the motion (`gpu/vk/vk_temporal.cpp` `fg_inputs_from_chain`, `gpu/vk/vk_fsr3_inputs.cpp` `chain_motion`): also where the gameplay network does not translate on the card and the upscaler draws it in its place (RDNA 3), where they were never made before and AMD's frame generation made no frame |
| `RX_VK_FG_HUDLESS=0` | (Triforce, FG-2) No picture without the HUD is taken for AMD's frame generation, so its library makes no frame (the game's frame alone): a test. Without it the gameplay upscale's output is taken before the HUD is drawn into it, sRGB-encoded as the game's last pass encodes it, and given as `HUDLessColor` (`gpu/vk/vk_framegen.cpp` `framegen_hudless_note`, `hudless_for`); a present without it shows the game's frame alone; with HDR Native or RenoDX's RGBA16F scene AMD's library is not asked and the renderer's own makes the frame, as at 2x |
| `RX_VK_FRAMEGEN_FINE=0` | Frame generation's own made frames (Auto, 2x to 8x) the old way: a vector per 16x16 pixels in steps of 4 pixels, a blend of four of them per pixel, a pixel alike in both frames taken as still. Without it, a vector per 8x8 pixels to a fraction of a pixel, settled among its neighbours, and one motion per pixel (`gpu/vk/vk_framegen.cpp` `fine_vectors`, `shaders/fg_fine_*.comp`), which keeps moving straight lines straight and thin lines drawn (`tests/test_framegen_lines.py` measures both) |
| `RX_VK_PACE_SMOOTH=0` | (Triforce, on by default since the lab's A/B; `=0` off) The Frame pacing row on the plain present too, without frame generation: with the row on, a picture of the game's that comes sooner than seven eighths of the recent interval after the last one waits for that, its blit on the queue and the queue's lock let go; a late one goes at once, and none waits more than 50 ms (`gpu/vk/present_smooth.h`, after NX2navi's `pace_smooth`). Without it the row spaces only frame generation's frames, as before. With `RX_VK_PRESENT_THREAD=0` the present is on the game's presenting thread, so a wait also holds that thread's next frame: what that does to the rate under the cap is for a measurement before it is on. A `vk: frame pacing` line every 1200 pictures says how many waited and how long |
| `RX_VK_PRESENT_THREAD=1` | (off by default since the lab showed no gain) (Triforce, on by default; `=0` as before) The game's presents go out from a present thread of their own (`gpu/vk/present_thread.h`, after NX2navi's present thread): the presenting thread records and submits the blit as before (the frame fence, the swapchain's image, the overlays, the bug capture's copy and the frame log's: the same commands in the same order on the queue), then hands the pacing's wait (`RX_VK_PACE_SMOOTH`) and the present call to that thread and goes on to its next frame; the next present waits first until the one handed over is out, so one is in hand at most. Not with frame generation, NVIDIA DLSS frame generation or AMD Anti-Lag 2 (presents and stages of their own); NVIDIA Reflex's present markers carry their frame's id. The `vk: a frame's present` line every 120 presents says how many went out from it, the presenting thread's time in the present and how much of it was the wait for the present before, and the pacing's wait and the present call (on whichever thread); the stall line's present is the presenting thread's, with that wait named |
| `RX_VK_REFLEX_LIMIT=1` | (Triforce, off by default) With the NVIDIA Reflex row on and no frame generation, Reflex's sleep holds the Game frame rate cap (the sleep mode's minimum interval) where each frame starts, in place of the game's own wait, as the Reflex frame limit row does with DLSS frame generation: one wait a frame, timed by the driver (`gpu/vk/vk_reflex.cpp` `reflex_pace`, the rule `gpu/vk/dlssg_pace.h`'s; after NX2navi's `low_latency`). The game's own wait holds a movie, a frame RivaTuner holds, a window that showed nothing for 200 ms, and the rest of the run once over half of 60 frames came sooner than three quarters of the period, or when the driver refuses the interval. `vk: NVIDIA Reflex: frame limit:` lines say who holds it; the Full overlay's Frame limit line says NVIDIA Reflex after the rate. The Reflex frame limit row's text does not cover this switch yet |
| `HOS_PACE_HANDOFF=0` | The game's own wait paces every frame, whatever the Reflex frame limit row says and whether RivaTuner Statistics Server runs: the renderer is never asked whether another limiter holds a frame, and RivaTuner gets no limit from the game (`host/nn_vi.c` `pace_handed`, `gpu/vk/vk_pace.cpp`) |
| `HOS_FPS_STEADY=0`, `=1`, `=2` | (Triforce, off by default: the Steady frame rate row, over it) 1 any rate, 2 steps of the display's refresh: the game's frames paced to a period this PC holds in the scene, never shorter than the Game frame rate cap's (`host/pace_steady.h`, `host/nn_vi.c` `steady_period`). The rate is chosen by probes (`pace_steady_probed`): 32 frames at the cap, unpaced, the last 24 of them measured, at the start, 2 s after a load, at least every 12 s, and when a quarter of the last 64 frames ran late (2 s after the last probe at the soonest, twice that each time a probe changes nothing, up to 12 s); the rate becomes the first the last three probes' 90th percentile fits in with 2% to spare where that is slower, or the first it fits in with 5% to spare where that is faster. A frame paced slower does more work (the lab's Market: 11.6 ms unpaced, 15.5 ms paced at 55 fps), so the frames' own measure as they run chased the rate down; frames late now only bring a probe on, and the rate is never under what a probe shows the PC holds. `HOS_FPS_STEADY_PROBE=0`: no probes, the rule below as before. Without probes: what a frame took is its present interval less the longest of the pacing's waits in it (the acquire's, on the presenting thread or another, and the present's hold), and what it needed the interval less all of them (OoT's main thread and Presentation Thread take turns; where the waits add up to the whole interval, the longest: `pace_steady_measure`); a quarter of the last 64 frames that took more than the period lowers it at once to the first rate their 90th percentile fits in with 2% to spare, and once it has held 3 s since a raise (6 s since a lowering, doubled for each lowering within 30 s of a raise, up to 120 s, and back to 6 s at a load) it rises to the fastest rate the 90th percentile of what the last 512 frames needed fits in with 5% to spare (one rate at a time where the game acquires on another thread). A frame that took over 2.5 times the median of the last 64 (hitches among them), a present interval over 250 ms, and the frames of the 2 s after such a load (the scene is not its measure yet) are left out; the first lowering after a load waits for 128 frames of the new scene and takes their 90th percentile. The acquire's wait starts the frames a period apart (the steady step then gives the game the period as its time step) and the present holds each picture of the game's to the period after the last, less a 64th of it (`gpu/vk/present_smooth.h` `present_smooth_paced_at`, with or without the Frame pacing row; not with frame generation). Another limiter holding the frames (RivaTuner, Reflex) puts the cap back while it does. `vi: steady frame rate:` lines at each change say what the frames needed, and every 5 s what the rule was given (what the frames took and needed at p50 and p90, the present interval's p50, the waits a frame by kind, the frames kept and left out by reason, how many of the last 64 kept were late, and the probes and what the last three took unpaced); the `vk: frame pacing` line counts the present's holds |
| `RX_VK_REFLEX_LIMIT=1` | (Triforce, off by default) With the NVIDIA Reflex row on and no frame generation, Reflex's sleep holds the Game frame rate cap (the sleep mode's minimum interval) where each frame starts, in place of the game's own wait; and with DLSS frame generation, Streamline's Reflex holds it the same way (`gpu/vk/vk_dlssg.cpp` `pace`; options_version 7: the Reflex frame limit row is gone, and this is its only switch until that path has been played on an RTX 40/50 card; `vk: dlssg: frame limit:` lines say who holds it): one wait a frame, timed by the driver (`gpu/vk/vk_reflex.cpp` `reflex_pace`, the rule `gpu/vk/dlssg_pace.h`'s; after NX2navi's `low_latency`). The game's own wait holds a movie, a frame RivaTuner holds, a window that showed nothing for 200 ms, and the rest of the run once over half of 60 frames came sooner than three quarters of the period, or when the driver refuses the interval. `vk: NVIDIA Reflex: frame limit:` lines say who holds it; the Full overlay's Frame limit line says NVIDIA Reflex after the rate. |
| `HOS_PACE_HANDOFF=0` | The game's own wait paces every frame, with DLSS frame generation's Reflex too and whether RivaTuner Statistics Server runs: the renderer is never asked whether another limiter holds a frame, and RivaTuner gets no limit from the game (`host/nn_vi.c` `pace_handed`, `gpu/vk/vk_pace.cpp`) |
| `HOS_MEM_QUERY_USED=0` | (Triforce, 11-19) `nn::os::QueryMemoryInfo` answers the memory in use as the program and the system's part only, as before. By default it is the program, the heap and every page the game mapped beyond it, at most the total, as Horizon answers (`host/hos_mem.c` `query_used`): the game's resource cache sizes what it may still take from it, and without it kept every area it ever loaded (12.5 GB of its 9809 MB after four areas). Needs the census on (`HOS_MEM_CENSUS`). `HOS_MEM_QUERY_SLACK_MB=<MB>` (1024 by default): that much less of the game's pages answered as in use, room for its cache beyond a Switch's (our game needs ~3.2 GB of regions at a save load where a Switch leaves ~2.8; with 0 it evicted in every scene) |
| `HOS_MEM_TRACE=1` | (Triforce, lab) Logs every address region and page call of the game with its size and caller (`memtrace:` lines; a region's with its call stack) and every `QueryMemoryInfo` answer |
| `HOS_FPS_STEADY=0`, `=1`, `=2` | (Triforce, off by default: the Frame pacing row's two Steady values, over them) 1 any rate, 2 steps of the display's refresh: the game's frames paced to a period this PC holds in the scene, never shorter than the Game frame rate cap's (`host/pace_steady.h`, `host/nn_vi.c` `steady_period`). The rate is chosen by probes (`pace_steady_probed`): 32 frames at the cap, unpaced, the last 24 of them measured, at the start, 2 s after a load, at least every 12 s, and when a quarter of the last 64 frames ran late (2 s after the last probe at the soonest, twice that each time a probe changes nothing, up to 12 s); the rate becomes the first the last three probes' 90th percentile fits in with 2% to spare where that is slower, or the first it fits in with 5% to spare where that is faster. A frame paced slower does more work (the lab's Market: 11.6 ms unpaced, 15.5 ms paced at 55 fps), so the frames' own measure as they run chased the rate down; frames late now only bring a probe on, and the rate is never under what a probe shows the PC holds. `HOS_FPS_STEADY_PROBE=0`: no probes, the rule below as before. Without probes: what a frame took is its present interval less the longest of the pacing's waits in it (the acquire's, on the presenting thread or another, and the present's hold), and what it needed the interval less all of them (OoT's main thread and Presentation Thread take turns; where the waits add up to the whole interval, the longest: `pace_steady_measure`); a quarter of the last 64 frames that took more than the period lowers it at once to the first rate their 90th percentile fits in with 2% to spare, and once it has held 3 s since a raise (6 s since a lowering, doubled for each lowering within 30 s of a raise, up to 120 s, and back to 6 s at a load) it rises to the fastest rate the 90th percentile of what the last 512 frames needed fits in with 5% to spare (one rate at a time where the game acquires on another thread). A frame that took over 2.5 times the median of the last 64 (hitches among them), a present interval over 250 ms, and the frames of the 2 s after such a load (the scene is not its measure yet) are left out; the first lowering after a load waits for 128 frames of the new scene and takes their 90th percentile. The acquire's wait starts the frames a period apart (the steady step then gives the game the period as its time step) and the present holds each picture of the game's to the period after the last, less a 64th of it (`gpu/vk/present_smooth.h` `present_smooth_paced_at`, with or without the Frame pacing row; not with frame generation). Another limiter holding the frames (RivaTuner, Reflex) puts the cap back while it does. `vi: steady frame rate:` lines at each change say what the frames needed, and every 5 s what the rule was given (what the frames took and needed at p50 and p90, the present interval's p50, the waits a frame by kind, the frames kept and left out by reason, how many of the last 64 kept were late, and the probes and what the last three took unpaced); the `vk: frame pacing` line counts the present's holds |
| `HOS_FPS_STEADY_PROBE=0` | (Triforce, with `HOS_FPS_STEADY` or the Steady frame rate row) No unpaced probes: the rate by the frames' own measure as they run, as before test31 (`host/pace_steady.h` `pace_steady_probed`, `host/nn_vi.c` `steady_period`); the frames' work grows when they are paced slower, and that rule slides down |
| `HOS_PACE_SPIN=0`, `HOS_PACE_SPIN=<microseconds>` | (Triforce) The game's own frame wait on the high-resolution timer for the whole wait, as before, which wakes up to about 0.5 ms after the frame's time. By default the timer takes the wait up to 0.6 ms before the frame's time and the rest is yielded away on the clock, so the frame starts on its time (`host/pace_wait.h`, `host/nn_vi.c` `pace_sleep`); a number is another margin. Every 5 s in which frames waited a `vi: frame waits` line says how long after their time the waits ended, on average and at most |
| `HOS_RTSS=0` | RivaTuner Statistics Server is left out entirely: nothing of it is read or loaded and its profile is not touched; a line `triforce_rtss_profile.txt` holds from a run that did not close is only reported in the log (`gpu/vk/rtss_limit.cpp`, *The options file* below) |
@@ -147,6 +151,7 @@ case-sensitive, and an unknown one is ignored.
| `RX_VK_PASS_TIMING=1` or `2` | GPU time per pass (2: per program too), logged every 600 presents |
| `RX_VK_SLOW_LOG=<ms>` | The replay's times for each frame that took longer than this |
| `RX_VK_STALL_LOG=<ms>` or `0` | On in every run (`gpu/vk/stall_watch.h`): every 600 of the game's frames a `vk: frame times` line (the longest frame and how many were over 33, 50, 100 and 250 ms, present to present and in the replay's own time), and for each frame of 50 ms or more a `vk: stall` line of where its time went: the replay's phases, memory sync's parts, the waits for write-backs still on the GPU (how far ahead, and whether behind a present's blit), the waits for shaders or pipelines, the uploads, the pools imported where they were bound, the GPU behind, the present (its image, fence, call and Reflex's sleep), the game's fence waits, the rest, and a pool's trial in guest memory if one is under way (`RX_VK_DEMOTE_QUICK`); and the new textures left for the next frame and whether the frame's picture was held (`RX_VK_HOLD_MS`), whose holds the 600-frame line counts too. At most 3 stall lines a second and 1500 a session. `<ms>`: the stall line's threshold; `0`: neither line |
| `RX_VK_SLOW_TAKE_MS=<ms>` or `0` | (Triforce, 20 by default) A submit-time capture take that long or longer (`gpu/vk/vk_memory.cpp` `take_capture`): a `vk: slow capture take` line with where its time went (the marks and late pages, the pools lock, the retires, the stamps, the texture shadow, the buffer kept or given back), the first 200 of them. A Linux RTX 4090 near the Market stuttered with `memory sync [capture taken 30 to 110 ms]` while the 600-take average said 1.3 ms. `0`: none |
| `HOS_PGO=<file>` | In a run of an `RX_PGO=gen` build: `<file>.reset` clears the counters, `<file>.dump` writes them to `<file>`. It is read before `hookshot_env.txt`, so set it in the environment |
### The GPU
@@ -155,7 +160,7 @@ case-sensitive, and an unknown one is ignored.
|---|---|
| `RX_VK_VALIDATION` (set) | The Khronos validation layer |
| `RX_VK_CHECKPOINTS=0` | No NVIDIA checkpoints (on by default; after a lost device they name the draw it stopped at). (Triforce) The boundaries between a frame's work have markers too: the write-back diff pass, each recording's start, uploads and end, the present's blit and its menu (`gpu/vk/checkpoint_kinds.h`); the report reads the two stages' last markers together, says what followed the last one reached, and logs the switches, the queue's timeline and the mirrors' piece binds the submits wait for. (P4) Each marking thread numbers its own markers in a ring of its own (15 of 4096; threads after the 15th share a 16th), no atomic shared by the recording threads; the report names a marker's ring and reads the markers around it in that ring |
| `RX_VK_HANG_DUMP=<file>` or `0` | The hang watch (Windows) is on in every run: once no frame was shown for `RX_VK_HANG_SEC` seconds (20) with the game's window in front, the top of every thread's stack goes into the log and the whole stacks into `triforce_hang.txt` in the game folder, once a stall and at most three times a run. `<file>`: that file instead, and every second counts whatever window is in front. `0`: no watch |
| `RX_VK_HANG_DUMP=<file>` or `0` | The hang watch (Windows) is on in every run: once no frame was shown for `RX_VK_HANG_SEC` seconds (20) with the game's window in front, the top of every thread's stack goes into the log and the whole stacks into `triforce_hang.txt` in the game folder, once a stall and at most three times a run. `<file>`: that file instead, and every second counts whatever window is in front. `0`: no watch (Triforce) The same report can be asked for at any time: put a file named `triforce_hang.txt.now` in the game folder (the report's name with `.now`); within a second the watch takes it away and writes every thread's stack, for a game that goes on showing frames and gets nowhere (a loading screen that never ends). |
| `RX_VK_NOOPT` (set) | Pipelines built without the driver's optimisations |
| `RX_VK_PASS_BARRIER=game` or `full` | The barrier a draw pass starts with (`gpu/vk/pass_barrier.h`). `game`: a pass right after another, with nothing recorded between (no barrier of the game's, no copy, clear, uniform update or dispatch), waits for the earlier work in its fragment stages only, so its vertex, task and mesh work may overlap the earlier pass's fragments; a pass the replay itself split off for a hazard (`a pass of its own` in the log) and `RX_VK_BARRIER_EVERY_DRAW`'s keep a full one. (Triforce, P4) "Nothing recorded between" is the command buffer's own count (`RX_VK_BARRIER_CONTEXT`), so beside the Replay helper threads too. `full`: a full barrier at every pass start, as before. Unset: `game` with NVIDIA's driver, `full` on every other card. The log's `vk: pass barriers:` line says which, and the frame statistics' `pass starts ordered in their fragment stages only` how many a frame |
| `RX_VK_SPLIT_BARRIER=pass` or `full` | (Triforce) A long submission goes to the GPU in parts of 120 draws and dispatches (`RX_VK_CHUNK`); `gpu/vk/barrier_rules.h`. `pass`: a pass open at a part's split goes on in the next part, begun again with the same targets behind a barrier of its attachments' outputs alone and with what its draws sampled and wrote, so the GPU does not drain between two draws of one of the game's passes; where the part's end records anything (its uniform updates, its write-backs) or an event's write is held, the full barriers as before. A parallel replay's segments are not split into parts: each begins and ends with a full barrier, so nothing goes on across a segment's edge. `full`: a full barrier at each part's end and the next one's start, as before. Unset: `pass` with NVIDIA's driver, `full` on every other card. The log's `vk: a submission's parts:` lines say which and, every 3,600 splits, how many went on in their pass and how many of those parts had uploads (whose own full barriers order them after the part before all the same) |
@@ -164,7 +169,9 @@ case-sensitive, and an unknown one is ignored.
| `RX_VK_DISPATCH_BARRIER=game` | (Triforce) Off unless set, not yet run in the game: a dispatch right after another, nothing recorded between, records no full barrier of its own (not an indirect one, nor a program a stand-in may take over), as NX2navi's `barrier_game` does; the game's own barriers order its dispatches. Only the game shows whether that is always so (a one-frame band or flicker where it is not): a switch for the lab. A `vk: RX_VK_DISPATCH_BARRIER=game:` line every 20,000 dispatches it left without one. (wp14, P4) It no longer stands aside while the Replay helper threads record (most frames at the Market, so the lab's earlier run of it measured little): "nothing recorded between" is the command buffer's own count of its commands (`gpu/vk/cmd_work.h`, `RX_VK_BARRIER_CONTEXT`), a segment being a command buffer of its own |
| `RX_VK_BARRIER_CONTEXT=0` | (Triforce, P4; after NX2navi's per-context barrier state) What the barrier rules ask, "was anything recorded into this command buffer since its last full barrier, its last pass's end, its last dispatch", is answered by each command buffer's own count of its commands (`gpu/vk/cmd_work.h`), where one count of every thread's commands served before (an atomic add on every command by every recording thread). So the rules hold while the Replay helper threads record: the left-out repeats of a full barrier, `RX_VK_PASS_BARRIER`'s pass starts and `RX_VK_DISPATCH_BARRIER`. A command buffer's begin starts its state afresh; each segment begins and ends with a full barrier, so no rule relaxes across a segment's edge. `RX_VK_SPLIT_BARRIER` asks also whether anything went to the queue between two parts (every submit is counted). The rules' defaults are as they were. `0`: the one count, and the rules standing aside while the helper threads record, as before. The `vk: barrier state:` line at the start says which; the frame statistics' `full barriers recorded, ... left out` and `pass starts ordered in their fragment stages only` show the difference |
| `RX_VK_BATCH=parts`, `1` or `0` | Held submits (`gpu/vk/vk_replay.cpp` `batch_way`). `1` (the default with Mesa's RADV): every submit held until something needs the GPU's results or the queue's order. (Triforce) `parts`, off unless set: only a whole submission's recordings are held, and only while the game's submit is being replayed; a part goes at once with those held before it, as do 4 held (`RX_VK_BATCH_MAX`), and the held go when the replay of the game's submit returns. Neither changes the command buffers or their order on the queue. `0`: each submit at once (the default elsewhere). The `vk: batched submits` lines say which and how many command buffers went in each queue call |
| `RX_VK_FOLIAGE_SHADOW_CULL=<layer>[f]` | Off unless set, not yet run in the game: the draws of mesh programs into the sun's shadow cascades (depth only, square, wider than 768) from that layer of the cascades on (0 to 2; NX2navi's is 1) that cull neither face are drawn with their back faces culled (the front ones with `f`, as `1f`): the foliage's double-sided cards draw half their fragments there (`gpu/vk/foliage_shadow.h`). Not the same picture: a card facing away from the sun casts no shadow in those cascades. The log says `vk: RX_VK_FOLIAGE_SHADOW_CULL` at the start and names the first draws it culled (`vk: foliage shadow cull:`) |
| `RX_VK_FOLIAGE_SHADOW_CULL=<layer>[f]` | (Triforce, after NX2navi's 754ded9) On from layer 1 unless set (`off`: as the game draws them): the draws of mesh programs into the sun's shadow cascades (depth only, square, wider than 768) from that layer of the cascades on (0 to 2; NX2navi's is 1) that cull neither face are drawn with their back faces culled (the front ones with `f`, as `1f`): the foliage's double-sided cards draw half their fragments there (`gpu/vk/foliage_shadow.h`). Not quite the same picture: a lone card facing away from the sun casts no shadow in the middle and far cascades (where cards stand in pairs or clumps the others cover it; the near cascade is drawn as the game asks). The log says `vk: RX_VK_FOLIAGE_SHADOW_CULL` at the start and names the first draws it culled (`vk: foliage shadow cull:`) |
| `RX_VK_FOLIAGE_SHADOW_VRS=<layer>` | (Triforce, after NX2navi's 754ded9) On from layer 2 unless set (`off`: the extension not asked for, no pipeline changed): the same draws of native mesh programs, from that layer of the cascades on, shade one fragment per 2 x 2 pixels (`VK_KHR_fragment_shading_rate`, where the device has `pipelineFragmentShadingRate` and native mesh shaders; elsewhere nothing changes): the leaves' alpha test runs a quarter as often, depth still per texel. The rate is dynamic state only in the pipelines of native mesh programs with no colour target and a depth one (and in their two shader libraries, keyed apart), which the driver builds again once: on such a device the driver's part of the preparation makes those libraries too (and the `RX_VK_LIB_CHECK` sample asks for them), once more at the first start after the update, before the game (the other libraries come back from the cache), and the light precompile builds each depth-only pipeline of a native mesh program once more; their keys, the program cache and every other pipeline stay as they were. The log says `vk: the far shadow cascades' foliage at 2 x 2:` at the start and names the first draws (`vk: foliage shadow 2 x 2:`) |
| `RX_VK_FOG_CULL=1` | (Triforce, after NX2navi's 0379b00) Off unless set: the volumetric fog's first compute pass skips, as the game does, the froxels behind a coarse depth table of the frame before and writes them as empty, which the fog's history smears into dark trails beside near objects (worst at the screen edges, in foggy places such as the Lost Woods and Kokiri Forest). By default those froxels are computed too: the comparison is made never true in that one module, found by its shape in the SPIR-V (`gpu/vk/spv_fog.h`: a block of five image writes, four of (0,0,0,1) and last 1/255, and the one branch to it an ordered greater-than decides). It is applied where the module is made (`make_module`), outside the translation stamp: the program cache's records stay as they were translated, so nothing is translated again, and only that one compute pipeline is new to the driver's caches. With the precompile keeping none (`RX_VK_PRECOMPILE_KEEP`, less RAM), its record of the compute programs built has the patch and the matcher's version in its key (`gpu/vk/vk_draw.cpp` kFogPatch times `spv_fog::kMatcher`, raised whenever the matcher finds modules it did not: a record written by the matcher before 11-17's, which patched none of Triforce's fog modules, is built again), so the first start with the patch, or with a new matcher, builds the listed compute programs once more before the game (every one but the fog's a cache hit, the fog's compiled into the play cache, `mkw_vk_pipelines_play.bin`, or the main one where there is none, and saved before the record says built) rather than compiling the fog's at its first dispatch; with `RX_VK_FOG_CULL=1` that key is the one it was. A little more GPU time in the fog's pass. The log says `vk: fog: module <crc>, the volumetric fog's first pass:` and what was done (also for a near miss: the exit found but not its comparison) |
| `RX_VK_FIFO` (set), `RX_VK_IMMEDIATE` (set) | The swapchain's present mode for one run, over the Insert menu's VSync row: FIFO, as with vsync forced by a driver; immediate, where the surface lists it. Unset, the row decides (`gpu/vk/present_mode.h`): On is mailbox where the driver has it (immediate on Windows where it has none, FIFO elsewhere), Off immediate wherever the surface lists it |
| `RX_VK_SKIP_PROG=<prefix>,...` | Leaves out the draws of these programs (default `53509044401d78d2`; `-` leaves out none) |
| `RX_VK_PIPE_SKIP=0`, `1` or `2` | Default/`1`: wait for shader translation; a pending pipeline can be skipped only for attachment-only draws whose targets hold an earlier frame. `0`: wait for every pipeline too. `2`: restore the old skip for untranslated draws with persistent targets; this can omit writes before the shader is known. Translated memory-writing draws still wait |
@@ -175,8 +182,10 @@ case-sensitive, and an unknown one is ignored.
| `RX_VK_TASK_MESH_FALLBACK=0` or `1` | Task + mesh draws through the compute fallback (1) or the driver's mesh shaders (0). By default the fallback is on for AMD's Windows driver for RDNA 2 (every RX 6000 card and that generation's integrated GPUs: the driver whose `vk: vendor fixes` line names the "AMD proprietary shader compiler"), where the native path timed out the driver on the RX 6700 XT and RX 6800 XT (issue 996) |
| `RX_VK_MESH_AHEAD=0` | (Triforce, on by default, after NX2navi's `mesh_ahead`; `=0` as before) An indirect mesh draw's records are copied into a ring as `{count, 1, 1}` before it, outside the pass, so each one ended its pass and the next draw began it again (OoT's foliage, grass and leaves: about 16 a frame at the Market). Now the first indirect mesh draw of a run copies the records of the indirect mesh draws after it as well, in the same three barriers, and those stay in the pass: a run is the indirect mesh draws after it with only state, draws, counter reports and render conditions between (`gpu/vk/vk_replay.cpp` `mesh_run_kind`); a dispatch, a barrier, a copy, a clear, a uniform update, new targets or an event ends it, so no work of the game's between can write the records after they were copied. A draw takes only the entry copied for it (its op, records, count and stride); at most 32 draws and 1 MB of the ring a run (`gpu/vk/mesh_ahead.h`). A `vk: indirect mesh draws` line every 20,000 conversions says how many took their records from an earlier draw |
| `RX_VK_NO_PROGRAM_CACHE` (set) | Neither reads nor writes `hookshot_programs.bin` and the pipeline notes |
| `RX_VK_PROGRAM_CARRY=0` | The program cache (`triforce_programs.bin`) is good for one build of the translator only, as before: any change to its files, a log line or a host option's number in `gpu/vk/vk_api.h` too, translates every program again, and the pipeline cache, the pipeline notes and the prepare's record go with it. By default the cache is carried over an update that changed nothing of what translates (`gpu/vk/program_carry.h` has the rule, `tests/test_program_carry.py` holds it): the translation stamp (`nx2/build.py` `translation_stamp`) is the translator's files without `vk_api.h`, without the parts of `vk_shader.cpp` marked as outside it, and without comments, blank lines and spaces at lines' ends. The log's `vk: program cache` line at the start says whether the programs were kept, carried over an update of the translator (and from which build), or translated again (and how many the cache had); while they are translated again a line now and then counts them. Switching it either way translates every program once more |
| `RX_VK_PROGRAM_CARRY=0` | The program cache (`triforce_programs.bin`) is good for one build of the translator only, as before: any change to its files, a log line or a host option's number in `gpu/vk/vk_api.h` too, translates every program again, and the pipeline cache, the pipeline notes and the prepare's record go with it. By default the cache is carried over an update that changed nothing of what translates (`gpu/vk/program_carry.h` has the rule, `tests/test_program_carry.py` holds it): the translation stamp (`nx2/build.py` `translation_stamp`) is the translator's files without `vk_api.h`, without the parts of `vk_shader.cpp` and `vk_bank.cpp` marked as outside it, and without comments, blank lines and spaces at lines' ends. The build log's `build: translation stamp` line says whether it is the last release's (`nx2/released_translation_stamp.json`, which players' caches are for, and which `tests/test_program_carry.py` holds this source to) or which stamped files moved it against that release; a second line, in brackets, compares it with the previous build in the same folder (its record: `translation_stamp.json` in the build folder, written once the objects are compiled). Both are about the build's part of the stamp: the runtime adds its own settings to it (`disk_stamp`). The log's `vk: program cache` line at the start says whether the programs were kept, carried over an update of the translator (and from which build), or translated again (and how many the cache had); while they are translated again a line now and then counts them. Switching it either way translates every program once more |
| `RX_VK_CACHE_SET=0` | (Triforce) No earlier set of the shader caches is kept or put back (`gpu/vk/cache_set.h` has the rule, `gpu/vk/vk_cache_set.cpp` the files, `tests/test_cache_set.py`). By default, when the caches' stamp changes and the build of the translator did not (a setting of the translation: the menu's Robust buffers row, the mesh shaders row, the GPU, an `RX_VK_` switch of the translation), the set there (the program cache and its index, the pipeline cache and the play file with their `.for`, the prepare's record with its `.check`, `.warming` and `.warming.skip`, the pipeline notes and what is kept beside them by the stamp) is renamed to `<name>.<stamp>.<ext>` when the disk has twice the set and 10 GB free, and `triforce_cache_set.kept.txt` lists it. One set is kept. A start whose stamp is the kept set's puts every piece of it back (a set with a piece missing is deleted), and the set it found is kept in its place; a start of another build deletes it. `triforce_cache_set.txt` names what the set there was made for, and the log's `vk: shader caches:` lines say which part of the stamp changed. A set put back while the player's `triforce_pipeline_states.bin` is not the one it was kept with leaves `triforce_cache_set.states.txt`, and the prepare before the title then goes through the state lists, so that what was met under the other set is built before the game. Files of a kept set's names that no record names (a start that ended in a swap) are deleted at the next start. `RX_VK_CACHE_SET=0` also deletes a kept set; `RX_VK_PCACHE_KEEP_OLD` and `RX_VK_NO_PROGRAM_CACHE` leave it off too (a kept set of this build stays, another build's is deleted) |
| `RX_VK_GPL=1` or `0`, `RX_VK_GPL_KEEP_LINKS` (set) | The fast pipeline link (`VK_EXT_graphics_pipeline_library`; `gpu/vk/gpl_rules.h`), on by default since options_version 5: a new pipeline is linked from its program's two shader libraries where the driver has them compiled, and the optimised build replaces it. The Debug tab's Fast pipeline link row is the same without an environment to set (`fast_pipeline_link=1`); the switch goes over the row. With it the preparation has its driver's part ("Compiling shaders"), which now goes on after a start that died in it, leaving out the programs that start had in the driver's hands (`triforce_prepared.bin.warming` and `.warming.skip`), up to three starts in a row. `RX_VK_GPL_KEEP_LINKS`: the linked pipelines the optimised ones replaced are kept for the run, as before, instead of destroyed 600 presents and 10 s later. `RX_VK_NO_WARM` (set): no driver's part; `RX_VK_GPL_SYNC` (set): a cold library is compiled in the draw; `RX_VK_GPL_NO_CACHE` (set): the libraries are not kept in the pipeline cache |
| `RX_VK_LIB_CHECK=0` | (Triforce, after NX2navi's e10ef60) On unless `0`. At a start whose record says the driver's part is made for these shaders and this driver, a sample of 12 kept program variants has its two stage libraries made as that part makes them, asking the caches only where the device can (the answer a draw's link gets; without the flag, `RX_VK_GPL_SYNC`, their time against a second making, which comes from the cache), twice, before the game (`gpu/vk/lib_check.h`). When more than half are cold (`mkw_vk_pipelines.bin` lost or refused, or the libraries built otherwise now without `kWarmRecipe` counted up) the driver's part is made again at once, as after a driver update, with its journal and skip list; warm, nothing more happens (some 50 library lookups). `triforce_prepared.bin.check` records that it did: a start that finds them cold again right after leaves them to the draws, as before (each try holds a start for minutes; remove the file to try again). A making again whose cache could not be saved is recorded the same way. A cache file over its bound is not made again at all. The log's `vk: stage libraries:` line says what was found |
| `RX_VK_SPV_PACK=0` | Every shader module kept for the whole run, as before. By default the SPIR-V of graphics and mesh programs is kept packed in memory (`gpu/vk/spv_store.h`, to about 0.37 of its size) and their shader modules, which the driver otherwise holds for the whole run, are made only for the time a pipeline is created with them, on the thread that builds it. Compute programs, the programs the preparation lets go and the programs a draw reads from the cache itself keep their modules. The log's `vk: shader code packed` lines say what it comes to and what it costs |
| `RX_VK_PCACHE_RAM=1` | Off by default (in its one session on, v0.4.0-test9, it gave back nothing the working set showed). With it, once the PC has had under 1.5 GB of RAM available at two looks a second apart, the pipeline cache (when it is 256 MB or more) is destroyed once no pipeline creation is using it (`gpu/vk/pcache_gate.h`): the pipelines built after that go without it and it is not saved again that session, so `mkw_vk_pipelines.bin` keeps its last save. The log's `vk: RAM short ...: the pipeline cache ... is let go` line says when and what the working set did. Whatever this switch says, the cache's save in play waits while a copy of it would not fit in the RAM available with 2 GB to spare (the save at the game's close does not), and the builder of the predicted pipelines behind the game rests while under 3 GB (or a tenth of a PC of more than 30 GB) is available (`gpu/vk/mem_parts.h`) |
| `RX_VK_WRITERS_WAIT_MS=<ms>` | (Triforce) How long the game's close waits for the files the renderer is writing on threads of their own (`gpu/vk/file_writers.h`; 2000 by default, `0`: no wait and nothing refused, as before). The close ends the process through ExitProcess, which stops every other thread where it is: the pipeline cache's save in play, the order file, a bug capture's or a debug picture, the hang report, the predicted pipelines' list, the frame log. At the close (`HOS_OPT_EXITING`) no such write begins any more and the ones under way are waited for; one still going at the bound is cut, and is one of the files written whole beside the old (`.part` / `.tmp`, then put in place: the prepared record `triforce_prepared.bin` and the `.for` files are now too), or a list whose reader takes whole records only. The log's `vk: exit: the files being written ... were waited for` line says how long, and what was cut |
@@ -187,13 +196,21 @@ case-sensitive, and an unknown one is ignored.
| `HOS_MEM_MAP_RESULT=0` | (Triforce) `MapPhysicalMemory` answers success even where Windows refused the commit, as before. By default it answers Horizon's LimitReached (`0x10801`), which the SDK turns into its out-of-memory result, and the log says `mem: MapPhysicalMemory ...: the commit failed` |
| `RX_VK_PRECOMPILE_KEEP=1` or `0` | The precompile keeps every pipeline it builds for the session (1), or keeps none of them: they are built for the caches and let go, and a draw that first needs one builds it from there (0). Unset or `auto`: kept where the RAM available at the precompile and what the game holds already (less what reading the pipeline cache added, except on AMD's driver: `own_for_keep`) come to 22 GB or more, on a PC of 20 GB or more (`gpu/vk/mem_parts.h` keep_all_pipelines); the log's `vk: precompile:` line says which and why |
| `RX_VK_PIPE_RELEASE=0`, `RX_VK_PIPE_RELEASE_EVERY=<presents>` | Every kept pipeline stays for the session, as before. By default, while the PC's RAM is short (under 1.5 GB available at two looks in a row), every 300 presents up to 512 of the kept pipelines no draw has had yet are given back to the driver (`gpu/vk/pipe_release.h`); a draw that needs one later has it built again by a worker. The log's `vk: RAM short: ... kept pipelines no draw has had given back` lines say how many and what the working set did |
| `RX_VK_PCACHE_CARRY=0` | The pipeline cache's file carried over a stamp change (`gpu/vk/pcache_carry.h`): at an update's preparation (Setup's "Preparing shaders", `HOOKSHOT_PREPARE_ONLY`) a `mkw_vk_pipelines.bin` made for other shaders is read all the same when it is this device's and driver's, within its bound, and at most 1.25 times its base (the size of the last set built fresh, kept beside it in `mkw_vk_pipelines.bin.base` with the carries since): the pipelines of shaders the update did not change are hits instead of hours of compiling. The cap is over every carry since the base was built, not a quarter more each time, and a carried cache may never pass the file's bound either. The preparation looks at a carried cache's size every 10 s while it builds and at each save: past the cap (or the bound), nothing more is built into it, it is not written, `mkw_vk_pipelines.bin.nocarry` names the new stamp (a preparation begun again after a Cancel starts fresh), and the preparation builds the driver's part again into a fresh cache: the compute pipelines the carried run built, from the program cache, then the stage libraries, nothing translated again (from the driver's own cache for what it had just compiled), which gets a new base. A carried preparation that is stopped (a Cancel, a closed window) saves its cache under the new stamp with its history marked open in `.base`: the preparation begun again reads it as carried still, capped the same (or, when `.nocarry` names the stamp, not at all), until a carried preparation goes through to its end. The log says `pipeline cache carried over a stamp change (N MB, base M MB)`. `0`: a file for other shaders is never read, as before (the rule of 11-14). The play file keeps its own rule |
| `RX_VK_PCACHE_CARRY_PROJECT=0` | The early drop of a carried pipeline cache (`gpu/vk/pcache_carry.h`). When the stage libraries are built into a cache carried over a stamp change, every 32nd program of the warm's order is built first, the others waiting for it, and the cache's growth over that sample, per program, times all the programs, is where it ends at this rate. With at least 1500 libraries in the sample, a projected growth of at least twice the room it had when they began (its cap, or the bound, less its size then) drops the carry at once, exactly as past its limit (not written, `.nocarry`, the driver's part built again into a fresh cache), a few minutes in rather than when it gets there: an update whose file was built by an older translator misses nearly every library and filled the cache for 34 minutes before it was let go. The sample is spread over the whole order, not its head: the notes' programs go first and the rest in the program cache's file order, and hits and misses come in stretches of it, so a head that misses while the rest hits would have been dropped for nothing. The notes' programs wait for the sample (a few minutes cold). The log says `the pipeline cache carried over a stamp change would grow to about N MB at this rate`. The compute pipelines' pass and the precompile keep the look past the limit alone. `0`: dropped only once past its limit, and the warm in its own order, as before |
| `RX_VK_PCACHE_MAX_MB=<MB>` | The bound on the pipeline cache's file, `mkw_vk_pipelines.bin` (`gpu/vk/pcache_bound.h`): a file over it is not read (the cache starts empty and the next save writes a new one), and data over it is not written (the file keeps its last save). Unset: an eighth of the PC's RAM, 2048 MB at least and 8192 MB at most. `0`: no bound, as before |
| `RX_VK_PCACHE_CARRY_MB=<MB>` | (Triforce, 11-18) The carry of the pipeline cache's file over an update that changed the translation (`gpu/vk/pcache_bound.h` `carried`): a file for other shaders is read all the same when it is no larger than this (1536 MB unset), leaves room under the bound for as much again and the PC has 31 GB of RAM or more (Windows), so the driver finds what it compiled for the shaders that did not change (AMD's driver keeps no cache of its own for these). `0`: never carried, the rule of 11-14 alone |
| `RX_VK_PCACHE_PLAY_FILE=0`, `RX_VK_PCACHE_FOLD_MB=<MB>` | The pipeline cache's play file (`gpu/vk/pcache_play.h`, NX2navi's play cache): once the preparation is done, what a run compiles goes into a second cache with a file of its own, `mkw_vk_pipelines_play.bin` beside the first (a creation asks the first cache without compiling, then the play cache), and a save writes that small file; `mkw_vk_pipelines.bin` is written only when the preparation built into it. Before, a save after a few new pipelines wrote the whole file again (2.6 GB at the owner's start after its precompile). At a start whose play file has reached `RX_VK_PCACHE_FOLD_MB` (64) it is folded into the first cache, that session builds into it as before, and its first save writes it and removes the play file. Needs `pipelineCreationCacheControl`. `0`: no play file, as before |
| `RX_VK_WARM_SAVE_MIN=<minutes>` | (Triforce) Checkpoint saves of the pipeline cache during the shader preparation's long builds (`gpu/vk/warm_checkpoint.h`, `tests/test_warm_checkpoint.py`): while the driver's part (the stage libraries, about two hours cold on an RX 7900 XT) and the precompile build, `mkw_vk_pipelines.bin` is saved every 10 minutes once at least 1000 were built since the last save, so that a restart, a crash, a power cut or a kill goes on from the last checkpoint (what it saved comes back as hits) instead of from nothing. Each goes through the preparation's own save: the file's bound, a carried session's cap with its history kept open as a stopped one's (`RX_VK_PCACHE_CARRY`), the file written whole with its `.for` and `.base`; it is left out while a copy of the cache would not fit in the RAM available with 2 GB to spare or the disk lacks its size and 1 GB (asked again a minute later), fetched with room for what is built meanwhile, written to the disk before it takes the old file's place, given up when the window is closed or Setup's Cancel is pressed (the stop's own save writes the cache), due only while the part moves (a stuck one goes silent), and it does not count the part as made (the next start still runs it). Beside the file, `.own` says it holds this part's pipelines alone, so that a part over the file's bound after a crash ends as a new file over the bound, not as an older build's file made again from nothing. The log says `vk: the driver's part so far saved for a restart: N MB in X s`. Not on Intel unless `RX_VK_PCACHE_PLAY_SAVE=1` (its driver crashed fetching the cache while pipelines were built with it); `RX_VK_PCACHE_PLAY_SAVE=0`: on no card. `0`: saved at the end alone, as before |
| `RX_VK_FETCH_BOUNDS=0` or `1`, `RX_VK_NAN_BITS=0` or `1`, `RX_VK_GATHER_OFFSET=0` or `1` | The translation's vendor and driver workarounds (`gpu/vk/vk_vendor.h`) off or on for one run, whatever the GPU; the log's `vk: vendor fixes` line says which are on. By default: out-of-bounds texel fetches answered with 0 on every GPU but NVIDIA's; NaN tests on a value's bits on AMD's older Windows shader compiler (RX 5000 and RX 6000); gathers nudged by 1/512 of a texel on AMD's and Intel's drivers. They change the shaders' translation (one preparation of the shaders) |
| `RX_VK_NAN_SELECTS=0` | (Triforce, after NX2navi's e38f42a, issue #156) Where the NaN tests are made on the bits (`RX_VK_NAN_BITS`: by default AMD's older Windows shader compiler, RX 5000 and RX 6000), a float select of a constant whose bits are a NaN (an integer mask the translation types as a float) is also made a select of the bits, so that compiler cannot fold it into stray black or white blocks (`gpu/vk/spv_nan_select.h`: 32-bit selects, and 16-bit ones in a module that has a 16-bit integer type). It is applied where a module is made (`make_module`), outside the translation stamp: no program is translated again, nothing changes on any other card, and on those cards only the modules that have such a select are new to the driver's caches. So that those are compiled before the game rather than at their first draw or dispatch, the driver's part of the preparation, the light precompile's record and the predicted pipelines' record have a stamp of their own there: the first start on those cards goes through them once more, everything but those modules coming back from the caches (the variants on the driver's part's skip list are carried over). `RX_VK_NAN_SELECTS=0` leaves the selects as they are (the NaN tests on bits stay). The log says `vk: NaN selects: module <crc>, <n> float select(s) of a NaN constant made select(s) of the bits` for the first four modules and every 64th |
| `RX_VK_MIRROR=0`, `RX_VK_MIRROR_MB=<MB>` | No VRAM mirrors of the game's memory pools (on for discrete cards); their budget |
| `RX_VK_DEMOTE_QUICK=0` | A pool the CPU and the GPU both write is tried in guest memory (`vk_memory.cpp` `demote_trials`); by default a trial whose GPU time a frame is over 3 times its baseline and 5 ms more, after 3 frames or more, ends then, settling or measured, and is judged as a slower one is (mirrored again, measured again: `gpu/vk/demote_watch.h`). `0`: every trial runs its 10 settling and its measured frames, as before (in the owner's logs, some twenty frames of 100 ms for a pool at 106 ms against 7.4) |
| `RX_VK_IMPORT_AHEAD=1` or `0` | On by default with NVIDIA's driver (`=0` off). Off for test12 to test14: the GPU hung at the title in 6 of 12 lab runs; the cause, the game's freed pages decommitted under an import the background thread had not finished (`bg_held`), is closed and the lab's A/B with it was clean in 10 of 10 (`gpu/vk/import_ahead.h`). The ranges of the game's memory a run imported on a binding's own thread (8 to 17 ms each on an RTX 5090), whole as they were imported (their span over the game's pools included; the first version kept 16 MB chunks, which a binding across their ends imported again as one), are kept in `triforce_imports_ahead.txt` beside the game, at most 256, and the next runs import them on the background import thread as soon as the game's pools reach them, 4 at a look, at each change of the pool table and every 8 submissions (`gpu/vk/import_ahead.h`), each range once a session, and none while the PC's RAM is low (under 3 GB available, or a tenth of the RAM: the RAM's rule gives idle imports back then, and the two took turns on the same ranges in the owner's test9 session). A file of the first version's chunks is read as it is. Unset: off (it was on with NVIDIA's driver only, as `RX_VK_ASYNC_IMPORT` is); `1`: on any card; `0`: off. (Triforce) A race that fits the hang is closed since: the host decommitted the game's freed pages under an import the background thread had locked and not yet put in the pool table (`vk_memory.cpp` `bg_held`; `RX_VK_BG_IMPORT_HOLD=0`: not, as before, for the A/B); it stays off until a lab A/B with `=1` hangs no more. The log's `vk: imports ahead` lines count them and name the ranges sent, `vk: the game's pages ... are freed under a background import` the frees that window met; the stall line's "pools imported where bound" is what is left |
| `RX_VK_IMPORT_TOUCH=0` | Off: the pages of a range of the game's memory are not read before the driver imports it. On by default, on Windows, for the imports made on the background thread (`gpu/vk/import_touch.h`): the driver locks a range's pages inside `vkAllocateMemory`, faulting in the untouched ones, and a queue submit from another thread waits for it; the ranges imported ahead are up to 1 GB. Read first, outside the driver, the allocate of the 288 to 752 MB ranges went from 16 to 93 ms to 4 to 13 ms on an RTX 5090, and the longest queue submit beside an import in play from 71 to 93 ms to 10 to 12 ms. The log's `vk: import` lines give a slow import's parts: the first 12 of a session, and the first 48 of 64 MB or more. |
| `HOS_CRASH_THREADS=0` | Off: a crash report has the faulting thread alone. On by default, on Windows (`host/crash_threads.h`): a crash or fatal error's report ends with one `CRASH: beside it, thread ...` line for every other thread, its host stack as module and offset, taken at the report's start on a helper thread; the threads running code come first, then the ones waiting in the system. For the crash while a save loads, which reads an object whose memory holds something else: the lines say what the other threads were doing. |
| `HOS_CRASH_TEST_S=<seconds>` | (the lab's) A host thread reads address 8 that long after the start: a crash report on purpose, to look at one from a run in the game (its other threads' lines above). Not for play. |
| `EDEN_NX2_GM_LEAN=1` | Only the global-memory helpers a program's instructions call are put into its SPIR-V (`gpu/vk/eden/shader_recompiler/backend/spirv/gm_lean.h`). A stage that reads or writes through a pointer no storage buffer was tracked to carried every helper, six and for a storing stage eighteen, each with a search over every storage buffer in it. Off unless set: the SPIR-V is then what it was. An `EDEN_` name: each setting has its own program cache. The translator's files are in the translation stamp, so a build with this code translates every program again once, whatever the switch says. |
| `RX_VK_UPLOAD_AGAIN_MS=<ms>` | A texture uploaded before whose memory the game wrote again, met by a draw after the frame's uploads took this long (16), is uploaded at the next frame instead; its last bytes are drawn meanwhile, at most 8 frames in a row (`gpu/vk/upload_owed.h` `later`). New textures are never left so (theirs is `RX_VK_HOLD_MS`'s rule). `0`: every one at once, as before. The log's "left for the next frame" lines and the stall line count them. `RX_VK_UPLOAD_AGAIN_FRAMES=<n>`: a texture's upload is left so at most that many frames in a row (2: its last bytes drawn a frame or two at most; `8`: as before). With 16 ms nothing was ever left in the lab's runs (the frames with re-upload bursts took 9.8 ms of uploads); `3` spreads a burst over the frames after it, its textures a frame or two late meanwhile, which is why it is not the default |
| `RX_VK_UPLOAD_TORN=0` | (Triforce, wp18-flash) A texture uploaded before, 1 MB or more, whose storage the CPU has rewritten since the copy its re-upload would read (a capture's copy of one of its whole pages, every 16th and the last, differs from guest memory at the draw's look) keeps its last bytes for that frame and is uploaded at the next frame with what that frame's capture took (`gpu/vk/upload_torn.h`): a copy taken while the game was still writing the texture was test29's white frames at the Market after a tour (BC6H bytes passing through, decoded to bright colours the bloom spread over the picture). At most one frame in a row, and not for a texture found so in the two presents before (one the CPU rewrites every frame is uploaded as before). Not a dispatch's upload. `0`: uploaded at once, as before. The log's `re-uploads of storage the CPU rewrote since its capture` lines count them, those found and those left (with `0` too: the measure of how often a copy may have been taken mid-write) |
| `RX_VK_REUPLOAD_EARLY=0` | The textures the CPU keeps rewriting (uploaded again from its writes twice or more within 120 presents, 1 MB or more, sampled in the frame or the one before, not drawn into by the GPU) are looked at once on the replay thread before a parallel replay's segments begin, after the dry pass, their uploads in the recording before the segments: not made by a segment under the recording lock, where the other recording threads queued behind them (lab S2 after a tour: 4 to 12 such uploads of 28 to 84 MB in ~13% of the frames, the descriptor time 24 ms over the threads against 3). `0`: the segments' looks alone, as before. The log's `textures the CPU keeps rewriting, looked at before` line says how many and how long (`gpu/vk/reupload_early.h`) |
@@ -213,6 +230,9 @@ case-sensitive, and an unknown one is ignored.
| `RX_VK_VIEW_KEEP=0` | Any texture's end (an eviction, a dead render target let go, a texture made BC3 from BC1, the compaction moving one) makes every texture look of every recording thread stale, and each is resolved anew when next met (the slot, the cache, the view, under the parallel replay's lock), as before. By default a thread that finds the destroy generation moved keeps the looks of the textures whose views did not go: those are noted by their creation number before the generation moves (`gpu/vk/view_keep.h`, `vk_draw.cpp` `texture_view_of`); never a look of no texture or no view, nor a flat texture's 3D copy. More than 1024 gone since a thread's last pass: all resolved anew. The log's `vk: texture looks kept` lines count them, the stall line the views resolved anew. After NX2navi's `tex_gen_undo` |
| `RX_VK_DESC_KEEP=0` or `check` | The per-binding reuse of a draw's descriptors (`gpu/vk/desc_keep.h`, on by default): a draw that builds its descriptors takes, for each sampled texture, user uniform buffer, stage's constants and read-only storage buffer, what the program's last draw on that thread resolved it to, while everything it was resolved from is the same: the texture's handle, its slot's registration, the samplers', no texture destroyed or made again, no texture left for later and the same submission; the buffer's address and size, no inline uniform update, no pool moved or mirror made, the same recording. `0`: every descriptor resolved, as before (so also with `RX_VK_NO_DESC_REUSE`, `RX_VK_SAMPLER_CACHE=0` and the descriptor diagnostics). `check`: every descriptor resolved too, and one that comes out otherwise than what was kept for the same inputs is counted and logged (`vk: descriptor reuse check`): the way to try the rules. The frame statistics' `a frame's descriptors` line says how many were resolved and taken, how many pushes were whole, of the changed bindings or of nothing, and how many sets were written, through a template, or bound again |
| `RX_VK_DESC_SIG=0` or `check` | The whole-draw skip by the signature of a draw's descriptor inputs (`gpu/vk/desc_sig.h`, on by default with the per-binding reuse): a draw whose bindings moved, of the program whose descriptors its last draw pushed in that command buffer, first reads what each of them is resolved from (a texture's handle and its slot's version, a user uniform buffer's address and size, a read-only storage buffer's address and size words, a driver bank's stage generation) and the stamps the per-binding reuse gives each kind; when that equals the signature the pushed descriptors were built from, and their build kept every one, the build and the push are left out (a build would take each of them again and push nothing). Push programs only, of the kinds the per-binding reuse keeps: not those with storage buffers they write, tables, texel buffers or storage images, not the mesh fallback or RenoDX's. `0`: built, as before. `check`: built too, and one that comes out otherwise than what is pushed is counted and logged (`vk: descriptor signature check`). The frame statistics' `a frame's descriptor signatures` line says how many draws read theirs and how many were kept whole |
| `HOS_OOT_TEX_COMPACT_MS=<n>` | (the lab's) The game's texture data compaction (its `aglTextureDataMgr::Compaction` thread moves a texture's data in the game's heap, a cycle of about 18 frames; idle in a fresh Market, at work at every ask after a tour, where each move is a texture at a new address for the renderer to capture and check): at most one cycle started every n ms. `-1` (a test): none started. Unset or 0: as shipped. The cycles started are logged every 10 s either way ("oot: texture compaction in"). `host/oot_tex_compact.c`, `tests/test_oot_tex_compact.py` |
| `RX_VK_TEX_WARM=1` | Textures made and uploaded ahead, while the frames are light (`gpu/vk/tex_warm.h`; off unless set). A texture is made and uploaded where a draw first samples it, and the frame's budget for that (12 ms, 64 MB, the picture held) applies only to targets drawn in the frame before, so an area's first frame, whose targets are new, takes every texture of the area at once: 350 to 800 uploads of 250 to 390 MB, 100 to 180 ms, in the lab's tours. With the switch every registered slot is noted, and at the start of a game's submit that follows a light frame (under 400 draws and dispatches: a loading screen, a menu) the noted textures, 8 frames old at least, are made and uploaded, 6 ms a frame. Bytes the game writes afterwards are uploaded again by the write marks, as before. "vk: textures made ahead in light frames" counts them. `tests/test_tex_warm.py` |
| `HOS_MEM_LIMIT=1` or `<MB>` | (the lab's) The game's memory held to what it is told it has, as the console holds it. The game is told 9809 MB, but nothing was refused until the PC's own commit ran out, and it holds 11.7 GB by its own count in a fresh Market and 13.5 GB after a tour (the `mem: census` line), with its GPU heap within 15 MB of full and its texture compaction running every frame. `1`: `AllocateMemoryPages` and `MapPhysicalMemory` are refused past the 9809 MB, and `UsedMemorySize` is the game's count; a number above 1: refused past that many MB. Unset or 0: as before. What the game does when refused is what the lab is to find out. `host/hos_mem.c`, `tests/test_mem_limit.py` Refused, the game asks again thousands of times, each ask a region taken and freed; a region of the game's own freed with none of its pages in it is no longer discarded (`hos_region_discard_needed`), and the regions it frees with pages in them are discarded with the thread's virtual core given up. Those two were the stutter when walking with the limit on: in a three-area lab run the game's own part of the frame was over 8 ms in 24% of the frames before and in 0.3% after (as without the limit), 63.8 fps to 100.0. **`=1` does not fit this build:** the heap takes 6.9 GB of the 9.8 and an area's resources need 4.7 GB and more, so a save's load can starve and stay on its loading screen for good (the owner's, 2026-11-20, read with the hang watch's stacks: the game at 9,807 MB, its load threads idle). Use a size in MB: `12800` loaded and played four areas without reaching it. |
| `RX_VK_DESC_SET_KEEP=0`, `RX_VK_DESC_TEMPLATE=0` | A program over the driver's push limit (32 descriptors on NVIDIA's, AMD's and Intel's drivers) has a set written for each draw that builds its descriptors. By default a set whose descriptors are all as those of the last one written for that layout in the recording is bound again instead, while no texture was destroyed or made again and no pool moved, and a set written is written through the program's descriptor update template (Vulkan 1.1). (Triforce, after NX2navi's `desc_template`) A program within the push limit has its descriptors pushed whole (in a new command buffer, or after another program at its bind point) through a push descriptor template of its own (`vkCmdPushDescriptorSetWithTemplateKHR`, one a program and bind point, from the same entries and packed array as a set's), not with the write structs the driver walks one by one; a push of the changed bindings only keeps its write structs. The frame statistics' `a frame's descriptors` line counts the pushes made through it. With `RX_VK_RECORDER` the packet copies the packed array (`gpu/vk/vk_recorder.h`). `RX_VK_DESC_SET_KEEP=0`: a new set each time; `RX_VK_DESC_TEMPLATE=0`: sets written and pushes made with the write structs; both as before |
| `RX_VK_CREATE_NEW_MS=<ms>` | While the hold is on, a sampled texture seen for the first time once the frame's makes took this long (8), or its uploads their budget, is not made yet (`vk_texture.cpp` `create_later`): the draw samples the dummy, the frame is held, the next frame makes it. The frame's first make always goes; never a dispatch's. `0`: made at once, as before (a texture left for later was made all the same). The stall line counts the textures made, their time, those not made yet, and the images made |
| `RX_VK_UNSWIZZLE_MT_MB=<MB>` | A block-linear level unswizzled on the CPU is split over several threads (a thread for each 2 MB, 8 at most) from this size (4); `16`: from 16 MB, as before |
@@ -247,14 +267,16 @@ case-sensitive, and an unknown one is ignored.
| `RX_VK_GEN_SEED=<n>` | The page write generations (`gpu/vk/write_gen.h`) start at `n` and not at 1 (decimal, or hex with `0x`; 2^62 at most). They are 64 bits; the 32-bit ones of earlier builds ran out after days of play, and textures and mirrors then kept old contents. `RX_VK_GEN_SEED=0xFFFF0000` takes a play test across 2^32 within seconds: the log says `the write generations start at` and, at the crossing, `this run has made 4294967296 write generations`, and nothing in the picture should change there |
| `RX_VK_DLSS=0/1/2`, `RX_VK_DLSS_PRESET=<letter>`, `RX_VK_DLSS_LOG=1`, `RX_VK_REFLEX`, `RX_VK_REFLEX_LOG=1`, `RX_VK_ANTILAG=0/1` | NVIDIA DLSS and Reflex, and AMD Anti-Lag 2, for one run (`=-` on Reflex or Anti-Lag 2: its extensions not even enabled): the readme's NVIDIA DLSS section. `RX_VK_DLSS_TRACE=<frames>` logs one frame's large draws every that many frames, `RX_VK_DLSS_DEBUG=motion` shows the motion vectors, `=alternate` the game's own upscale every other frame |
| `RX_VK_FSR4=0/1/2`, `RX_VK_FSR_DIR=<folder>` | AMD FSR 4 for one run (0 never, 1 FSR 4, 2 its Native AA), and another folder for AMD's DLLs (not from `hookshot_env.txt`): the readme's AMD FSR 4 section. `RX_VK_FSR4=1/2` and `RX_VK_DLSS=1/2` go over the Upscaler row, a saved FSR 3.1 too where the engine they ask for runs; `RX_VK_FSR=1` goes over them (one upscaler at a time; `=2`: FSR 3.1 as its Native AA, the 3D at full size). The DLSS trace and debug switches above apply to FSR 4 too, on the frame chain they share |
| `RX_VK_FSR4_FG=0/1` | AMD FSR 4's frame generation, the Frame generation row's AMD FSR 4 (`gpu/vk/vk_fsr4.cpp` `fsr4fg`): 0 never in this run (`RX_VK_FSR4=0` too, which keeps AMD's library unloaded); 1 any frame generation AMD's library lists for the card counts, an FSR 3.1 one too, so the path can be tried on a card without FSR 4's (the row then offers AMD FSR 4 there; the log names the version in use) |
| `RX_VK_FSR4_DRS=1`, `RX_VK_FSR4_AUTO_EXPOSURE=0` | (Triforce) AMD FSR 4's context as before, for comparing (`gpu/vk/vk_fsr4.cpp` `make_context`, `gpu/vk/temporal_rules.h` `plan_context`): `RX_VK_FSR4_DRS=1` one context with FSR's dynamic-resolution flag for every render size from the start, where a fixed Render resolution otherwise gets a context of its own size without it (and the game's dynamic resolution one with it once the size first changes); `RX_VK_FSR4_AUTO_EXPOSURE=0` its HDR contexts (Upscale before bloom, or an RGBA16F picture with RenoDX's HDR Native) without FSR's auto exposure. A creation or evaluation of DLSS or FSR 4 that fails leaves the game's upscale for 2 s and is tried again; the fourth failure in a row turns that engine off (the Upscaler row then shows Game and says so) until the row is set again |
| `RX_VK_SHARPEN_3D=0`, `RX_VK_FSR3_BOOST=0`, `RX_VK_UPSCALE_LOD_BIAS=0/<negative>` | (Triforce) For comparing with before (`gpu/vk/sharpen_rules.h`): the Sharpness row sharpens the 3D before the HUD with DLSS, DLAA, FSR 3.1 and FSR 4 (FSR 3.1's own RCAS, FSR 4's own sharpening, FSR 3.1's RCAS pass over DLSS's picture) and then nothing at the window; `RX_VK_SHARPEN_3D=0` the finished picture at the window for every upscaler, the HUD with it, as before. `RX_VK_FSR3_BOOST=0` FSR 3.1's sharpness the row's alone, without the share towards the most below three quarters of the output's width. `RX_VK_UPSCALE_LOD_BIAS=0` no texture LOD bias while DLSS or FSR scales the 3D with jitter (unset: log2(render / output) - 0.5 in quarters of a level, so -1.5 at Performance, -1 at Quality and -0.5 at the Native AAs, on the wrapping, mipmapped textures of the draws into the scene at the upscaler's render size (or, in the frame the dynamic resolution steps, at the size the scene's camera is drawn at), never the shadow maps, captures, other passes or dispatches; the log says `vk: texture LOD bias` at each change); a negative number, such as `RX_VK_UPSCALE_LOD_BIAS=-1` or `=-1.5`, that bias (-3 at most) in the same draws and only while an upscaler with jitter runs, for trying other values (the log says it once at the start) |
| `RX_VK_FSR4_FG=0/1/4` | AMD's frame generation, the Frame generation row's AMD FSR (`gpu/vk/vk_fsr4.cpp` `fsr4fg`): 0 never in this run (`RX_VK_FSR4=0` too, which keeps AMD's library unloaded); 1, as without it, the newest frame generation AMD's library lists for the card, FSR 4's where listed (RX 9000), else FSR 3.1's (3.1.6 on RX 6000 and 7000), the row naming it ("AMD FSR (3.1.6)") and the log the version in use; 4 FSR 4's alone, as before (FG-1) |
| `TRIFORCE_MENU_AHEAD=0` | (Triforce) What the options' rows ask of NVIDIA's and AMD's libraries (whether DLSS, FSR 4 and FSR 4's frame generation run here: NGX's start, AMD's loader) asked at the options' open on the presenting thread, as before, and not once on a thread of its own as soon as the game runs (`gpu/vk/vk_menu.cpp` `menu_ahead`; its log line says how long each took). For comparing: the first open waited about 2 s for them in test11 |
| `RX_VK_AA=<0..3>`, `RX_VK_AA_KEEP=1` | The anti-aliasing for one run, over the Insert menu's Anti-aliasing row: 0 the game's own SMAA, 1 none, 2 FXAA, 3 SMAA at its Ultra preset in its place (`gpu/vk/aa_rows.h`, `gpu/vk/vk_aa.cpp`). Unset, the row decides; with DLSS, DLAA or FSR drawing, neither applies. The game's SMAA is three compute programs known by their keys (game build `e0f3ccfa`): with another choice in effect its composition is replaced and its edge and weight passes are left out, and `RX_VK_AA_KEEP=1` keeps those two running. The log says `vk: aa:` when a composition is first replaced, why one was left to the game, and when none was found for a minute |
| `RX_VK_ASYNC=1` | The replay on a thread of its own instead of the game's submitting thread |
| `RX_VK_AA=<0..3>`, `RX_VK_AA_KEEP=1` | The anti-aliasing for one run, over the Insert menu's Anti-aliasing row: 0 the game's own SMAA, 1 none, 2 FXAA, 3 SMAA at its Ultra preset in its place (`gpu/vk/aa_rows.h`, `gpu/vk/vk_aa.cpp`). Unset, the row decides; with DLSS, DLAA or FSR drawing from the tone mapped picture (Upscale before bloom off) the game's SMAA is left out (none: they want jittered frames no other anti-aliasing has been over), and before the bloom it runs as the game's; the switch goes over both, for an A/B (`RX_VK_AA=0`: the game's SMAA under the upscaler). The game's SMAA is three compute programs known by their keys (game build `e0f3ccfa`): with another choice in effect its composition is replaced and its edge and weight passes are left out, and `RX_VK_AA_KEEP=1` keeps those two running. The log says `vk: aa:` when a composition is first replaced, why one was left to the game, and when none was found for a minute |
| `RX_VK_ASYNC=1` | The replay on a thread of its own instead of the game's submitting thread (off by default). The game still presents only once the GPU has run its frame, so nothing is released early. (Triforce, `gpu/vk/async_rules.h`; not yet run in the game) With it on, each with a switch of its own to put it back: a signal of the CPU's takes its capture on the game's thread only when a submission handed over before it may still wait for that event, which the host tells at the submit (`RX_VK_ASYNC_EVENT_NOTES=0`: at every signal while the thread has work, as before; the `vk: the replay thread: ... signals of the CPU's` line counts both); the submit's capture shares its copies with the copy helpers and has them all made before the hand-over (`RX_VK_ASYNC_CAPTURE_BEHIND=0`: every copy on the game's thread); the game's submit keeps its virtual core for the hand-over (`HOS_ASYNC_KEEP_CORE=0`: given up and taken again); the game's present poll waits for the replay thread asleep and looks at its event between yields only once the GPU has the frame (`HOS_PRESENT_POLL=0`: the game's own sleeps); a present runs the jobs behind it until the frame's stopped work has gone on and then makes go only what was already stopped at the present before (`RX_VK_PRESENT_DRAIN=1`: every present forces every stopped queue past its wait, as before; `=0`: none does; `RX_VK_PRESENT_WAIT_MS`, 8: how long it runs the jobs behind); and the thread looks for its next job for 100 µs before it sleeps (`RX_VK_ASYNC_SPIN_US=<0..1000>`). Still open, and why it stays off: after a ten-area tour the player's character is drawn black for one frame, 0 to 3 times a minute at the Market (`gpu/vk/async_rules.h` has what the lab ruled out). Two diagnostics for it: `RX_VK_LOG_READBACK_ZERO=1` logs each readback of GPU results that is all 0 where it was not at its readback before, and `RX_VK_REGION_TRAP=1` (with `RX_VK_PASS_TRACE=1` and the frame log) logs the passes of the last frames and writes their render conditions to `region_cond_<n>.txt` when the picture's bottom middle goes dark for a frame, eight times a run. `RX_VK_ASYNC_FORCED=1`: the thread as it was before 11-14, every catch-up forcing |
| `RX_VK_OCC_QUERY=0`, `RX_VK_OCC_QUERY_SKIP=<addr>[,...]`, `RX_VK_OCC_COND=0`, `RX_VK_OCC_LOG_COND=1` | (on by default since 11-17: +2.7 to +4.6% fps in every scene measured, 10-12% fewer draws, no flicker added; `RX_VK_OCC_QUERY=0` turns it off) The game's samples-passed reports (which objects show; a count of 0 is not drawn) get their real counts: the replay still writes each report as it passes it with 4096 (`RX_VK_OCC_FIXED`, everything visible), and the draws from its reset are counted by Vulkan occlusion queries (precise where the card has them); once the GPU is done with the recording that holds them the count is written into the report's record over the 4096, as NX2navi writes it at completion. The done recordings are found with one look at the recordings' timeline (nothing waits) as a game's fence wait ends (the game reads its counts after it), at each recording's begin and each present, at the latest when the recording's slot comes round. The game's report records rotate (a ring: an address is another object's at its next report), so a count is written only while its report is still the newest at its address, and only when it is whole (every query available, no draw left out, reset and report in one recording, read back within 8 presents); otherwise the record keeps its 4096. The game also predicates draws and clears on these words (render conditions), decided as NX2navi decides them: a word whose newest report is a samples-passed one whose count is still to come is unknown and the condition renders; a word whose count was written (or for which none comes) is read from memory as before, where a written 0 skips the draws and clears it gates. A count goes in only over the value the replay left in the word (a compare-and-write: never over the game's CPU re-arming the record), and a record rewritten in the stream after its report (a small buffer clear, a report of another counter type) gets no count. A parallel replay's segments signal the recordings' timeline and are sealed as they are submitted, so their counts are written too. The count word is written as the replay writes a report (`guest_cpu_write`, and the word kept out of the mirrors' write-backs). With hostQueryReset (Vulkan 1.2) a recording's queries are reset on the CPU once read, only those it used. `RX_VK_OCC_QUERY_SKIP`: report addresses that keep the fixed answer (the log's `occlusion query sites` lines list the first 64 addresses with their counts). The log's `occlusion queries` line every 600 presents: the reports, how many were counted whole and why not, the counts written at completion (and of them 0), those not written and why (lost, superseded by a later report at the address, late, a render condition's), the mean latency in presents and how many were written after the next present, where the done recordings were found, and the render conditions on samples-passed words (rendered because a count was pending, rendered or skipped from a written count, from memory with no count to come, as before in the knob's off phases) with the draws and clears they skipped. `RX_VK_OCC_COND=0`: a condition on a samples-passed word always renders (the counts are still written), to tell the counts from the skips. `RX_VK_OCC_LOG_COND=1`: one such condition in 499 logged (300 lines), with both words, their sources (pending, written, memory) and the present. Lab: the knob `occq` in `RX_VK_LAB_AB` runs the queries the whole run and writes the counts of the reports made in its phases (`gpu/vk/occ_answer.h`, `vk_replay.cpp` "occlusion queries") |
| `RX_VK_GATE_WAIT_MS=<1..100>` | (Triforce, off unless set, after NX2navi's `gate_wait_ms`, whose default is 10; not yet run in the game) A submission whose first command buffer begins (after state only) with a wait for an event the game signals from the CPU, unmet in the replay's order, waits at its submit for that signal, at most this long, before its capture and its replay (`gpu/vk/gate_wait.h`, `gpu/vk/vk_replay.cpp` `gate_wait_signal`): the capture then holds what the game wrote up to its signal, and the submission is replayed in the submit call on the submitting thread, instead of stopping at the wait and going on from the order thread (`sync_watch`) with a second capture once the signal came. The wait holds no lock and looks at the event's word in the game's memory. One that runs out goes as before; after 4 that ran out, once they are more than a tenth, it is off for the run (logged). A `vk: RX_VK_GATE_WAIT_MS` line every 600 waits gives their mean and how many ran out; the order line's `captures at a CPU event's wait` and `made to go by presents` say how often the old way was taken |
| `RX_VK_CAPTURE_BEHIND=0` | (Triforce, on by default; `=0` as before) The submit-time capture (`gpu/vk/vk_memory.cpp` `capture_make`) takes the write marks on the game's submitting thread and copies there only the pages read at once (the late pages and the texture storage); the rest of its copies, in parts of 32 pages, go to the capture's copy helpers while that thread replays the submission (`gpu/vk/capture_behind.h`). A read of a page as submitted copies its part itself when no helper has taken it yet, or waits for the helper; every part is done and flushed before a recording is submitted and before the thread goes back to the game. Only with the replay on the submitting thread (not `RX_VK_ASYNC=1`), with copy helpers (`RX_VK_CAPTURE_THREADS`, not `RX_VK_LOW_SPEC`), at least 128 pages behind and at most 512 ahead (a scene's load: copied whole as before). At the Market the old copy was ~0.25 ms of each submit's ~0.35 ms capture, six submits a frame. The 120-present line `a frame's captures at the game's submits` gives their time on the game's threads (the scan, the copies made there, and the copies behind made or waited for by the replay), the MB copied and behind, and who copied the parts; the stall line names the captures when they took 1 ms or more |
| `RX_VK_PARALLEL=<0..8>`, `RX_VK_PARALLEL_AUTO=<2..8>` | The parallel replay: a frame's large command buffers recorded on that many threads, always, or wherever short trials as the game runs find it faster than the replay thread alone; `RX_VK_PARALLEL=0`: never. The Debug tab's Replay helper threads row is the second without an environment to set (`replay_helper_threads=` 1 to 7 for 2 to 8 threads); either switch goes over the row. The row's Automatic (8), which it is unless the options file says otherwise, is the count `gpu/vk/replay_threads.h` gives the PC: none, on every PC since 11-17 (it was 2 or 3 with five cores or more: in the owner's play the helper threads brought 10-25 s stretches at 39-48 fps when moving, the game's own frame time 4 to 10-13 ms, and with none there were none); a count on the row, or `RX_VK_PARALLEL_AUTO`, still runs them. The log says at the start what was chosen (`replay helper threads:`) and at each trial which way is in use (`parallel replay, trial`). Between trials the tuner's rule (`gpu/vk/replay_threads.h` `rule`) judges every 120 frames on the replay thread alone: where the replay is plainly the frame's limit (70% of the frame or more) and the helper threads would take at least 1 ms and a tenth of the frame off it, never counting below the GPU's time (the game waits for each frame's GPU work), they are turned on without a trial; where they cannot pay (no command buffer large enough to cut, the GPU's time about as long as the replay's, or the replay under 60% of the frame: the game's own threads are its limit) no trial is made while that holds; trials decide the rest, and a trial that takes the helpers back off holds the rule's "on" for 3,600 presents. The log says so (`parallel replay, the rule`) when its verdict changes. `RX_VK_PARALLEL_RULE=0`: trials only, as before. With DLSS or FSR on, for upscaling or frame generation, the dry pass tells their hooks in the draws in stream order, and each command buffer from the first draw or dispatch that takes what they noted (the upscale, or the engine's point before the bloom) on is recorded in order after the segments before it (`gpu/vk/stream_order.h`); `RX_VK_PARALLEL_TEMPORAL=0`: the replay thread records alone then, as before. The frame statistics' `a frame's parallel replay:` line says in how many frames the threads recorded, the command buffers in segments and alone (and why), and the time in them; the next one (`its parts`) where that time went: the setup before the threads begin, how soon each command buffer's first segment reached the GPU, the helper threads' wake-up, each command buffer's longest segment, the replay thread's wait, the submits, the recording lock's waits, and the segments' GPU time (the `GPU time` line counts the segments too; it left them out). After each trial's line a `trial N's parts` line gives its three parts' frame, replay thread's time, GPU time, the rest of the frame, full barriers and draws, and the helper threads' parts. That header lists what an audit of the parallel replay found and fixed, and what is left. `RX_VK_NO_DRY_COPIES=1`: the dry pass does not mark what copies and texture clears write, as before. The replay thread records the next segment to submit itself when no helper thread has begun it (it only waited before, on the core kept for it); `RX_VK_PARALLEL_OWN=0`: it waits for the helper threads, as before. `RX_VK_PARALLEL_SEG=<32..>`: the draws and dispatches a segment is cut for (160); `RX_VK_PARALLEL_SEGS=<2..12>`: the most segments a command buffer is cut into (6), without which a smaller `RX_VK_PARALLEL_SEG` cuts no finer once a command buffer has six segments' worth |
| `RX_VK_PARALLEL=<0..8>`, `RX_VK_PARALLEL_AUTO=<2..8>` | The parallel replay: a frame's large command buffers recorded on that many threads, always, or wherever short trials as the game runs find it faster than the replay thread alone; `RX_VK_PARALLEL=0`: never. The Debug tab's Replay helper threads row is the second without an environment to set (`replay_helper_threads=` 1 to 7 for 2 to 8 threads); either switch goes over the row. The row's Automatic (8), which it is unless the options file says otherwise, is the count `gpu/vk/replay_threads.h` gives the PC: none with four cores or fewer or on AMD's driver for RDNA 1 and 2, 2 threads with five to seven cores, 3 with eight or more. The log says at the start what was chosen (`replay helper threads:`) and at each trial which way is in use (`parallel replay, trial`). Between trials the tuner's rule (`gpu/vk/replay_threads.h` `rule`) judges every 120 frames on the replay thread alone: where the replay is plainly the frame's limit (70% of the frame or more) and the helper threads would take at least 1 ms and a tenth of the frame off it, never counting below the GPU's time (the game waits for each frame's GPU work), they are turned on without a trial; where they cannot pay (no command buffer large enough to cut, the GPU's time about as long as the replay's, or the replay under 60% of the frame: the game's own threads are its limit) no trial is made while that holds; trials decide the rest, and a trial that takes the helpers back off holds the rule's "on" for 3,600 presents. The log says so (`parallel replay, the rule`) when its verdict changes. `RX_VK_PARALLEL_RULE=0`: trials only, as before. With DLSS or FSR on, for upscaling or frame generation, the dry pass tells their hooks in the draws in stream order, and each command buffer from the first draw or dispatch that takes what they noted (the upscale, or the engine's point before the bloom) on is recorded in order after the segments before it (`gpu/vk/stream_order.h`); `RX_VK_PARALLEL_TEMPORAL=0`: the replay thread records alone then, as before. The frame statistics' `a frame's parallel replay:` line says in how many frames the threads recorded, the command buffers in segments and alone (and why), and the time in them; the next one (`its parts`) where that time went: the setup before the threads begin, how soon each command buffer's first segment reached the GPU, the helper threads' wake-up, each command buffer's longest segment, the replay thread's wait, the submits, the recording lock's waits, and the segments' GPU time (the `GPU time` line counts the segments too; it left them out). After each trial's line a `trial N's parts` line gives its three parts' frame, replay thread's time, GPU time, the rest of the frame, full barriers and draws, and the helper threads' parts. That header lists what an audit of the parallel replay found and fixed, and what is left. `RX_VK_NO_DRY_COPIES=1`: the dry pass does not mark what copies and texture clears write, as before. The replay thread records the next segment to submit itself when no helper thread has begun it (it only waited before, on the core kept for it); `RX_VK_PARALLEL_OWN=0`: it waits for the helper threads, as before. `RX_VK_PARALLEL_SEG=<32..>`: the draws and dispatches a segment is cut for (160); `RX_VK_PARALLEL_SEGS=<2..12>`: the most segments a command buffer is cut into (6), without which a smaller `RX_VK_PARALLEL_SEG` cuts no finer once a command buffer has six segments' worth |
| `RX_VK_PARALLEL_BACKOFF=0` | The tuner's trials as before: one every 1,800 presents after one that kept the way, each with 104 frames the other way. With the back-off (the default, `gpu/vk/replay_threads.h` `Tuner`) each trial that keeps the way, the other way longer than both of its own parts, puts the next one off twice as long (3,600, 7,200, then 14,400 presents at most; a margin of 10% or more counts twice), one too close to tell keeps the old interval (the first such one after a change of scene or way: 900 presents), and once the way has held so the other way is tried for 64 frames, not 104; a short trial that finds the other way shorter changes nothing itself, a full trial follows at once. The next trial comes early (900 presents after the last one at the soonest, never while the rule says no trial) when the scene clearly changes: two windows of 120 frames in a row whose draws moved by a quarter (200 at least) or whose replay or GPU time moved by 30% (1 ms at least) from the first window after the way was set, or a trial whose first and last parts did. In the lab's steady Market a trial came every ~2,090 presents, each ~100 frames 1.9 ms longer; the trial lines now end with when the next may come, and `parallel replay, the scene changed` says when one was brought forward |
| `RX_VK_RECORDER=thread`, `=defer`, `=sync` | (off unless set; not yet measured in the game) `thread`: the replay thread's `vkCmd*` calls packed with copies of their arguments into a ring and made by a recorder thread of their own, in order (`gpu/vk/vk_recorder.h`); the replay thread waits for it at every command buffer begin, end and reset, submit, wait, readback and destruction. Beside the Replay helper threads too (no longer refused with `RX_VK_PARALLEL`): a parallel replay's segments make their calls themselves, after the ring has been run (`segments_begin`), and the recorder is idle while they record. With it on, the frame statistics' `a frame's recorder thread` line says how many of the replay's calls it made a frame and in how long, and how long the replay thread waited for it; what it saves is the replay time line's `commands` with it against without it. `defer` and `sync` are its test steps (held and run on the same thread). `RX_VK_RECORDER_RING_MB` (8), `RX_VK_RECORDER_SPIN_US`, `RX_VK_RECORDER_STATS=0`, `RX_VK_RECORDER_POISON=1`, `RX_VK_RECORDER_PIN` (`next`, `sibling` or a mask) |
| `RX_VK_REPLAY_PRIO=0` or `1` | (Triforce, on by default, after NX2navi's `recorder_prio`; `=0` as before) A thread runs at the highest priority while it replays the game's frames (the submitting thread's replay and its capture, the present, the stopped work the order thread lets on: `gpu/vk/vk_replay.cpp` `ReplayPin`) and gets its own priority back after, so the game's code it runs between replays keeps the game's priority; the core kept for the replay is kept from the game's threads only, and the helper threads and the capture's copy helpers (above normal) outranked a replay at the game's priority there. A thread at that priority or above already is left alone. The replay thread of `RX_VK_ASYNC=1` and the recorder thread of `RX_VK_RECORDER=thread` take the level for good. `=1`: above normal. The log's `vk: a thread that replays runs at` line says which (`gpu/vk/replay_prio.h`) |
@@ -347,22 +369,24 @@ no other file.
`hookshot_options.ini`, in the game folder, holds the Insert menu's rows as `<key>=<number>`: the row's name in lower
case with `_` for spaces (`frame_generation=2`, `invert_camera_x=1`), except Output resolution, which is `output_res`.
`gpu/vk/vk_menu.cpp` writes the whole file at every change (`save`; (Triforce) merged by key with a change made outside the game meanwhile, and written whole: `RX_VK_OPTIONS_MERGE` above), with `options_version=4`,
`gpu/vk/vk_menu.cpp` writes the whole file at every change (`save`; (Triforce) merged by key with a change made outside the game meanwhile, and written whole: `RX_VK_OPTIONS_MERGE` above), with `options_version=8`,
`microphone_device=<name>` when a microphone is chosen by name, and the controls (`pad_<button>` and `key_<button>`:
the README's [Controls](../readme.md#controls)). A value outside a row's range is clamped when it is read. Where the
number is not the obvious one:
| Key | Values |
|---|---|
| `quality_preset` | 0 Custom, 1 Minimum (6GB), 2 Low (8GB), 3 Balanced (12GB), 4 High (16GB), 5 Ultra (20GB+); each sets Texture detail: Low, Reduced, Full, Full, Full |
| `gpu_device` | 0 Auto, n the n-th card with Vulkan 1.3 as the row lists them |
| `frame_generation` | 0 Off, 1 Auto, 2 to 8 the multiplier, 9 AMD FSR 4 (the made frame by AMD's frame generation library, `gpu/vk/vk_fsr4.cpp` `fsr4fg`; where that cannot run the value stays in the file and the row shows and runs 2x: `gpu/vk/framegen_rows.h`) |
| `frame_generation` | 0 Off, 1 Auto, 2 to 8 the multiplier, 9 AMD FSR frame generation (the made frame by AMD's frame generation library, FSR 4's or FSR 3.1's by the card, with the picture without the HUD; paused with HDR Native or RenoDX's RGBA16F scene, where the renderer's own makes the frame as at 2x: `gpu/vk/vk_fsr4.cpp` `fsr4fg`; where that cannot run the value stays in the file and the row shows and runs 2x: `gpu/vk/framegen_rows.h`) |
| `dlss_frame_generation` | 0 Off, 1 2x, 2 3x, 3 4x: NVIDIA DLSS frame generation, the Frame generation row's NVIDIA DLSS values (`gpu/vk/merged_rows.h`; read at the start, `gpu/vk/vk_dlssg.cpp`). The row sets `frame_generation` to 0 with it |
| `frame_rate_cap` | 0 60, 1 90, 2 120, 3 144, 4 165, 5 240, 6 the monitor's refresh rate; -1 45, -2 40, -3 30 |
| `frame_pacing` | 0 Off, 1 frames on an even line. With `steady_frame_rate`, the Frame pacing row (`gpu/vk/merged_rows.h`): Off is 0 and 0, Even 1 and 0, Steady (any rate) 1 and 1, Steady (refresh steps) 1 and 2 |
| `steady_frame_rate` | 0 Off, 1 any rate (the cap, then 200, 180, 160, 144, 120, 110, 100, 90, 80, 72, 66, 60, 55, 50, 45, 40, 36, 30 under it), 2 whole divisions of the display's refresh rate under the cap, from 30 up (`host/pace_steady.h`) |
| `resolution` | 0 Auto, 1 100%, 2 75%, 3 67%, 4 50% |
| `output_res` | 0 2048x1152, 1 2560x1440, 2 3840x2160, 3 1920x1080, 4 5120x1440, 5 5120x2880 |
| `resolution` | 0 Auto, 1 100%, 2 75%, 3 67%, 4 50%, 5 58%, 6 33% (with DLSS and FSR: 3 Quality, 5 Balanced, 4 Performance, 6 Ultra Performance; their Native (100%) is `dlss` 2, 5 or 6) |
| `output_res` | 0 2048x1152, 1 2560x1440, 2 3840x2160, 3 1920x1080, 4 5120x1440, 5 5120x2880, 6 5120x2160, 7 1536x864 (the handheld profile; before `options_version` 8 it was `handheld_profile=1`, read as 7) |
| `ultrawide` | 0 16:9, 1 16:10, 2 21:9, 3 32:9 (before `options_version` 6, 1 was the monitor's shape: read as the nearest of the four, `gpu/vk/ultrawide_rows.h`) |
| `hdr` | 0 Off, 1 Expanded, 2 Native (the game's own) |
| `hdr`, `renodx_hdr` | the HDR row (`gpu/vk/merged_rows.h`): `hdr` 0 Off, 1 Expanded, 2 Native (the game's own); `renodx_hdr` 1 with `hdr` 2 is Native + RenoDX |
| `nvidia_reflex`, `amd_anti-lag_2` | the Low latency row by the card's maker: 0 Off, 1 On, 2 On + Boost (NVIDIA alone) |
| `hdr_paper_white`, `hdr_peak_brightness` | nits: 80 to 400, and 400 to 10,000 |
| `renodx_tonemapper` | 0 Vanilla, 1 PsychoV35, 2 RenoDRT |
| `renodx_gamma_correction` | 0 Off, 1 2.2, 2 BT.1886 (2.4) |
@@ -370,16 +394,14 @@ number is not the obvious one:
| `renodx_tone_slope`, `renodx_highlight_saturation` | 0 to 100, 50 unchanged: the first PsychoV35's, the second RenoDRT's |
| `renodx_blowout`, `renodx_flare` | 0 to 100, 0 none: RenoDRT's |
| `renodx_hue_clip`, `renodx_hue_correction`, `renodx_color_grading` | percent, 0 to 100: 50, 100 and 100 out of the box; the first PsychoV35's, the others RenoDRT's |
| `dlss` | the Upscaler: 0 the game's own, 1 NVIDIA DLSS, 2 NVIDIA DLAA, 3 AMD FSR 3.1, 4 AMD FSR 4, 5 AMD FSR 4 Native AA, 6 AMD FSR 3.1 Native AA (the row shows it after FSR 3.1) |
| `upscaling` | 0 Off, 1 Catmull-Rom, 2 Lanczos |
| `dlss` | the Upscaler: 0 the game's own, 1 NVIDIA DLSS, 2 NVIDIA DLAA, 3 AMD FSR 3.1, 4 AMD FSR 4, 5 AMD FSR 4 Native AA, 6 AMD FSR 3.1 Native AA. The row names the engine; 2, 5 and 6 are its Native (100%) on the Render resolution row (`gpu/vk/upscaler_rows.h`) |
| `anti-aliasing` | 0 the game's own SMAA, 1 Off, 2 FXAA, 3 SMAA Ultra |
| `texture_detail` | 0 Automatic, 1 Full, 2 Reduced, 3 Low |
| `fps_counter` | 0 Off, 1 On, 2 Full (NX2navi's full performance overlay in the counter's place: `vk_menu.cpp` `draw_perf`, the frame times and the figures per frame `gpu/vk/perf_stats.h`, the machine's numbers sampled twice a second on a thread of their own `gpu/vk/perf_machine.cpp`) |
| `opaque_textures_as_bc1` | 0 Off, 1 On |
| `sharpness`, `rumble_strength`, `motion_sensitivity_x`, `motion_sensitivity_y` | percent |
| `mouse_sensitivity` | hundredths: 100 is 1.00 |
| `stick_dead_zone` | 0 Default (24%), 1 5%, 2 10%, 3 15%, 4 20%, 5 30% |
| `left_stick_dead_zone`, `right_stick_dead_zone` | -1 As Stick dead zone, 0 to 50 percent |
| `left_stick_dead_zone`, `right_stick_dead_zone` | -1 Default (XInput's ~24%), 0 to 50 percent (before `options_version` 8 a `stick_dead_zone` of 1 to 5, 5, 10, 15, 20 or 30% for both sticks, is read into each stick's own where it had none) |
| `vibration_curve` | hundredths, 20 to 150: the power on the motors' rumble, 100 is 1.00 (none) |
| `walk_key` | 0 Off, 1 Caps Lock, 2 Shift, 3 Ctrl, 4 Tab |
| `walk_scale` | hundredths, 20 to 90: 51 is 0.51 of the stick's travel |
@@ -390,7 +412,7 @@ number is not the obvious one:
| `microphone` | 0 Off, 1 Default, 2 and up a microphone (the name in `microphone_device` decides which) |
| `mouse_camera` | 0 As the stick, 1 Native |
| `layout_preset` | 0 Nintendo, 1 Xbox / PC, 2 Swap Face, 3 Custom |
| `button_prompts` | 0 Auto (the controller there at the start; none: the keyboard and mouse), 1 Switch, 2 Xbox, 3 PlayStation 4, 4 PlayStation 5, 5 Steam Deck, 6 Keyboard & mouse (`host/prompts.c`, `nx2/prompt_keys.py`) |
| `button_prompts` | 0 Auto (the controller there at the start, XInput's without a name the Xbox's; none: the device used last in the run before, `<user>/prompts_auto.txt`, else the keyboard and mouse), 1 Switch, 2 Xbox, 3 PlayStation 4, 4 PlayStation 5, 5 Steam Deck, 6 Keyboard & mouse (`host/prompts.c`, `nx2/prompt_keys.py`) |
| `replay_helper_threads` | 0 Off, 1 to 7 the parallel replay tried on 2 to 8 threads, 8 Automatic (the default; the Debug tab). A file that says 0 stays Off: delete the line, or choose Automatic on the Debug tab, for the default |
The Game language row is not in this file: its choice is the code line of `language.txt` in the game folder, which the
@@ -398,8 +420,18 @@ menu rewrites in place (`gpu/vk/game_language.h`: the code alone on that line, t
code the file itself names) and the host reads at the start (`host/nn_applet.c`). Nor are the Mod cheats rows: which
of a mod's cheats are on is the host's to keep, in `triforce_cheats.txt` (*Mods: code patches and cheats* above).
(Triforce) `options_version=8` grouped the rows and merged those that chose one thing twice (`gpu/vk/merged_rows.h`; the
436f9ac-based builds wrote 7 for it, which v0.5.1 had already given to Frame pacing's default: its 7 still has the old rows'
lines, so a file before 8 is moved, and one of those builds' 7, without them, keeps what it has). A file
from before keeps its values; these lines are read once and not written again, their rows' jobs done otherwise:
`quality_preset` (the textures' and the mirrors' memory budgets are the card's own, from its video memory), `upscaling`
(the window's filter follows the sizes: `gpu/vk/upscaler_rows.h` `auto_filter`, AMD FSR 1 when the picture is enlarged, the
plain copy otherwise and always with HDR Native), `reflex_frame_limit` (off, the old default, until Reflex holding the cap
with DLSS frame generation has been played: `RX_VK_REFLEX_LIMIT=1` for a run), `handheld_profile` (an `output_res`) and `stick_dead_zone` (each
stick's own).
The other rows are 0 Off and 1 On. Some are read at the start, before the menu exists, by the code that needs them:
`handheld_profile` and `output_res` (`host/nn_applet.c`), `ultrawide` (`host/hos_main.c`), `frame_rate_cap`
`output_res` (`host/nn_applet.c`; 7 is the handheld profile), `ultrawide` (`host/hos_main.c`), `frame_rate_cap`
(`host/nn_vi.c`; the monitor's rate is the display's the window opens on, rounded, 30 to 240, and 60 when it cannot be read), `robust_buffers`
(`gpu/vk/vk_main.cpp`), `texture_detail` (`gpu/vk/vk_texture.cpp`, at the first texture) and the controls (`host/nn_hid.c`).