mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-25 18:48:51 -04:00
Triforce v0.8.0
Evil HD (SMAA Ultra, 16x filtering, full textures, ambient occlusion with bounce light, sunlight shafts, foliage drawn 4x as far, the remastered texture pack's loader and the launcher's download of it), FSR 3.1 frame generation for every GPU, Intel XeSS, FSR 4 model choice, ReShade presets, Auto (this PC), HUD placement, the options menu in 13 languages, a second input for every control, hold to toggle, DualSense speaker and haptics, NFC from the player's own dumps, the above-60 fps game fixes, the Debug tab's flight and Inventory fixes, the launcher's full settings, and over 250 fixes.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
| `RX_VK_WB_SPANS=0` | (Triforce, 11-24) A CPU read of GPU results waits for the newest write-back noted on any 4 KB page it touches, as before. By default a read that covers its first or last page only in part waits there for the write-backs over its own bytes: the game keeps its culling tables double-buffered, two slots back to back whose seam is one page, and each frame's read of one slot waited for the submission that was writing the other. Never a later submission than the page rule's; the captures' looks at a page are unchanged (`gpu/vk/vk_memory.cpp` `wb_spans_on`, `tests/test_wb_spans.py`) |
|
||||
| `RX_VK_BUFFER_BUDGET=0` | (Triforce, 11-24) A host-visible buffer (the staging arenas, the read-backs' buffers) is made where the allocator prefers it whatever that heap's budget, as before. By default it is first asked for within the budgets, so that the allocator takes the next memory type when the preferred heap is full: on an AMD APU without resizable BAR the preferred heap is the carve-out's 256 MB window, a load's staging overran it and the driver then refused every submit (`submit ... failed (-2)`, a black screen with the sound going on). Where no heap has room the buffer is made as before (`gpu/vk/vk_vma.cpp` `create_buffer`) |
|
||||
# Hookshot (oot-recomp)
|
||||
|
||||
**Hookshot** is the port's name (as Skybound is TOTKPort's and BlueShell is mkw-recomp's); the maintainer's repository
|
||||
@@ -24,6 +26,12 @@ Studio's C++ tools; on Linux clang and lld. For the Vulkan back end: distro Vulk
|
||||
(`RX_CPM`, else `cpm` in the clone, else the old caches in mkw-recomp's `work/eg` or `..\Eglantine\.cache\cpm`).
|
||||
Without those the standalone build stops. [CONTRIBUTING.md](../CONTRIBUTING.md#development-setup) has the rest.
|
||||
|
||||
On Linux, `make_game.py` checks what the build needs before it reads or translates the game, and names every missing one
|
||||
in one error: the Python modules `requirements.txt` pins (a source build), the renderer's headers (CPM caches first, then
|
||||
`HOOKSHOT_*_HEADERS`, then `/usr/local` and `/usr`; not with the AppImage's prebuilt renderer), FFmpeg's libraries
|
||||
(`HOOKSHOT_FFMPEG` with `lib/libavcodec.a`, else `pkg-config`), clang (and clang++), and a test program linked with lld
|
||||
(`HOOKSHOT_SYSROOT` when set). The button-prompt packages stay optional; nothing is installed.
|
||||
|
||||
Run everything with `python -I` from this folder.
|
||||
|
||||
| Command | What |
|
||||
@@ -54,6 +62,16 @@ background when the existing "Controller in background" option or `HOS_INPUT_BAC
|
||||
alone drives the game until 5 s after its last press; without it the player's devices add to the script's presses. It
|
||||
is not a focus override.
|
||||
|
||||
### Log levels
|
||||
|
||||
A log line is info unless it says otherwise: `hos_log` and the renderer's `logf` write it as before. `hos_log_at(HOS_LOG_TRACE,
|
||||
...)` (`host/hos.h`) and `logf_at(log_trace, ...)` (`gpu/vk/vk_internal.h`) give it another level, written after the thread's
|
||||
tag: `[hos host] [trace] vk: ...`, and likewise `[error]`, `[warn]` and `[debug]`. The log file keeps every line; a log viewer
|
||||
can show info and above and keep the rest one step away, and one that does not read the tag shows the line with it. Per-item
|
||||
lines a player cannot act on (one per program or pipeline, a decoder's details) are debug or trace, among them the movie
|
||||
upscaler's networks a card leaves out (`vk: program ... not translated: a network left out on this card`, counted apart from
|
||||
the 30 lines real translation failures get); `HOS_TRACE`'s calls are trace. `tests/test_log_levels.py` checks the tags.
|
||||
|
||||
## Switches for testing and debugging
|
||||
|
||||
The running game reads its switches from the environment or from `hookshot_env.txt` beside `image.bin` (one
|
||||
@@ -80,10 +98,14 @@ screen. It costs some GPU time on cards that cull quickly, so it is off unless s
|
||||
| `HOS_WINDOW_NOACTIVATE` (set) | The window opens behind the others and does not take the focus (Windows) |
|
||||
| `HOS_FULLSCREEN=1` | Starts in fullscreen; the Insert menu's Fullscreen row is then left alone |
|
||||
| `HOS_ALT_MENU=1` | (Triforce, 11-22, after Casual Gamer's #dev-fixes post) A lone Alt is left to Windows, as before: it enters the menu loop on the window's thread, which during the start-up screen is the one waiting for the shaders, and the screen froze until a key was pressed. By default the window, which has no menu bar, answers that command itself (`host/display.c` `keymenu_dropped`, `tests/test_alt_menu.py`); Alt+Space's system menu, Alt+Enter, F10 and Alt+F4 are as they were |
|
||||
| `HOS_FLIGHT_JUMP=B` | (Triforce, 11-24) The Debug tab's No-clip flight takes off and lands with a double-tap of B and climbs while B is held, whatever the game's Swap Jump Controls says, as before (`=X`: X always). By default it is the game's own Jump: X (the keyboard's Space), or B with Swap Jump Controls on, read from the game's option `OptionData.IsChangeJumpButton` at Link's update (`host/flight_jump.h`, `host/nn_hid.c` `flight_jump`, `tests/test_flight_jump.py`). With B always, a double-tap of the Jump the player knew never took off |
|
||||
| `HOS_POUCH_LIVE=0` | (Triforce, 11-24) The Debug tab's Inventory sets an item's count in GameData alone, as before. By default the game's own pouch is given or loses the difference first, through the pouch manager's add (`f_8112d570`, the reason "Script") and remove (`f_833c4fa0`), as its event action OneShotAddOrRemovePouchContent does; the pouch then writes GameData itself, and GameData is set here only where the pouch refuses (the songs) (`host/pouch_live.h`, `host/hos_main.c` `oot_pouch_change`, `tests/test_pouch_live.py`). What the game does when it gives Link something is done for an item given here too: in a run on 11-24 the Kokiri Sword was equipped and the Goron's Bracelet and the Golden Gauntlets were worn at once (the gauntlets and the scales are the game's ability items, `ExpansionAbilityActor` `LiftableGrade` and `DiveDepth`). With GameData alone the pause menu showed them and none of that happened |
|
||||
| `HOS_AUDIO=0` | No sound device is opened (the mixer still runs); `scripts/run-vk.ps1` sets it unless `-Sound` |
|
||||
| `HOS_AUDIO_AUX=0` | (Triforce, 11-24) The game's Aux effects are accepted and passed through, as before: the mix they are on plays as it came. The default runs them: each 5 ms frame the mix's sent buffers go to the game's own effect code as whole frames (`ReadAuxSendBuffer`) and what it hands back (`WriteAuxReturnBuffer`) takes their place, silence when it has handed nothing back in time. Passed through, an effect's send was heard as one more dry source and the effect itself never. `HOS_AUDIO_EFFECTS=0` leaves them out too (`host/nn_audio.c` "Aux", `tests/test_audio_aux.py`) |
|
||||
| `HOS_AUDIO_EFFECTS=0` | The game's plain reverb, delay and biquad filter effects on its mixes and its splitter destinations' biquad filters are accepted and left out, as before they were emulated (the sound unfiltered and at full level: the "Volcano eruption audio bugged" ticket); the I3DL2 reverb still runs. By default they run on the mix buffers in the order the game added them (`host/nn_audio.c` "mix effects"; `tests/test_audio_mix_effects.py`) |
|
||||
| `HOS_LANGUAGE=<code>` | The game's language for this run, a code from `language.txt` |
|
||||
| `HOS_OUTPUT_RES=<0..8>`, `HOS_OUTPUT_SIZE=<w>x<h>`, `HOS_HANDHELD=1`, `HOS_ASPECT=<ratio>` | Over the options file: the output resolution (as `output_res` below), Custom's size (as `output_width` and `output_height`), the handheld profile, and the picture's shape whatever the Output resolution and the Ultrawide row say (a ratio, width over height: 2.3889 is 3440x1440's; the picture is the output's height in that shape, kept to 3840x2160's pixels). The Insert menu shows `HOS_OUTPUT_SIZE` and `HOS_ASPECT` in the rows they set, which then have nothing to choose |
|
||||
| `HOS_WIDE_UI=0\|1`, `HOS_WIDE_UI_LOG=<n>`, `HOS_HUD_MAX_RATIO=<ratio>` | (Triforce) The HUD's layout on a picture wider than 16:9 (`host/hos_wide_ui.c`, ozwaldorf's pane planner): with the Display tab's HUD position at Screen edges the HUD's side panes move out to the screen's edges, planned at each present from the panes as the game places them (`nx2/oot_wide.py` `UI_SITES`), so the row changes at once; with Menu sides at Extended the menus' side panes too. Middle, the default, plans nothing. Not on a picture narrower than 16:9. `HOS_WIDE_UI=0`: off, and Screen edges moves the HUD's panes as the layouts load (`host/prompts.c` `build_layouts`), as before; `=1`: Screen edges whatever the row. `HOS_WIDE_UI_LOG=<n>` logs the first n changes of the plan, each root layout and the plan's time; `HOS_HUD_MAX_RATIO` (12:5 by default, 0 none) is the widest the HUD's sides go |
|
||||
| `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 |
|
||||
| `RX_VK_FIRST_START_AUTO=1`, `RX_VK_FIRST_START_AUTO=<MB>` | (Triforce, 11-22, the performance audit's PRESENT-46, after Source A's; off by default) A first start sized to the card: with no options file, `RX_VK_LOW_SPEC` not asked and `HOS_DYNRES` not set, a weak card starts with the Render resolution row at 50% in place of Auto, or at 33% for an integrated GPU beside 4 processor threads or fewer (`gpu/vk/first_start.h`, `gpu/vk/vk_menu.cpp` `menu_first_start`, called from `mkwvk_init` once the device is made). Weak is Source A's tier 1: an integrated GPU (a handheld's is one; the `SteamDeck` variable is not read, it took desktops for handhelds), a card without mesh shaders, or 4.5 GB of video memory or less. Only that row is set: the upscaler, the textures and the output stay, and nothing is saved, so each start chooses again until the player saves options. A number over 1 plays a card of that many MB (the lab: `=4096` on a large card). Not set or `=0`: as before. Off until the owner decides what a first start on a weak card gets; unmeasured (Source A states no gain and tried it on one RTX 4070 Ti). One `menu: first start:` line says the choice |
|
||||
| `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 |
|
||||
@@ -96,6 +118,7 @@ screen. It costs some GPU time on cards that cull quickly, so it is off unless s
|
||||
| `RX_VK_DLSS_FEATURE_MAX=1` | (Triforce, 11-21, the upscaler audit's UPS-01) NVIDIA DLSS's feature made for the largest render size its quality mode allows, whatever the Render resolution row says, as before. NGX answers that largest size as the output's own, so at a fixed share the feature was made for 2.25 times the pixels it was ever given at Quality (4 at Performance, 9 at Ultra Performance), and the chain's colour, depth and motion images with it; the owner's log has DLSS's own video memory at 1069 MB for such a feature with preset M, where NVIDIA's table has 456 MB at 4K, and NVIDIA's guide says the cost of presets L and M follows the size the feature is initialized for. The default makes a fixed share's feature for its own render size; the row's Auto (the game's dynamic resolution), and any run in which the render size is seen changing under one output, make it for the mode's whole range as before (one feature made again when that is first seen). DLAA's is the output's either way. The `feature N made` line says which, and the status line's `its own ... MB` and `its images ... MB` are the measure (`gpu/vk/dlss_feature.h`, `vk_dlss.cpp` `prepare`). Not built or run in the game when it was written |
|
||||
| `RX_VK_DLSS_PREWARM=1` | (Triforce, 11-22, the performance audit's PRESENT-32, after Source A's: its first step; off by default) NVIDIA DLSS at the output's size takes the scaled quality mode whose range holds that size, and only NVIDIA DLAA the one-size mode (`gpu/vk/dlss_checks.h` `dlaa_feature`, `gpu/vk/vk_dlss.cpp` `prepare`). With the Render resolution row at Auto the game starts at the output's size and lowers it some frames later: before, a one-size feature and then a second one made in play (Source A's save load-in: 119 ms, then 29.5 ms 17 frames on); with the switch one feature, for its mode's whole range. Off by default because DLSS at full size then draws with the scaled mode's network, not DLAA's: a picture to compare first. The rest of the entry is not built: making the feature, the chain's images and a first evaluation ahead in a light frame (a title or loading screen) needs the first gameplay upscale's sizes and colour kind before it has happened, which only a run with DLSS can settle. `tests/test_dlss_prewarm.py` runs the decisions over a load-in |
|
||||
| `RX_VK_FRAMEGEN_REFRESH=1` | (Triforce, 11-21, the upscaler audit's UPS-05; off unless set) The Frame generation row's 2x to 8x make no more frames for each of the game's than the display's refreshes that fall in one frame of the game: the game's recent frame time over the display's period, rounded up, a tenth of a refresh forgiven, never more than the row's number and never fewer than the game's own frame. Without it the row's number is made whatever the display shows: the owner's log has 5x on a 165 Hz display with the game near 66 frames a second, 331 frames a second presented, each present call 2.2 to 3.0 ms (0.03 ms without frame generation) and the display thread's line `0 frames shown on time, 1655 late`. Auto and AMD FSR's row are not touched. A `vk: frame interpolation: N frame(s) for each of the game's` line says each change (`gpu/vk/framegen_refresh.h`, `vk_framegen.cpp` `framegen_record`). Not built or run in the game when it was written |
|
||||
| `RX_VK_FG_TIMELINE=0` | With the Frame pacing row Off, a fixed frame generation multiplier's frames go out as they come again, all within a millisecond. On unless set to 0: a set with made frames is shown a step apart, each frame at its own time, whatever the row says (with the row on they always were): shown at once on a swapchain that does not wait for a refresh, the game's frame covered the made ones (`gpu/vk/vk_framegen.cpp` `display_main`). Not built or run in the game when it was written |
|
||||
| `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_DLSSG_OWN_MOTION=1` | (Triforce, 11-22) NVIDIA DLSS frame generation is given the upscaler chain's motion, as before (`RX_VK_FG_OWN_MOTION` above). By default it is given the camera's alone, from FSR's inputs: with the chain's the owner's flicker of the whole picture while the camera moved came back on 11-22, with frame generation at 2x and DLSS at 50%, and it stayed with the upscaler audit's commits set back; with `RX_VK_FG_OWN_MOTION=0` it was gone. DLSS frame generation finds what moves by itself with its own optical flow. AMD's frame generation and FSR 3.1's interpolation keep the chain's (`gpu/vk/fg_motion.h`, `vk_fsr3_inputs.cpp` `chain_motion`). Not built when it was written: the same as the run with `RX_VK_FG_OWN_MOTION=0`, for DLSS frame generation alone |
|
||||
@@ -135,11 +158,15 @@ screen. It costs some GPU time on cards that cull quickly, so it is off unless s
|
||||
| `HOS_INPUT_LIVE=<file>` | A file the test appends lines of presses to, read every 30 ms; each line's times count from when it is read. A line `!cheat <n>` sends a Cheats page action, `!synclog` logs the NVN syncs (`!dump`, `!shots`, `!rdoc` and `!flasharm` are the WebGPU renderer's) |
|
||||
| `HOS_INPUT_FRAME_CLOCK=1` | The script's time runs at 60 game frames a second instead of the wall clock |
|
||||
| `HOS_INPUT_EXCLUSIVE`, `HOS_INPUT_BACKGROUND`, `HOS_INPUT_SCRIPT_BACKGROUND` (set) | As above; the last lets every device count while the window is behind another one |
|
||||
| `HOS_INPUT_RECORD=<file>` | (Triforce; unset: off) An input recording (`host/input_movie.c`, the format in `host/input_movie.h`): what the game is given each game frame, after every device and filter (the controller word and sticks, the flight and free camera cheats' inputs, the gyroscope, the native mouse camera's turns, the menu mouse's choices, the Debug tools' actions and rows), with Link's position and the camera's state as fingerprints. From the frame after Link's first update; `HOS_INPUT_FROM=boot`: from the game's first read. `HOS_INPUT_ROUTE=1`: no guest words or addresses in it (`HOS_INPUT_SAVE=<name>` noted in its header) |
|
||||
| `HOS_INPUT_PLAY=<file>` | (Triforce; unset: off) A recording given back in place of the player's devices, the script and the bridge, from the same point, then the player's input again; the log says where Link or the camera first left it, and its end how many updates did. With `HOS_INPUT_RECORD` (another file) the replay is recorded too. `HOS_INPUT_SYNC=<n>` (1; 0: never) puts the camera and Link back every n-th update where they left it, while Link is within `HOS_INPUT_SYNC_MAX` metres (1); past that the replay has diverged. Exact only at the 60 cap with `HOS_REALTIME_STEP=0`, `HOS_FIXED_TIME`, the same save and settings. A run that records or plays from its start has no movie pacing (`host/nn_vi.c`). The control bridge starts and stops either at run time (`triforce_ctl.py record` / `play`) |
|
||||
| `RX_VK_MENU_SCRIPT=<seconds>:<key>,...` | Timed Insert menu keys: `INS`, `UP`, `DOWN`, `LEFT`, `RIGHT`, `ESC`, `ENTER`, `TABL`, `TABR` |
|
||||
| `RX_VK_UI_PROMPTS=pad` or `keys` | The menu's button prompts for a controller or the keys, whatever was used last (screenshots) |
|
||||
| `RX_VK_UI_GAME_FONT=0` | The menu, the counter and the start-up screen in the included Libertinus, not the game's own font |
|
||||
|
||||
The presses are `<seconds>:<button>[+<button>...][/<ms>]`, separated by commas, for example `2:A,5.5:LUP/1500,9:ZL+R`.
|
||||
`MX=<counts>` and `MY=<counts>` in a press move the mouse that many counts each controller read while it is held, for
|
||||
the native mouse camera (`3:MX=40/500`).
|
||||
The buttons are `A B X Y L R ZL ZR PLUS MINUS LS RS LEFT UP RIGHT DOWN`, and the sticks pushed to their edge `LUP
|
||||
LDOWN LLEFT LRIGHT RUP RDOWN RLEFT RRIGHT`. A press is held for 200 ms unless `/<ms>` says otherwise. The names are
|
||||
case-sensitive, and an unknown one is ignored.
|
||||
@@ -162,6 +189,7 @@ case-sensitive, and an unknown one is ignored.
|
||||
|---|---|
|
||||
| `HOS_PROFILE=<seconds>` | Every interval, the busiest threads in the log; it also starts the samplers below |
|
||||
| `HOS_SAMPLE=<thread>` + `HOS_SAMPLE_FILE=<file>` | One thread's stacks, sampled every millisecond (needs `HOS_PROFILE`); `python -I scripts/prof.py <file>` reads them |
|
||||
| `HOS_CHAIN=<file>` | (Triforce, diagnostic, off unless set) While `<file>.go` exists, every guest wait that blocks (events, semaphores, message queues, mutexes, condition variables, multi-waits, the kernel's waits, a virtual core), every signal that can end one, every guest sleep and every present is recorded with the time, the thread, the object and the guest caller (`host/hos_chain.c`, about 2 million records); when `<file>.go` goes away they go to `<file>`. `scripts/chain.py <file> [<HOS_SAMPLE_ALL file>]` walks each frame back from its present (the thread that ran, the wait that stopped it, the signal that ended it, and on) and prints how much of the frame each thread's running, the wake-ups and the sleeps take; with `HOS_SAMPLE_ALL` beside it (Linux: each sample's own time), the functions on that path. Off: one load and a branch a wait |
|
||||
| `HOS_SAMPLE_ALL=<file>` | Every game and renderer thread every 2 ms while `<file>.go` exists (needs `HOS_PROFILE`); `scripts/crit.py`, `scripts/vkprof.py` and `scripts/hotlist.py` read it (on Linux with `RX_MAPS=<game folder>`: they name frames from its `hookshot` and `hookshot_vk.so`) |
|
||||
| `HOS_THREAD_TIMES=<seconds>` | Every interval, the threads that used over 5% of a core |
|
||||
| `HOS_FPS_LOG` (set), `HOS_PRESENT_TRACE=<csv>` | The game's frame limiter, VRR flags and nominal rate every 300 presents; a CSV line per game present |
|
||||
@@ -226,6 +254,7 @@ case-sensitive, and an unknown one is ignored.
|
||||
| `RX_VK_PRECOMPILE=0` or `1` | The shader preparation before the title off or on (on in builds made with `RX_RELEASE=1`, as the builders' are) |
|
||||
| `RX_VK_PREPARE_THREADS=<n>` | The threads the shaders are translated and their driver's part made on before the title, 1 to 64. Unset: every processor, a thread past half of them for each GB of RAM free at the start, and half in a process started above normal priority (the log's "the shaders' preparation runs on" line says how many) |
|
||||
| `RX_VK_WARM_COMPUTES=listed` or `all` | (Triforce, 11-22; `gpu/vk/warm_computes.h`, `tests/test_warm_computes.py`) The compute pipelines the shader preparation's translation pass has the driver compile. `all`: every compute program's texture variants (about 9,700), as before. `listed`: only the programs play dispatched (`triforce_computes.bin`, about a tenth of them; the precompile builds the same ones), the others translated as before and compiled at their first dispatch; with no list yet (nothing played) every one. Unset: `listed` on Intel's GPUs (an Arc A750 spent 5175 s of a 5858 s pass on them, an RTX 4070 SUPER 170 s on the whole pass), `all` on the others. No stamp holds it |
|
||||
| `RX_VK_COMPILE_SHADERS=all` or `most` | (Triforce, 11-24; `gpu/vk/compile_level.h`, `tests/test_compile_level.py`) Over the Debug tab's Compile shaders row (`compile_shaders=` in `triforce_options.ini`: 0 All, the default; 1 Most). All: the shader preparation as before. Most: the predicted pipelines are not built before the title (only behind the game in light frames, `predict_background`), and the compute pipelines are those of the programs play dispatched and the shipped state list names (`RX_VK_WARM_COMPUTES` and `RX_VK_PRECOMPILE_COMPUTES` as `listed` where they are not set): a shorter first preparation, a hitch in play where a pipeline left out is first needed. All after a preparation on Most runs the prediction before the title once (`<notes>.predicted.most`). No stamp holds it |
|
||||
| `RX_VK_FALLBACK_SHARED_RECORDS=0` | (Triforce, 11-21, the performance audit's MEM-154) With the compute fallback for task and mesh shaders, each recording thread keeps buffer pairs: 64 MB of records, the same size for every program, and a payload sized by the task program. A payload that fits no pair now makes a pair that takes the newest pair's records and only a new payload; before, 64 MB more of records each time, kept for the session. The log's `vk: mesh fallback: a buffer pair` lines say made or shared. `0`: its own records each time, as before (`gpu/vk/vk_draw.cpp` `fallback_buffers_of`) |
|
||||
| `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_FALLBACK_LOADED=0` | (Triforce, 11-22, the performance audit's PIPE-62, after Source A's) On the task and mesh fallback, the precompile is handed only the fallback programs whose records are still on the disk, as before. The default also hands it every fallback program already in memory that is ready and not failed (`gpu/vk/vk_shader.cpp` `program_cache_load_some`, in the part outside the translation stamp), so that their compute pipelines are built on the precompile's workers before the title: in a start that prepares, `state_list_prepare` has read the state lists' programs in before the precompile asks, and those got no pipelines until their first draw, which waited up to 50 ms on the recording thread and was left out until they were built. The log says how many: `vk: N mesh fallback programs read in earlier in this start are made ready with the rest`. Only GPUs on the fallback (no mesh shaders, RX 6000 and RDNA2 integrated GPUs on Windows, the menu's Compute row, `RX_VK_TASK_MESH_FALLBACK=1`); the preparing start's load grows by the compiles moved out of play |
|
||||
@@ -342,6 +371,7 @@ case-sensitive, and an unknown one is ignored.
|
||||
| `RX_VK_BC_SMALL_LAYERS=<n>` | (Triforce, 11-21, the performance audit's TEX-09) The layers one run of the ASTC-to-BC3 re-encode takes for a level of 1024 x 1024 or less, 1 to 8, through a small scratch of its own (1024 x 1024 x 8, 32 MB, and 4 MB more of output buffer). Unset: 8, and 1 on AMD's cards until the picture is checked there (one layer a run was for dark lines between Hyrule Field's ground tiles on an RX 6600). A terrain array of 90 layers and 11 levels was about 990 runs of a decode, an encode, a copy and three full barriers; its levels from the second down are now about 210. Each layer of a run is copied by a region of its own. No small scratch at reduced or low texture detail. `1`: none, every run one layer, as before (`gpu/vk/bc_scratch.h`, `vk_texture.cpp` `bc_small_layers`, `bc_encode_into`) |
|
||||
| `RX_VK_BC_LAYERS=<n>`, `RX_VK_BC_SCRATCH_FULL=1` | The layers one run of the GPU's ASTC-to-BC3 re-encode decodes and encodes, 1 to 8 (1: with more, an array's layers past a run's first came out wrong in the smaller levels, dark lines between Hyrule Field's ground tiles). (Triforce, 11-21, the performance audit's TEX-10) The 2048 x 2048 scratch, its output buffer and the second scratch are made with that many layers, 20 MB a layer (36 with the second), not with 8 whatever a run used: 140 of 160 MB were held and never written. `RX_VK_BC_SCRATCH_FULL=1`: 8 layers, as before (`gpu/vk/bc_scratch.h`, `vk_texture.cpp` `bc_scratch_layers`) |
|
||||
| `RX_VK_TARGET_POOL_MB=<MB>`, `RX_VK_POOL_IDLE=<presents>`, `RX_VK_TARGET_POOL_TRIM=0` | (Triforce, 11-21, the performance audit's TEX-29) The render targets' pool gives a dead target's image to the next target of its shape. Its bound is a twelfth of what the driver allows, 256 to 768 MB (`<MB>` sets it; 0: no pool); it was a fixed 256, which starved at 2560 x 1440. It is trimmed oldest first, whatever the shape. A shape nothing has taken from the pool goes after 8 presents (`RX_VK_POOL_IDLE`), one that was taken before after 120. Above 90% of the allowance it holds half its bound, above 97% nothing, unless a floor of the targets' blocks is kept. `RX_VK_TARGET_POOL_TRIM=0`: emptied above 90%, as before; with `RX_VK_TARGET_POOL_MB=256 RX_VK_POOL_IDLE=120` the pool as it was. The 600-present line `vk: render target images` has the reuse, the bound and the tier (`gpu/vk/target_pool.h`, `vk_texture.cpp` `pool_trim`) |
|
||||
| `RX_VK_TARGET_REUSE_MEMORY=1` / `=2`, `RX_VK_TARGET_TYPE_CHECK=0` | (Triforce) Off by default. `=1`: a render target whose shape misses the pool takes the memory of a pooled image it fits in (its memory type and alignment, at least its size and at most 1.5 times it, waited a present), where it was a new allocation; on an integrated GPU the pool's short wait is then 64 presents, not 8 (`RX_VK_POOL_IDLE` still sets it). `=2`: also makes the pooled kind on allocations of a size class (at most a quarter over the size rounded to 64 KiB), so the next one a little larger fits; not while VRAM is short. OoT sizes each character's shadow map anew every frame. Measured on a Steam Deck OLED at Render 50% in a Hyrule Field camera turn (`=2`): 33.6 fps against 32.6, the 1% low 15.7 against 13.1; not separated at Render 100%, no gain on a Steam Deck LCD, not run on a discrete card. The line `vk: render targets by size` says what it took and why it missed (`target_pool.h`, `vk_texture.cpp` `pool_take_memory`, `vk_vma.cpp` `create_image_in_class`). On by default whatever the switch: a render target goes into the targets' blocks only when their memory type is one it can use (VMA does not check that for a pool); `RX_VK_TARGET_TYPE_CHECK=0`: not checked, as before |
|
||||
| `RX_VK_STAGING_BURST_S=<seconds>` | (Triforce, 11-22, the performance audit's TEX-28, after Source A's) The uploads stage their bytes in host-visible arenas of 64 MB, and each present gives the idle ones back beyond what is kept: 256 MB, 64 MB where the driver allows 6.5 GB or less (`RX_VK_STAGING_KEEP_MB=<MB>`), and any nothing staged into for 30 s (`RX_VK_STAGING_IDLE_S=<n>`, 0: kept). An arena is taken again only once the GPU is done with the submission that read it, so frames that stage in a row use two in turn, and with 64 MB kept the one that had its turn was freed at every second present of a load and made again the present after. An idle arena staged into in the last 2 seconds now stays while the arenas add up to 256 MB (`gpu/vk/staging_keep.h`), unless VRAM is over 90% of the allowance. Nothing changes where 256 MB are kept anyway. The log's `vk: memory:` line counts the arenas made so far and their time. `0`: as before |
|
||||
| `RX_VK_WROTE_REGIONS=0`, `=2` | (Triforce, 11-21, the performance audit's TEX-02) Every sampled, uploaded texture is asked once an epoch whether the GPU wrote into its storage since its upload, which took a lock and walked the map of written ranges; nearly every answer is no. One bit a 2 MB region of GPU addresses, set where a GPU write ever reached, answers no without the lock when the storage touches no set region; a set bit asks the map as before. `0`: the lock and the walk each time; `2`: a check, both asked and compared, the count of disagreements (which must be 0) logged (`gpu/vk/wrote_regions.h`, `vk_texture.cpp` `texture_gpu_wrote`, `gpu_wrote_into`) |
|
||||
| `RX_VK_PREDICT_BG_STREAM=0` | (Triforce, 11-21, the performance audit's PIPE-83) The builder of the predicted pipelines behind the game (`predict_background`: the starts after a translator or driver update, resting while the game is in play) keeps its plan as record numbers and reads a pipeline's two notes from `triforce_pipelines.bin` when it builds it, each worker through its own handle; it held every note (~27 KB) and a full note of every predicted pipeline until it ended, about 1 GB. The same programs and pipelines are built. `0`: all of them held, as before (`gpu/vk/predict_stream.h`, `vk_draw.cpp` `predict_background`) |
|
||||
@@ -368,17 +398,24 @@ 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_UPSCALE_OFF=1` | (Triforce) The upscaler Off for one run: the game's gameplay upscale networks are not dispatched, their input is stretched linearly into their output (`gpu/vk/upscale_off.h`). Softer than the networks below 100%; only while the game's own upscaler draws (DLSS and FSR take the dispatch first). Not set: as before, the networks run, and on cards that run them on software multiplies the first one is stood in for. The lab's `upoff` phases switch it within a run |
|
||||
| `RX_VK_N64=<0..2>`, `RX_VK_N64_LINES=<n>`, `RX_VK_N64_LOD=<levels>`, `RX_VK_N64_TV=0\|1`, `RX_VK_N64_MASK=<0..4>`, `RX_VK_N64_FPS=<n>` | (Triforce) N64 Classic for one run, over the Insert menu's N64 Classic row and its Remembered page (`gpu/vk/n64_rules.h`, `gpu/vk/vk_n64.cpp`): 1 Faithful, 2 Remembered (its page's values), 0 off; unset, the row (F7 turns it on and off, but not while the switch is set). Its 3D pass takes every gameplay upscale network's place (`shaders/n64_3d.comp`): the 3D on a grid of 240 lines (480 for Remembered) as wide as the picture's shape, each grid pixel the mean of its footprint, Faithful's at 15-bit colour with the ordered dither, then out to the picture's size, linear along each line and hard between lines. While it draws, DLSS, FSR 3.1 and FSR 4 step aside (the game's own as far as they are concerned) and the game's SMAA is left out (`RX_VK_AA` still goes over that); not on a RenoDX run's RGBA16F scene. `RX_VK_N64_LINES` sets the grid's lines. (Step 3) The texture blur: the scene's tiled material textures sampled that many mip levels coarser (Faithful +2.5, Remembered +1.5, never past the card's `maxSamplerLodBias`), on the upscalers' scene-only path (not the shadow maps, the HUD or the output's passes); `RX_VK_N64_LOD=<levels>` over the preset's, `0` none. (Step 4) The TV at the window, in the filter's place at the window's own pixels, HUD and all (the FPS counter is drawn after it; the options' own screens go under it, below): the screen's curve, the composite colour bleed, the beam across 240 TV lines (wider where bright), the mask (Auto: the slot mask on a picture placed 1440 lines tall or more, none below), the glow from the picture at 1/8, the vignette; not on HDR Native's PQ picture, nor under DLSS frame generation, nor with `RX_VK_UPSCALE=0`. `RX_VK_N64_TV=0` leaves it out, `RX_VK_N64_MASK=<0..4>` (Auto, none, aperture grille, slot mask, shadow mask) picks the mask. (Step 7) The frame rate: Faithful 20, Remembered its page's Frame rate row; the renderer tells the host once a present (`HOS_OPT_N64_FPS`), which paces the game at it from the next frame, no restart (`host/n64_pace.h`, `host/nn_vi.c` `n64_pace_decide`): never above the Frame rate cap, never under 15, not while a movie plays, game time real time. `RX_VK_N64_FPS=<n>` over both presets (0 the cap's); `HOS_N64_PACE=0` keeps the cap's whatever the renderer says. The log says `vi: N64 Classic: frames paced at` at each change. (Step 8) At F7 or a change of the row, half a second of the TV switching off and on (the picture squashed to a bright line, then a dot, and opened again), the 3D, the TV and the frame rate changing at its middle (`n64_tick` once a present); not on HDR Native's picture nor under DLSS frame generation (the choice at once there), and not at a start. `RX_VK_N64_TV_ANIM=0`: the choice at once. (11-22) The options' own screens (the open menu, our tabs over the game's Options screen, the Mods entry) are drawn into a layer of the picture's place that the TV lays over the picture before its steps, so they bend, scan and bleed as the game's own screens under them (`vk_menu.cpp` `menu_tv_layer`, `vk_imgui.cpp` `record_layer`), and the glow's 1/8 copy is made again with them over the picture (else it blurred the game's own panes through their plates); the FPS counter, the notice and benchmark mode's panel stay over it, flat; with HDR on the options stay over it too (their pictures are in HDR10's codes, not the SDR picture's). The mouse is taken through the TV's curve to where the options and the game's own menus were drawn (`n64_rules.h` `screen_point`, `vk_n64.h` `n64_screen_point`; the game's through the renderer's `screen_point`). `RX_VK_N64_TV_MENU=0`: the options over the TV, flat, as before. The log says `vk: N64 Classic:` at its first grid and each new size |
|
||||
| `HOS_EVIL_HD=0`, `=1`, `HOS_EVIL_HD_DIST=<1..4>` | (Triforce, Evil HD) Over the Graphics tab's Evil HD row (`evil_hd`, off unless chosen): on or off for one run, and how far its render distance goes, a factor from 1 to 4 (4 when not set; `1`: the game's distances, as before, with the row on). It draws the foliage farther: the grass and undergrowth (40 and 60 m as shipped), flowers and stones (35 m), the low trees of the distance (135 m) and their shadows (40 m), with the fades between the trees' levels, the factor times as far. They are the defaults of the game's foliage LOD settings (`game::foliage::ResLodSetting`, eight floats at main+0x3eefd38 that the game's parameter code reads by address when an area loads); `host/evil_hd.c` writes them each time the factor changes, after checking they are this game's. The foliage system builds an area's distances from them once a run, the first time it enters it, so the row applies from the start of a run (the menu asks to restart; a change mid-run reaches only the areas not visited yet). Seen 11-24 (headless, 1920x1080, Hyrule Field from the Market's drawbridge at noon): at 4x the grass tufts and small plants cover the meadows out to the ranch and up the hills, where off they stop at about 40 to 60 m; at 2.5x part of the way; with all eight at 0.5 m the ivy and grass by the Lost Woods bridge go. Cost there, uncapped on an RTX 5090 PC whose frame the CPU limits (20 s each): off 147 and 128 fps, 2.5x 128, 4x 124 and 123, about 0.8 ms a frame at 4x, the draws the same (about 2100). Areas whose data sets their own (the Graveyard, Zora's River and Domain, Hyrule Castle's flowers, Kokiri Forest handheld) keep theirs. Draw only, and not changed: the camera's far plane (25 km in play, near 0.1 m: not what limits the view; 1000 m is the title screen's camera), the model LOD coefficient (`game::gfx::ModelLodParam`: at 0.05 no visible change), the actors' presence radius (`DisplayRadius`, which creates and deletes them) and their update radius (`CalcRadius`). The log's `evil hd:` line says each change (`host/evil_hd.h`, `tests/test_evil_hd.py`) |
|
||||
| `RX_VK_STUB_SAME_SIZE=0` | (Triforce, 11-22, the performance audit's GPUWORK-21, after Source B's and Source A's; `gpu/vk/stub_same_size.h`) On unless `0`. A gameplay upscale network that cannot run (left out or not translated: `RX_VK_NO_F16`, a card or driver that cannot build it) is stood in for by its input drawn into its output (`gpu/vk/vk_draw.cpp` `upscale_stub`) also where the two are one size: `9dc98871eb7fc101`, the network of Render resolution 100%, was declined as "no larger than its input" and skipped whole, a black 3D under the HUD. Both gameplay networks now take the typed upscale first (it reads the scene's shared-exponent picture and undoes the network's square-root encoding; it was the 3/4 network's alone), then the blit, which warns of wrong colours for both, then nothing. The picture is the upscaler Off's: softer, none of the network's anti-aliasing. Only where the network cannot run. `0`: the decline, and the 3/4 network alone in the typed upscale, as before. `RX_VK_NO_UPSCALE_STUB=1` still turns the whole stub off; `RX_VK_FORCE_UPSCALE_STUB=2` sends every network through it, for a look |
|
||||
| `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_XESS=0/1/2`, `RX_VK_XESS_DIR=<folder>` | Intel XeSS Super Resolution for one run (`gpu/vk/vk_xess.cpp`, Windows only): 0 never (Intel's `libxess.dll` not even loaded), 1 Intel XeSS, 2 its Native AA, over the Upscaler row as `RX_VK_FSR4` is (DLSS before FSR 4 before XeSS); and another folder for `libxess.dll` (else beside the executable, then the game folder). The DLL is the player's, from Intel's XeSS SDK: Triforce builds only against Intel's MIT API headers (`third_party/xess`), never links, ships or downloads it. With it there, the instance and the device are made with what XeSS asks for (a device refused with them is made again without, XeSS off for the run) |
|
||||
| `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_MODEL=auto/lite` (or `0/1`) | Over the Graphics tab's FSR 4 model row for one run: Auto lets AMD's library pick the network for this GPU (as before), Lite forces its INT8 Lite network (`ffxProvider_FSR4Lite_Int8`). Only for the one upscaler library whose layout is known, FSR SDK 2.4's `amd_fidelityfx_upscaler_vk.dll` by its SHA-256 (`gpu/vk/fsr4_models.cpp` `kKnown`, the hash `scripts/fsr_sdk.py` pins): it is loaded from its full path before AMD's loader asks for it, and its providers' IsSupported answers are hooked in this process; any other file is neither loaded nor scanned, and the row is not shown. The row shows on AMD GPUs with FSR 4 as the Upscaler. A Lite context AMD refuses, or whose dispatch fails, is Auto for the rest of the run (the log says so) |
|
||||
| `RX_VK_FSR4_STANDIN=1` | Where AMD's library lists no FSR 4 model for the GPU (another maker's GPU, or a Radeon AMD names none for) and the Lite provider is hooked (`RX_VK_FSR4_MODEL` above), the list is asked again with Lite answering: FSR 4 is then offered and every context runs INT8 Lite, with AMD's own shaders (the log: `INT8 Lite stands in`). Off unless set: FSR 4 stays off on such a GPU, as before |
|
||||
| `RX_VK_FSR4_TUNE=1`, `RX_VK_FSR4_UNROLL=0` | AMD FSR 4's passes tuned as AMD's library makes them, on AMD GPUs (off unless set): the network's layers run 64 lanes wide, the weight tables the layers and the postpass copy into per-thread arrays are read from a tail of the library's storage buffer, and the small layers with weight tables are unrolled, built one at a time in the background (`gpu/vk/fsr4_tune.h`, `vk_fsr4.cpp`). Measured 8.97 -> 4.04 ms on an RX 6700 XT at 720p -> 1440p, bit for bit AMD's output on Adrenalin 26.10.1 (other drivers: the same maths, not necessarily the same bits). Where the library binds its buffer without the tail, or destroys it, AMD's own shaders are bound for that context and the log says so (`AMD's own shaders in place of the tuned ones`). `RX_VK_FSR4_UNROLL=0`: all of that but the unrolling. Frame generation's library is never tuned |
|
||||
| `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 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_THREADED=0`, `=1`, `=auto` | (Triforce; **off by default**, the Debug tab's Threaded rendering row, Off, On or Auto, which this goes over for the run) The renderer's threads as one design (`gpu/vk/threaded_rendering.h`), each piece one Triforce has, driven from here: the replay on its thread (`RX_VK_ASYNC=1`), the recorder thread (`RX_VK_RECORDER=thread`) handed a part at a time (`RX_VK_RECORDER_PARTS`), a submission's parts ending where the game ends its render pass (`RX_VK_PART_MIN`, `RX_VK_PART_FIRST`, `RX_VK_PART_MAX`), the present thread (`RX_VK_PRESENT_THREAD`) asking for the next image right after each present (`RX_VK_ACQUIRE_AHEAD`). Each of those switches, when set, still goes over it. Auto: on from 4 physical cores in the process's affinity; with no buffer-pool mirrors the recorder thread alone from 6; off with `RX_VK_CAPTURE=0`, `RX_VK_LOW_SPEC`, `RX_VK_DUMP` or `RX_VK_BENCH`. `=0` (or the row Off): everything as before. The log's `vk: Threaded rendering:` line says what this run took. The lab's A/B is `RX_VK_THREADED=0` against `=1` |
|
||||
| `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`, `RX_VK_OCC_GATE=0` | (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. (11-22) `RX_VK_OCC_GATE=0` turns off (on by default since its lab A/B: no fps lost at the Market): a count over a draw that a written count's condition left out (between the reset and its report) is the skip's 0, not the object's, and a condition on it renders; the count is still written for the game's CPU. Why: the game's CPU reads a count after its frame wait and draws a hidden object's proxy instead of the object, but most counts land after it has read the 4096, so it goes on drawing the object under the condition, the condition reads the skip's 0 and the object stays hidden (tickets 11-21: items and trees in the Forest Temple, black interiors; `RX_VK_OCC_QUERY=0` showed them). The line's second half counts these counts (counted whole, written, of them 0), the conditions that read one and those the switch rendered, on or off. Cost with it on: a hidden object under such a condition is drawn every other frame instead of never. 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_OCC_DEPTH_ONLY=1` | (Triforce, 11-22, the performance audit's GPUWORK-01, after Source A's; off unless set) Only the occlusion windows whose draws write no colour are counted. The game's occlusion tests draw depth only, but a query here opens at a window's first draw in the pass and stays open to the report or the pass's end, so it can enclose draws that write colour, and a query's end waits for the work it encloses. With the switch, a window's first draw that writes a colour target gives its count up: the open query ends before that draw, no query begins again until the next reset, and the report is incomplete, so its record keeps the 4096 placeholder and what it gates is drawn. Fewer objects are culled with it (Source A: 4% fewer for 0.25 ms of GPU time), never one missing; whether that pays here is for a measurement to say, which is why it is off. The lab's knob `occdepth` (`RX_VK_LAB_AB`) is the switch in its phases. Counted either way, in a third `vk: occlusion queries` line every 600 presents: the counting windows that met a colour draw, the colour draws recorded under an open query, the counts given up and the reports kept 4096 for it (`gpu/vk/occ_answer.h` `Counter::colour_draw`; `gpu/vk/vk_replay.cpp` `occ_draw_colour`; `gpu/vk/vk_draw.cpp` `draw`) |
|
||||
| `RX_VK_OCC_GATED_VISIBLE=0` | (Triforce, 11-24; on unless set to 0) A samples-passed count of 0 over a draw that a written count's render condition left out is not written: its record keeps 4096, visible. The queries counted nothing for the draw that did not run, so that 0 is not known to be the object's; written, the game's CPU read it and stopped drawing an object that may be in view until its proxy's count brought it back (an object that comes and goes). A gated count above 0 and a 0 that is not gated are written as before. `=0`: the gated 0 is written, as before. The log's occlusion line (4) counts both. |
|
||||
| `RX_VK_OCC_LEAN=3` | (Triforce, 11-22, the performance audit's DESC-82, after Source B's: its first step, the census; off unless set) The game's occlusion proxies write no colour, yet each runs its whole fragment shader and fills its fragment descriptors. With `3`, each draw an open occlusion query counts that writes no colour is classed (`gpu/vk/occ_lean.h`): lean, or the first refusal of a pipeline without the fragment stage (no fragment stage, depth out, sample mask, demote, stores, image writes, atomics, global memory, alpha to coverage, alpha test), and its fragment descriptors added to its class; every 600 presents `vk: occlusion proxies (RX_VK_OCC_LEAN=3` gives each class's draws a frame and descriptors a draw. Nothing else changes: no pipeline, key or descriptor. The entry's lean pipelines (`1`) and their check (`2`) are built only if the census finds more than one fragment descriptor a proxy to save; they are not built, and read as off. `tests/test_occ_lean.py` |
|
||||
| `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_WAIT_HOLD_PAUSE_US=<us>` | (Triforce, 11-22, the performance audit's THREAD-11, after Source B's; off unless set, not measured here) A wait of the game's for a fence whose work is stopped at an event's wait holds up to `RX_VK_WAIT_HOLD_US` (3 ms) for another queue to let it on before it forces it, looking again and again: a flush, the timeline's value, the order lock to ask whether the stopped work is still needed, and a yield of the processor. With `<us>` (2 is Source B's; 1000 at most) a gap of PAUSEs that long stands between two looks instead of the yield, and the order lock is taken only when one of its sections has left since the waiter last asked, which is the only time its answer can change; the fence's own value is still read at every look, and the bound and the forced drain stay. Source B measured 59.2 to 59.9 fps and a 1% low of 40.0 to 42.1 with such a gap on a loop that runs far more often than this one (about 15 holds a second here). `0` or not set: as before. Either way the `vk: queues ordered by their events` report is followed by a `vk: fence waits held for stopped work` line: the holds, their looks, the time held, the takes of the order lock and how the holds ended (`gpu/vk/wait_hold.h`, `gpu/vk/vk_replay.cpp` `wait`) |
|
||||
@@ -396,6 +433,7 @@ case-sensitive, and an unknown one is ignored.
|
||||
| `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_TUNER_SETTLED=0` | The tuner's rule judges every window and a trial the scene changed under decides, as before. With settled scenes only (the default, `gpu/vk/replay_threads.h` `Tuner`, after Kaefergeneral's #dev-fixes post: on his 5900X and RTX 3090 the rule turned the helper threads on in an area's load and the first trial after the arrival kept them, and Automatic was 6 to 10% slower than Off) the rule judges a window of 120 frames only if the one before it describes the same scene (its draws within a quarter, 200 at least, its replay and GPU times within 30%, 1 ms at least: the back-off's test), so a load's window and the first after it get no verdict and the rule's "on" comes a window after a scene settles; a trial whose first and last parts moved so changes nothing, either way, and the next comes 120 presents after a window like the one before it, not 900 or more later. The trial's line says so (`the scene changed under it`), and `parallel replay, the scene settled` when the next is set. Between trials the scene is calm while two windows in a row of the way in use describe one scene: a trial due waits for a calm scene (900 presents at most), none begins where nothing is cut (a loading screen), and after a trial the scene moved under the next is never more than 900 presents late. The rule's "on" holds only for the scene it judged: the first window that moved from the first with the helper threads on takes them back off (`the rule's "on" withdrawn`), and the rule judges the new scene; and the rule's "on" needs three windows in a row, each within those margins of the first of them (an arrival whose texture load comes down a little each window passes two alike, not three) |
|
||||
| `RX_VK_RECORDER=thread`, `=defer`, `=sync`, `=off` | (unset: `thread` on an NVIDIA GPU with 12 logical processors or more, and on an AMD GPU with 6 physical cores or more in the process's affinity but for AMD's Windows driver for RX 5000 and RX 6000 (`gpu/vk/recorder_auto.h`); else off. The log's `vk: recorder thread on/off by default` line says which rule applied; `RX_VK_LAB_AB=norec` makes the calls directly in its phases, to measure it) `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_RECORDER_PARTS=0`, `=1`; `RX_VK_RECORDER_IDLE=wait` | (Triforce; unset: on with Threaded rendering (`RX_VK_THREADED`), so **off by default**) The recorder thread handed a part at a time (`gpu/vk/vk_recorder.h` `post_part`, `gpu/vk/vk_replay.cpp` `part_submit`): the replay publishes a part's packets at its end (256 KB chunks of a long one) and puts the part's two `vkEndCommandBuffer` and its queue submit into the ring as one more packet, which the recorder makes in order, so the replay goes on into the next part at once; a slot's reuse waits for its own part, a fence or timeline wait for the parts handed over (at most its own time), a thread about to take the queue's lock for them first (`QueueMutex`, `gpu/vk/vk_internal.h`), and a holder of a queue lock never for a recorder waiting for that lock; the recorder waits on its ring between batches (WaitOnAddress). Not for a recording with upload pieces or with the lazy write-back (made on the replay's thread, as before). A `vk: recorder, by part` line with the stats line. `=1`: with any recorder thread; `=0`: as before. `RX_VK_RECORDER_IDLE=wait` (opt-in): the recorder waits on its ring after a 20 µs spin without the hand-off too |
|
||||
| `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`) |
|
||||
| `RX_VK_REPLAY_PIN_SOFT=0`, `=2` | (Triforce, 11-22, the performance audit's THREAD-09, after Source A's; Windows) A thread is pinned while it replays to the core the host keeps for the replay, and that core is kept from the game's threads, not from other programs': where another program's high-priority thread holds it, the pinned replay waits for it, ready to run (Source A, a 6+8-core hybrid processor with an overlay service at priority 15: 14 to 37 frames over 40 ms in a 40 s run, none with this). Not set: on a processor with cores of more than one kind the pin is soft: the thread may run on the reserved core and on the fastest-kind cores among its own processors, the reserved core's last logical processor is its ideal one, and the core it is on when the pin starts is left out so that it moves at once; its affinity and ideal processor come back after the replay. The replay thread of `RX_VK_ASYNC=1` gets the same processors for good. A processor of one kind of core keeps the strict pin, and nothing changes there. `0`: the reserved core alone everywhere, as before; `2`: soft everywhere (the lab; the knob `pinsoft` of `RX_VK_LAB_AB` does it by phases). A thread of another program that wakes on the core every millisecond moves the replay again and again (Source A: 54.3 against 44.6 fps, one run each): `0` is for that. The log's `vk: a replay's pin is` line says which (`gpu/vk/replay_pin.h`, `gpu/vk/vk_replay.cpp` `ReplayPin`, `replay_pin_soft`) |
|
||||
| `HOS_VCORES=0`, `HOS_CORES=<1..8>`, `HOS_RESERVE_CORE=0` | No virtual cores; the cores the game sees (6); no core kept for the replay (one is, with 8 or more logical processors) |
|
||||
@@ -407,6 +445,7 @@ case-sensitive, and an unknown one is ignored.
|
||||
| `HOS_AV1=mf`, `HOS_AV1_MISSING=1` | (Triforce, 11-22, the performance audit's IO-32; Windows) The game's AV1 movies on Media Foundation first (Microsoft's AV1 Video Extension), as before, and on dav1d only where the PC has no such decoder. Without it dav1d goes first where the FFmpeg the build links has libdav1d, as on Linux, and Media Foundation where it has not or where libdav1d does not open (`host/video_av1.h`, `host/nn_video.c` `dec_init_sized`): Media Foundation's path decodes in software on every GPU (`host/mf_av1.c` takes the synchronous decoder). `HOS_AV1=dav1d`, the old way to ask for dav1d first, is the default now. `HOS_AV1_MISSING=1`: Media Foundation as if the extension were missing. Each movie logs one line at its Stop, Flush or its decoder's end: its pictures, the decoder, the mean and the worst time to decode a submission, and the pictures skipped to catch up (`host/video_movie.h`). The two decoders were not timed against each other in the game |
|
||||
| `HOS_VIDEO_RGBA=1` | (Triforce, 11-22, the performance audit's IO-36) Every planar 4:2:0 movie picture (libdav1d's) is converted to RGBA when it is decoded, as before: a swscale pass, an 8 MB allocation and an 8 MB row copy for a 1080p picture, on the movie thread. Without it such a picture is kept as NV12 alone, as Media Foundation's NV12 pictures already were, and its pool makes the RGBA only if the game reads RGBA, which this game's movie library does not; planar 4:2:0 with alpha is converted at once either way. The NV12 buffer is zeroed only for an odd size or a format that is not copied into it, and U and V are interleaved 16 pairs a step with SSE2 (`host/video_nv12.h`, `host/nn_video.c` `queue_frame`). The movie's line in the log (IO-32) has the time a picture took with either. Not timed in the game |
|
||||
| `HOS_VIDEO_UNBOUNDED_CATCHUP=1`, `HOS_VIDEO_NO_CATCHUP=1` | (Triforce, 11-22, the performance audit's THREAD-82) The movie decoder's acquire skips the pictures behind the movie's clock and decodes the next ones to skip them too. `HOS_VIDEO_UNBOUNDED_CATCHUP=1`: with no bound but a guard of 600 steps, as before: with a decoder slower than the movie (19.5 ms a picture against 16.7) each picture decoded to catch up puts the clock further ahead, so an acquire decoded up to about 300 pictures with its lock held, threw them away, and the next started further behind. Without it each decode that gives a picture is timed, about the last 8 kept as one number, and the acquire stops decoding ahead when that number is more than the gap between two pictures (from the pictures' own times) or once it has decoded for one gap, and shows the late picture it has (`host/video_catchup.h`, `host/nn_video.c` `dec_acquire`): such a movie falls behind its sound instead of stalling, and its line in the log says "slower than it plays". A decoder faster than the movie catches up as before, a few pictures an acquire. `HOS_VIDEO_NO_CATCHUP=1`: no picture skipped at all (the movie in slow motion under 60 fps). Not run in the game |
|
||||
| `HOS_VIDEO_NO_HOLD=1` | (Triforce) The movie decoder's acquire hands a picture out only when it is due: one more than 25 ms ahead of the movie's clock waits in the queue, and the buffer handed out shows the last picture again (`host/nn_video.c` `dec_acquire`; not a movie's first or last picture, and only for pools the game reads through `ReadDecoderOutputImage*`, as OoT's are). While a movie plays at the 60 cap the frames are paced at 240 and the game's count of the movie's 60ths follows the frames' time, not the clock, so the picture ran ahead of its sound (heard as the sound coming late). `HOS_VIDEO_NO_HOLD=1`: every picture handed out when asked, as before. The movie's end says in the log how often the last picture was shown again. `tests/test_video_hold_early.py`. Not run in the game |
|
||||
| `HOS_VIDEO_INPUT_LIMIT=<n>` | (Triforce, 11-22, the performance audit's IO-34) How many submissions the movie decoder holds, not decoded yet or decoded and not taken, before it refuses one: 16 when unset; `0`: no limit, every submission taken, as before. The game submits a whole movie at once on the thread that also takes the pictures, so at a movie's start the pictures that came due while it submitted were skipped. With the limit a submission is refused at once with the console's result for a full decoder (0x1c266f) and the game submits it again later; the stream's last submission is never refused, and a decoder with no codec behind it refuses nothing. Each decoder has its own "ready for a submission" event, clear from a refusal until an acquire, a Stop or a Flush makes room (it was one event for all, always set); the movie's line in the log counts the refusals (`host/video_input.h`, `host/nn_video.c` `dec_submit`, `input_room`). If a movie ever hangs on a black screen, try `=0` first. Not run in the game |
|
||||
| `HOS_MOVIE_PACE=0` | (Triforce, 11-22, the performance audit's PRESENT-30) The frame rate cap is kept while a movie plays, as before. Without it, at a cap of exactly 60 and with the Steady frame rate row off, the frames are paced by 240 while a movie player has updated in the last quarter second, and the game's own limiter and its time step follow as they do at a cap of 240 (`host/movie_pace.h`, `host/nn_vi.c` `movie_pace_decide`, `pace_fps`, `realtime_step`): the game's movie player takes one picture an update at most and its updates follow the frame loop, so at 60 every frame that came late was a picture the decoder skipped. Game time stays real time; the limiter is put back where it was when the movie is over, and the log has a line at the movie's start and one at its end. The cap itself (the Steady row, the vsync event, the hand-off to RivaTuner or Reflex) does not move. Movies use more CPU and power with it. Not run in the game |
|
||||
| `A64_NO_VBYTES=1`, `A64_NO_VMOVES=1` | (Triforce, 11-21, the performance audit's LIFT-02; read when the game is translated, and in the lift key) The translator writes TBL with a one-register table and EXT as loops of single bytes through the stack, a 128-bit vector load as two halves and DUP by element as a loop, each followed by a 16-byte read of the register that cannot be forwarded from those stores. `nx2/fastvec.py` rewrites each on the lifted text as one instruction's helper (PSHUFB; PALIGNR or two shifts; one 16-byte load; one broadcast), the same bytes in the same registers (`tests/test_vbytes.py` runs every shape both ways). `A64_NO_VBYTES=1` keeps the translator's text for TBL and EXT, `A64_NO_VMOVES=1` for the loads and DUP. A build with them needs a hot profile of its own (`RX_PGO=gen`) |
|
||||
@@ -414,12 +453,25 @@ case-sensitive, and an unknown one is ignored.
|
||||
| `HOS_FMA_FAST=0`, `A64_NO_FMA_SOFT=1` | (Triforce, 11-22, the performance audit's LIFT-06, after Source A's; only in a build without FMA3, x86-64-v2: with FMA3 none of it is compiled) Without a hardware FMA every double-precision FMADD, and each single-precision one its binary64 fast path cannot prove, ran the translator's exact body, integer code of many words (about 180 ns a call and 13.7% of a core on an i7-3770, Source A's figures). `nx2/fma_soft.py` puts a short way out at the head of `recomp_fpe_fma64` and `recomp_fpe_fma32` for the plain case: default FPCR (FZ or not), three normal operands and a normal result, by an exact product and sum in binary64, rounded to odd, then rounded once, FPSR.IXC set when inexact; everything else goes on into the body. `tests/test_fma_soft.py` compares both bodies with it and without, value and every byte of the context. `HOS_FMA_FAST=0` (read once when the game runs): the exact bodies only, as before. `A64_NO_FMA_SOFT=1` (read when the game is translated, and in the lift key): the translator's runtime text as it was. Not measured in a game on a CPU without FMA3 |
|
||||
| `A64_NO_FMA_STEPS=1` | (Triforce, 11-22, the performance audit's LIFT-05, after Source A's; read when the game is translated, and in the lift key; only in a build with FMA3, x86-64-v3) The single-precision FRECPS and FRSQRTS steps (2 - a*b and (3 - a*b) / 2, the Newton-Raphson steps of a reciprocal and a reciprocal square root) were computed in binary64 on x86-64 (two widenings, a multiply, a subtraction, a narrowing) with a test for a binary32 midpoint, which went to the exact body. `nx2/fma_steps.py` gives their fast paths the guard the fused multiply-add's already had: with FMA3 one fused instruction, the step rounded once as on the console; the tests that decide whether the result is kept are unchanged (`tests/test_fma_steps.py` runs every form both ways and against the exact body). `A64_NO_FMA_STEPS=1`: the translator's text for the two steps. The compile define `-DA64_FPX_NO_FMA32` returns all three (FMADD/FMLA and the two steps) to the binary64 form. Source A measured the steps alone at 23% to 29% fewer cycles; not measured in the game, and how often this game runs them is not counted |
|
||||
| `A64_VECFP=1` | (Triforce, 11-22, the performance audit's LIFT-03, after Source A's; read when the game is translated, and in the lift key; off by default) The translator's passes turn straight FADD, FSUB and FMUL .4S and the .4S by-element multiplies into one SSE op; other float forms stay a helper call a lane or exact integer code a lane. With this set `nx2/vecfp.py` lifts each of them as `if (!a64_vfpx_q_<form>(c, ...)) { the C as before }`: the helper does the op in SSE and writes the register only when the scalar fast paths' rules prove the result is the console's with no new FPSR bit. `1`: every group; or a list of `elem` (FMUL, FMLA, FMLS .2S by element), `vec` (FMUL .2S; FMLA, FMLS and FDIV .2S and .4S; the multiply-adds need FMA3 and decline without it), `minmax` (FMAX, FMIN, FMAXNM, FMINNM: scalar S, .2S, .4S; kept unless a NaN or, under FZ, a subnormal is involved) and `fcvt` (FCVT S to D and D to S, FCVTL, FCVTL2, FCVTN). Unset, empty or `0`: the translator's text. `tests/test_vecfp.py` runs 137 guest words three ways (with it, without it, exact). Source A measured +3.5% to +5.1% fps where the game's update bounds the frame, for 3.7% more compile time; not measured in this game, which is why it is off. A build with it needs a hot profile of its own (`RX_PGO=gen`) |
|
||||
| `A64_SUB_V=1`, `A64_SUB_V=ovf` | (Triforce; read when the game is translated, and in the lift key; off by default) The translator writes a flag-setting subtraction's V flag (SUBS, CMP, CCMP) from the bits of its operands and result, and the game's signed conditions (LT, GE, GT, LE) read it against N: seven to nine host instructions a compare, which the compiler does not fold. `1` writes V as N xor (a < b, signed), the same bit for every operand, which the compiler folds to one host compare and jump. It adds a `<` to every function that compares, and the hot pieces' recorded profile is matched to a function by a count of such things: record a new profile with it. `ovf` writes V as the compiler's own overflow test of the subtraction (`__builtin_sub_overflow`): five instructions a signed compare, and the recorded profile still matches. `nx2/cmpflags.py`; `tests/test_cmpflags.py` runs both forms against the translator's text. |
|
||||
| `RX_MARK_BITMAP=1` (build), `HOS_MARK_BITMAP_ALL=1` (run) | (Triforce; read by `nx2/build.py`: a full rebuild; off by default) Every store of the translated game also marks its memory page, so that the renderer finds what the game changed; the renderer reads only the marks of the pages the GPU can reach, and most stores are to other memory. With `RX_MARK_BITMAP=1` a store marks only when its first byte is on a page whose bit is set in a bitmap (`host/mark_bitmap.c`): the pages of every GPU mapping and native pool, and the page before each, set when the mapping is made and never cleared. A mark missed is stale data drawn, so compare pictures before shipping it. In such a build `HOS_MARK_BITMAP_ALL=1` sets every bit at the start, so every store marks as before (the control of an A/B). `tests/test_mark_bitmap.py`. |
|
||||
| `A64_FASTFP=1`, `=hot`, `=check`; `A64_FASTFP_MIN=<n>`, `A64_FASTFP_STORES=0`, `A64_FASTFP_VMOVES=0` (lift); `HOS_NO_FASTFP=1` (run) | (Triforce; read when the game is translated, and in the lift key; off by default) Fast float regions (`nx2/fastfp.py`). Each single-precision float op of the translated game carries its own exactness tests, about 25 instructions around one SSE op. With `A64_FASTFP=1` a straight run of instructions holding at least `A64_FASTFP_MIN` (8) such ops is written twice: a fast copy of plain SSE ops between one MXCSR clear and one read, and the exact copy as before, which runs instead, with the run's registers put back, when the fast copy raised an invalid, denormal or underflow flag. A run may hold guest stores (made after the check passed; `A64_FASTFP_STORES=0`: a store ends a run) and the vector moves of `nx2/fastvec.py` (`A64_FASTFP_VMOVES=0`: they end a run). `hot`: only the hot functions. `check`: both copies every time, the exact one's result kept and the two compared (`fastfp check:` lines in the log). A function that holds an address the game's patches name gets no region, and the lift stops if a patch changes a function that has one. In a build lifted with it, `HOS_NO_FASTFP=1` runs the exact copies only. It changes the text of every function with a region (3,651 of them, 268 of the 849 hot ones in the supported game): record a new profile for the hot pieces with it. `tests/test_fastfp_override.py`, `test_fastfp_regions.py`, `test_fastfp_fma.py`. |
|
||||
| `HOS_HEAP_COMMIT=1` | (Triforce, 11-21, the performance audit's MEM-09) On Windows the game's heap (~6.9 GB asked for at its start) is left reserved and committed as it is touched, 64 KB at a first touch, by the handler that commits pages nothing handed out; committed whole, all of it counted against RAM plus the page file, touched or not. A fault another thread's commit answered is tried again, a commit refused at Windows' commit limit is tried again for 5 s, and a file read or write reads each page of its buffer once before the kernel's call, which faults nothing in. The log says `heap: left reserved` and counts the heap's first touches. `1`: all of it committed at the start, as before; so it is in large pages (`HOS_LARGE_PAGES`) and on Linux (`host/heap_commit.h`, `mkw_glue.c` `commit_on_touch`, `hos_mem.c` `SetMemoryHeapSize`) |
|
||||
| `RX_VK_DMABUF_NVIDIA=1`, `RX_VK_NO_DMABUF=1`, `RX_VK_DMABUF_PIECE_MB=<n>` | (Linux) Where the game's memory is a memfd, each pool of it is offered to the driver as a dma-buf made by udmabuf, larger pools as several of at most udmabuf's limit bound into one sparse buffer; the log's `vk: guest memory as dma-bufs:` line says yes or why not. `RX_VK_NO_DMABUF=1`: host-pointer imports only. `RX_VK_DMABUF_PIECE_MB=<n>`: pieces of at most n MB. (Triforce, 11-22, the performance audit's OS-08, after Source A's; not yet run on Linux) NVIDIA's proprietary driver refuses every such dma-buf and the pool ends as a host-pointer import anyway, after a refused import each (up to 198 ms for one during a load) and a kernel message at each start: with that driver none is offered, `/dev/udmabuf` is not opened, and the line says `no (NVIDIA's driver refuses them: host pointers)` (`gpu/vk/dmabuf_gate.h`). NVK and RADV keep their dma-bufs. `RX_VK_DMABUF_NVIDIA=1`: offered to NVIDIA's driver too, as before |
|
||||
| `HOS_COMMIT_WAIT_MS=<ms>` | (Triforce, 11-22, the performance audit's OS-04, after Source A's and Source B's; 5000 unless set) How long a refusal at Windows' commit limit (RAM and the page file full, error 1455) is waited out, tried again every 50 ms: such a refusal often ends in moments, as a page file set to grow grows or commit is given back. The game's own commits waited so already (the row above); now the host's own tables do too (a failed allocation there ended the game at once: `host/host_alloc.h`, `hos_xmalloc` in `host/mkw_glue.c`), and the renderer's failed `new`, which was an uncaught `std::bad_alloc`: its new handler sleeps 50 ms and lets the allocation be tried again, up to this long a thread, but only while the system has less than 4 GiB of commit left (a `new` refused with more free is not the limit's and throws at once), and not for the few allocations that have their own answer to a refusal (`gpu/vk/new_wait.h`, `gpu/vk/vk_main.cpp` `new_refused`). The log has `refused ... made after N ms` for the first rescues. `0`: no wait anywhere, a refusal fails at once; 60000 at most |
|
||||
| `HOS_WS_FLOOR_MB=<MB>`, `=0` | (Triforce, 11-24; Windows only) At the game's start the process asks Windows for a soft working-set minimum, a quarter of the RAM and at most 4096 MB: when the PC runs short of memory Windows trims the other processes, and the game's pages above the minimum, before it trims the game below it (left at Windows' own minimum of a few hundred KB, a game with other programs open was trimmed to about 1 GB resident, and its frames waited on its threads' page faults). Soft: Windows still trims below it when memory is critically short. `<MB>`: that minimum instead, at most half the RAM; `0` (or `off`, `no`, `false`): Windows' own, as before. The log has `mem: the working set's minimum is ...` (`host/ws_floor.h`, `host/hos_main.c` `ws_floor`) |
|
||||
| `HOS_TEXELS_KEEP_CORE=1` | (Triforce, 11-21, the performance audit's THREAD-20) `nvnTextureReadTexels` and `nvnTextureWriteTexels` reach the back end, which waits for all the GPU work submitted and then for the replay's lock; the game calls them from its loading threads at an area's arrival and at boot. The calling thread gives its virtual core up for that call, as it does around a readback, so the game threads allowed only on that core do not wait with it. A write kept for a renderer not started yet never waits and keeps the core. `1`: kept, as before (`host/rx_backend.c` `rx_nvn_read_texels`, `rx_nvn_write_texels`) |
|
||||
| `HOS_LOG_SYNC=1`, `HOS_LOG_BATCH_MS=<ms>` | The log's lines are written by a thread of their own, not by the thread that logs: a write that blocks (a console, a busy disk) holds no game thread. The writer waits a little after a line and writes the lines of that time in one write (`HOS_LOG_BATCH_MS`, 250 unless set, at most 2000; 0: the lines there are at each wake); a queue half full goes out at once, and every way out of the game writes the queue first. `HOS_LOG_SYNC=1`: each line written by the thread that logs it. (Triforce, 11-22, the performance audit's THREAD-56, after Source A's; not yet run on Linux) The writer is Linux's and the Steam Deck's too now: there every `hos_log` wrote stderr in the calling game thread, its virtual core held, so `HOS_LOG_SYNC=1` is Linux as it was. And `nvnCommandBufferEndRecording`'s two lines (the sweep's, the 50,000-recording line) are written after the recordings' lock is released, the virtual core given up, on every system (`host/hos_thread.c` `log_queue`, `host/nvn_native.c`) |
|
||||
| `RX_VK_INVALIDATE_QUICK=1` | (Triforce, 11-22, the performance audit's THREAD-25, after Source A's; off unless set. Source A has it on; here it waits for a run in the game, as a wrong answer skips the wait a readback of GPU results needs, the exposure flashes' kind of fault) The game invalidates each shape's 64-byte occlusion slot, per view, and the host gives the calling thread's virtual core up before every such call and queues for it again after, though nearly none has anything to wait for. With `1` the back end is asked first, with no lock and no wait: a range with nothing to invalidate, or one below 512 GB with no fast fence poll's order ticket still to wait for, no live texture's storage in it, no texture the GPU wrote ever listed there and no write-back ever made into its pages, is one `invalidate` returns from at once, so the call is left out and the core kept. The two "ever" answers are bits a page that are only set, before their tables change (`gpu/vk/page_marks.h`); a page written back once has the call made for good. Source A measured Hyrule Field at 50.5 to 51.4 fps and its 1% low up by two to four frames a second, its busiest worker keeping the core 31,444 times against 2,604. Every 10 s a `vk: invalidates:` line counts the calls left out and made. With `RX_VK_LOG_INVALIDATE`, `RX_VK_LOG_READBACK` or `RX_VK_INVALIDATE_WAIT` set every call is made; the lab's knob `noinvq` makes them all in its phases (`gpu/vk/vk_replay.cpp` `invalidate_quick`, `host/rx_backend.c` `rx_nvn_invalidate`) |
|
||||
| `HOS_WRITE_KEEP_CORE=1` | (Triforce, 11-24) nn::fs::WriteFile and FlushFile keep their virtual core through the host's call, as before. The default gives it up, as the reads and the open do: a slow write or flush (a busy or network disk, a virus scanner) held every game thread pinned to the writing thread's core for as long (`host/nn_fs.c`) |
|
||||
| `HOS_OCB_HOLD_MS=<ms>` | (Triforce, 11-24; 2000 unless set) The neighbouring map the game's OptimizeChangeBank thread preloads is kept while the game's choice only flickers. The game picks one neighbour each frame from Link's position and heading, and another choice cancels the one loading or loaded and loads the other from the start: standing or circling between two neighbours (Castle Town's market, between Hyrule Field's and the castle's) reloaded them over and over, the loader threads busy the whole time. A choice that names another map than the one held is taken only once it has stayed the choice that many milliseconds without a break; a first choice, a direct request and the game's other mode are the game's own. `0`, a negative number or `off`: the game's own choice at every frame, as before. A preload can start up to that long later when Link turns towards another neighbour and keeps going. The supported game build only, and only while the manager is laid out as `host/oot_ocb_hold.h` knows it; the log's `ocb:` lines say the hold and, every 18,000 updates, the choices held back and taken (`host/oot_ocb_hold.c`, `nx2/oot_patches.py` `patch_ocb_hold`, `tests/test_ocb_hold.py`) |
|
||||
| `HOS_OOT_BARRIER_WAIT=0` | (Triforce, 11-24; on by default, not measured here) The game's job barriers wait for their work (`host/oot_barrier.h`, `host/oot_barrier.c`, `nx2/oot_patches.py` `patch_barrier_wait`, `tests/test_oot_barrier.py`). Three of its parallel-for jobs (f_800998a0, f_800738e0, f_8007e200) are run by several threads over one job block, each taking items by atomic ORs into bitmasks; a thread with nothing left to take slept 20 us and looked again until the masks it polls were full. A sleep that short wakes ~0.5 ms late on Windows with 6 or fewer logical processors (`HOS_SHORT_SLEEP_TIMER` below), and above 6 it is yielded away on a processor. Now the thread waits (its virtual core given up, as for a sleep) until a polled mask word moves, woken right after the OR that moves it, at most 1 ms, and then looks again as after its sleep: a wake that never came costs that millisecond, never the job. Source A's in-run A/Bs in Castle Town's market: frame time -3.2 % on 4 cores, no difference on 16. The log counts the waits every 16,384 (`barrier:` lines: moved already, woken by a move, the whole 1 ms). `0`, `off`, `no`, `false`: the sleeps, as before. The supported game build only; a lift where a function's code differs keeps that function's sleeps (the lift's warning says so) |
|
||||
| `HOS_STEAM_PADS=0` | (Triforce, 11-24; on unless set to `0`, `off`, `no` or `false`) Valve's controllers under Steam Input (`host/steam_pads.h`, `host/pad_sdl.c`, `tests/test_steam_pads.py`). Three rules, none of which a player without Steam Input or a Steam Deck meets. Started from Steam (its `SDL_GAMECONTROLLER_IGNORE_DEVICES` list and its `SDL_GAMECONTROLLER_ALLOW_STEAM_VIRTUAL_GAMEPAD` both in the environment), Valve's own pads but the Steam Deck's come out of that list, so SDL opens the real pad beside Steam's stand-in and Motion controls can read its gyroscope; only with an SDL that tells a stand-in pad apart (SDL 2.30 or SDL3 3.2 on). While a stand-in pad (one with a Steam Input handle) is open, a real Valve pad gives its motion only: its buttons, sticks and rumble go through the stand-in, once. And while the Steam Deck's built-in controls are open as a pad of their own (USB 28de:1205, no Steam handle: Desktop Mode, the game started outside Steam), the mouse steers nothing and its buttons are no control's (`host/nn_hid.c` `read_input`), because Steam's Desktop layout presses that mouse's buttons for the triggers and R2 was Y as well; the game's menus keep the pointer. `0`: Steam's list as it is, every open pad's buttons counted, the mouse as before. The log's `hid:` lines say each rule as it applies |
|
||||
| `HOS_VSYNC_TIMER=1` | (Triforce, 11-24; off unless set) The vsync ticker (`host/nn_vi.c` `vsync_main`, the thread that signals the display's vsync event at the frame rate cap) waits on a high-resolution timer for every wait. Not set, a wait under a millisecond yields until its time, as the host's other short sleeps do, so with a cap of 1000 the ticker keeps a processor busy. The timer wakes about half a millisecond late, and the game's frame limiter waits for this event: not yet run in the game, so what it does to the frames' pacing above a few hundred frames a second is not known |
|
||||
| `HOS_LOG_REDACT=0` | (Triforce, 11-24) The log's lines are written as they are. The default leaves the player's user name out of what the game saves, as players pass `triforce_log.txt` around: in each line the game and the renderer log, and in a fatal error's, the home folder reads `%USERPROFILE%` (`~` off Windows; its short 8.3 name too) and the user's name, where it is a folder of a path (another drive's `Users` folder, `/run/media`), reads `<user>`; the rest of each path stays. A bug capture's `log-tail.txt` is redacted as a whole, the lines other code wrote to stderr itself too (the Vulkan loader, SDL); in `triforce_log.txt` itself those lines are redacted once the run has ended: by the crash window's helper as soon as the game is gone, else by the next start on the log it rotates to `triforce_log.1.txt` (read whole once at that start; up to 256 MB). With `=0` the file is not read either. The crash window's Report copy is always redacted (`host/log_redact.c`, `host/redact_line.h`, `tests/test_log_redact.py`) |
|
||||
| `HOS_CRASH_WATCH=0` | (Triforce, 11-24; on unless set to `0`, `off`, `false` or `no`) No window after a crash. By default the game starts a small windowless helper of itself (`Triforce --crash-watch`, `host/hos_crash_dialog.c`) right after its log's `run_id:` line; it waits for the game to end and, after a crash, a start that could not go on, or an end with no clean exit the player did not ask for, shows "Triforce closed unexpectedly" (or "couldn't start") with why where the record or the log says, and Report (the error, the PC, the end of the log, home folder and user name out: copied to the clipboard and saved in `crash-reports/pending`; its box opens that folder) and Open the log folder. Nothing is sent and no web page opens. None for `--prepare-shaders`, `HOS_HEADLESS`, `HOS_WINDOW_NOACTIVATE`, `HOS_PGO` or under gamescope; quiet after the game's own "could not start its renderer" box. The records themselves (`crash-reports/running`, `pending`: `host/hos_crash_record.c`) are kept either way, beside the crash report in `triforce_log.txt`, which is unchanged (`tests/test_crash_record.py`, `tests/test_crash_dialog.py`) |
|
||||
| `HOS_CRASH_MINIDUMP=1` | (Triforce, 11-24; off unless set) After a crash's record, a private Windows minidump in `crash-reports/local-only` (no data segments, no extra memory), with an outcome note; never part of a report (`host/hos_crash_record.c`) |
|
||||
| `HOS_CRASH_TEST=start`, `=<seconds>` | (Triforce, 11-24; from the environment only, not `triforce_env.txt`) The game crashes on purpose, just after its crash handlers are set up or that many seconds later, to see the crash record and the window (`host/hos_crash_dialog.c`) |
|
||||
| `HOS_OPEN_KEEP_CORE=1` | (Triforce, 11-21, the performance audit's IO-24) nn::fs::OpenFile gives its virtual core up only around the host's own open, as before. The default gives it up before the path is worked out too: that reaches the button prompts' builder, which builds a file at its first open (a quarter of a second and more) while the other openers wait for it, and none of them holds a core meanwhile. Every return takes the core back before it answers the game (`host/nn_fs.c` OpenFile, `host/prompts.c` `hos_prompts_font_file`) |
|
||||
| `HOS_SHORT_SLEEP_TIMER=1`, `=0` | (Triforce, 11-21, the performance audit's OS-31) How sleeps under a millisecond wait. Not set: with 6 or fewer logical processors in the process's mask (Windows, one processor group) the game's own short sleeps wait on the high-resolution timer, which wakes about 0.5 ms late, and the host's own yield until their time; with more, all yield, as before. The game's idle job workers sleep 20 us and look again about 7,600 times a second, and a yielding sleeper keeps a processor busy. `1` (any value but 0, off, no, false): every short sleep on the timer, as the switch did before; `0`: every short sleep yields. (Triforce, 11-22, the performance audit's OS-32, after Source A's; not yet run on Linux) Off Windows the processors are not counted and, not set, every short sleep yields, as before; `HOS_SHORT_SLEEP_TIMER=game` puts the game's own short sleeps on the timer and leaves the host's yielding at any processor count, on any system: Source A's default off Windows (on Linux the timer wakes tens of microseconds late, not half a millisecond), which was never measured in the game by itself and is to be tried on a Steam Deck before `SHORT_SLEEP_ELSEWHERE` in `host/short_sleep.h` makes it what Linux does when the switch is not set. The log's `sleep:` line says which (`host/short_sleep.h`, `host/hos_thread.c` `sleep_for`) |
|
||||
| `HOS_DISCARD_KEEP_CORE=0`, `=1` | (Triforce, 11-22, the performance audit's OS-40, after Source A's; not set: as before, which is NOT Source A's default. It reverses a choice made here on purpose, changes when a game thread waits, and was not measured here) A discard of memory the game let go is milliseconds in the kernel for a region of some MB, and before it the lazy write-back's pages there are paid and pages a GPU import holds are zeroed; the game threads allowed only on the freeing thread's virtual core wait all the while. Not set: the core is given up for the discard's own kernel call, and only with the memory limit on (`HOS_MEM_LIMIT`), as before. `0`: a freed region's thread gives its core up before the whole of the discard and takes it back once, after the region is unlisted and never under the regions' lock; the discard's own call gives it up without the limit too (`FreeMemoryPages`). Source A at its Market: core waits of 50 ms and more 287 to 19, the longest 177 to 45 ms, frames unchanged; the freeing thread once waited 124 ms for its core back, in a load. `1`: the core kept through every discard, with the limit too. With `0` the log counts such frees and the longest take-back every 1,000 (`host/hos_mem.c` `discard_core`, `hos_region_free`, `discard_pages`) |
|
||||
@@ -531,9 +583,9 @@ no other file.
|
||||
|
||||
## The options file
|
||||
|
||||
`hookshot_options.ini`, in the game folder, holds the Insert menu's rows as `<key>=<number>`: the row's name in lower
|
||||
`triforce_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=8`,
|
||||
`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=10`,
|
||||
`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:
|
||||
@@ -543,7 +595,7 @@ number is not the obvious one:
|
||||
| `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 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_rate_cap` | 0 60, 1 90, 2 120, 3 144, 4 165, 5 240, 6 the monitor's refresh rate, 7 uncapped; -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%, 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) |
|
||||
@@ -561,6 +613,7 @@ number is not the obvious one:
|
||||
| `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 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 |
|
||||
| `hud_placement`, `hud_health_x` ... `hud_minimap_scale` | the HUD placement row (`host/hos_wide_ui.c`, the groups' transforms): 0 the game's, 1 Custom; each group's `_x` and `_y` -15 to 15 (percent of the picture, right and up), `_scale` 75 to 125 percent. Read at each present (`HOS_OPT_HUD_PLACEMENT` to `HOS_OPT_HUD_MINIMAP`); the minimap's through `nx2/oot_patches.py` `patch_gameplay_hud_screen` |
|
||||
| `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 |
|
||||
@@ -580,6 +633,7 @@ number is not the obvious one:
|
||||
| `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, 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`) |
|
||||
| `evil_hd` | 0 Off (the game as shipped), 1 On: Evil HD, the Graphics tab's row (`host/evil_hd.c`, option id 420, Evil HD as it is now: the row, F2, `RX_VK_EVIL_FLIP`; read each frame; `HOS_EVIL_HD` over it for the foliage). Its render distance reaches the areas entered after it is turned on (from the start of a run: all) |
|
||||
| `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
|
||||
@@ -587,6 +641,22 @@ 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=10` (11-24) changed the keys alone: Plus is Tab, and no longer Enter too, the key controller
|
||||
software (Steam Input's Desktop layout, for one) sends for a pad's A, which paused the game at every A press. A file
|
||||
before 10 whose `key_plus` is exactly the old default pair, `9,13`, is read as `9,0` and written so at the menu's next
|
||||
save; any other `key_plus` was chosen and is kept, as is `9,13` in a file of 10 or later (`host/nn_hid.c` `binds_load`).
|
||||
Every other rule reads a 10 as it reads a 9, the output sizes' schema (`gpu/vk/output_sizes.h` `OUTPUT_OPTIONS_VERSION`),
|
||||
and the launcher brings older files up to 9 and leaves the keys to the game.
|
||||
|
||||
(Triforce, 11-24) The ocarina's five note controls are five more buttons of those lines, after the left stick's and the
|
||||
camera's directions: `note_l`, `note_r`, `note_a`, `note_y`, `note_x` (named by the button each note is in the game),
|
||||
each a `pad_` line (one gamepad input, -1 none) and a `key_` line (two keys, 0 none; never a mouse button). A file
|
||||
without them, and a new one, has them unset: the game's own buttons play the notes. A bound row's input is a note only
|
||||
while the game waits for a note button (the field ocarina, a song lesson, the skull kids' songs, the scarecrow's
|
||||
recording and its recall), where it presses nothing else and that note's own button no longer plays (in a song lesson it
|
||||
still does); a note's input can be another control's too, the one rule the other rows do not have (`host/nn_hid.c`
|
||||
`oc_notes`, `nx2/oot_patches.py` `patch_ocarina_wait`, `tests/test_ocarina_notes.py`).
|
||||
|
||||
(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
|
||||
|
||||
@@ -34,7 +34,7 @@ ID-cache consumer and parameter policy helpers, using the public NVN parameter
|
||||
layout. Vulkan, registration/environment/hash inputs and the replay-lock boundary
|
||||
are modeled. Standard containers use tagged throwing allocators to target each
|
||||
cache operation. The owning-cache fault is armed after successful resource
|
||||
creation, independent of an STL's sentinel/bucket allocation choices. The 108
|
||||
creation, independent of an STL's sentinel/bucket allocation choices. The 138
|
||||
cases cover failure/retry/cache chains, ownership and allocation rollback,
|
||||
independent keys, registration changes, threads and unchanged sampler policies.
|
||||
The actual complete descriptor-binding function and fingerprint helpers run
|
||||
@@ -47,3 +47,28 @@ Run `python -I -B tests/run_all.py sampler_admission --strict`, or invoke the
|
||||
test with `--headers <Vulkan include folder> --cxx <compiler>`; `--sanitize` is
|
||||
supported on Linux. Game-free failure models do not prove native OOM/device-loss
|
||||
recovery, image-quality changes, a full campaign or performance improvements.
|
||||
|
||||
## The device's sampler limit
|
||||
|
||||
A driver makes only so many samplers (`maxSamplerAllocationCount`: 4000 on NVIDIA's and Intel's Windows drivers), and the
|
||||
renderer never destroyed one, while its keys multiply with the upscalers' texture LOD bias and the Texture filtering row.
|
||||
Past the limit `vkCreateSampler` fails and the draws that need a new sampler are left out. Now (`vk_draw.cpp`, the samplers'
|
||||
section head):
|
||||
|
||||
- Keys whose create infos sample alike share one sampler (`SamplerInfo`: the create info less what no sample reaches).
|
||||
- The room is the limit less 64 (a quarter of a smaller limit). From 3/4 of it, each new sampler first retires one that no
|
||||
draw took for a whole frame, the least recently resolved of those. A retired sampler leaves the book and its keys, and
|
||||
the samplers' generation moves (`sampler_bias_changed`), which empties every other place a handle is kept: a thread's
|
||||
`sampler_for` table, `sampler_make`'s `mine`, and the kept descriptors (`desc_keep.h`, `kept_texture`'s `now.samp`). It is
|
||||
destroyed once the timeline reaches `vk_retirement_value()` as taken at its retirement: after every recording made so far.
|
||||
- Which samplers are in use is not known to the book while the tables above answer for it. Every move of the generation
|
||||
empties them, so a sampler drawn with resolves at the book again within the frame after a move. A sampler is retired only
|
||||
when it has not resolved there since a move at least two presents old; when none qualifies the generation is moved once
|
||||
(a survey, the first one half the spare room before the retiring point) and nothing is retired until that has aged.
|
||||
- The room full (the samplers made and the retired ones the GPU still has): nothing is made, and the key fails for that
|
||||
present, as a failed creation does.
|
||||
|
||||
The `limit*` cases model a driver of 80 samplers and a GPU timeline: 300 recordings on two long-lived threads with a
|
||||
moving window of samplers (each made once, none refused, none destroyed before the GPU passed the last recording that drew
|
||||
with it), a room filled within one frame, shared infos, the two allocation faults, and `limit-held`: the generation has
|
||||
moved when a sampler is retired, and its key is made anew under another handle while the old one is still the GPU's.
|
||||
|
||||
@@ -90,7 +90,9 @@ python -I scripts\oot_saves.py export nx2navi --hookshot "C:\Games\Hookshot"
|
||||
|
||||
The script refuses to run while it sees Hookshot or any of the programs above running. The side being overwritten is
|
||||
copied to `oot-save-backups/<import or export>-<name>-<date>-<time>/` first: in `~/.local/share` on Linux, in
|
||||
`%LOCALAPPDATA%\Hookshot` on Windows. To undo a copy, put the backup's contents back.
|
||||
`%LOCALAPPDATA%\Hookshot` on Windows. To undo a copy, put the backup's contents back. The new save is then copied whole
|
||||
into a hidden folder inside the target and swapped for the old one only once that copy worked, so a copy that fails part
|
||||
way (a full disk, a file that cannot be written) leaves the target's save as it was.
|
||||
|
||||
## Copy by hand
|
||||
|
||||
|
||||
Reference in New Issue
Block a user