mirror of
https://git.triforceproject.com/triforce/source
synced 2026-12-01 05:18:50 -04:00
Triforce v0.9.0
Character tab, faster renderer defaults, HD rumble shipped, and the 11-30 bug pass: ending softlock below 60 fps, adult first-night lock, Intel Arc robust buffers, adult map, randomizer load order.
This commit is contained in:
@@ -201,8 +201,9 @@ case-sensitive, and an unknown one is ignored.
|
||||
| `RX_VK_SETTLE_GATE=1`, `=2` | (Triforce, 11-22, off by default; the performance audit's SYNC-29, after Source A's; `gpu/vk/settle_gate.h`) A CPU read that lets the stopped queues whose waits are met go on (the readback's look, which `RX_VK_RB_SETTLE=1` turns on, and the two looks made for a range a texture may be in) takes the order's lock whenever a queue is stopped, and that lock is held through whole replays and presents. With the gate a site looks only while a queue is stopped **and** the CPU has signalled an event since the last finished look, or a stopped queue waits on an event whose value is read from guest memory; any other met wait was met by a signal in the stream, and the thread that replayed it looked before it let the lock go. `1`: the readback's look; `2`: the texture sites' too (new ground: those looks order the exposure meter's readback, so `2` needs the lab's flicker count). Unset or `0`: every look as before. The `RX_VK_LAB_AB` knobs `settlegate` and `texgate` are `1` and `2` in their phases (`rbsettle+settlegate` is the pair the audit asks for). The 3000-readback line and the texture catch-ups' 300-call line count the looks made and skipped |
|
||||
| `RX_VK_READBACK_LATE=<rule>[,<rule>]`, `RX_VK_LOG_READBACK_RANGES=1` | (Triforce, 11-22, the performance audit's SYNC-19, after Source A's; `gpu/vk/readback_late.h`) Ranges the CPU reads back **without** the wait for their write-back, from what guest memory holds (the last write-back made): a rule is a size in hex (`3980`: every range of 0x3980 bytes, the culling camera block Source A reads late by default) or `newest` (a range whose writer is the newest submission handed out: the game cannot have waited for it). **Unset: no rule**, every readback waits as before, until the lab has run it where the waits are long (a handheld, an AMD iGPU, a weak discrete card); `=0`: none either. The `RX_VK_LAB_AB` knob `rblate` is `3980` in its phases. A late read hands the game the frame before's values, and when the CPU resets a range read late the pending write-back lands over its reset (the exposure meter's flashes): `newest` can catch that meter, so it is never a default. `RX_VK_LOG_READBACK_RANGES=1`: with every 3000-readback line, the 12 ranges that waited longest (readbacks, waits, ms, how often their writer was the newest submission, how often read late), to find such ranges on other hardware; nothing is noted without it |
|
||||
| `RX_VK_WB_WAIT_REC=1`, `=2` | (Triforce, off by default; the handoff's §12.9, `gpu/vk/wb_rec_wait.h`) A wait for a write-back still on the GPU (a capture's late pages on the game's submitting thread, a read or binding of a page put off) ends once the recording its submission was finished in is done on the GPU, not when the submissions' timeline reaches it: that timeline is held below any submission stopped at an event wait, and the lab's Market had 20-46 ms waits of the game's thread with the GPU 4 submissions behind. Whatever the switch, the wait for the recording comes first and the rest is counted: the stall line's `N of them X ms after their writer's recording was done`, the `late:` line's `ms of the wait after the recording that finished it was done`, the frame trace's `wb_held_ms`. Off: the captures' late-page wait orders something not known yet (`RX_VK_LATE_NEW`), so it is tried with the lab's flicker count first. (Triforce, 11-22, the performance audit's SYNC-122, after Source B's) The reads' side: a readback whose write-back is not recorded yet waited on the submissions' timeline with no bound and no second look; it is counted now (the 3000-readback line's second line), and the stall line names the held part by caller (takes, reads, binds, readbacks). The variable is a mode: `1` as above, and such a readback waits in 1 ms slices, looks its writer's recording up between them and ends with it; `2` is the check, where no wait ends earlier and the readback's slices count the part after the recording was done (what `1` would not have waited); unset, `0` or any other text: off, one wait as before. The check of the pages a later write-back changes (the audit's SYNC-101) is not built. `RX_VK_TL_REC=1` and the lab knob `tlrec` ended a capture's wait at a submission's first part, before its burst's write-backs were recorded: they now end it at the recording the submission was finished in, as `=1` here does; `RX_VK_TL_REC=2` keeps the old lookup |
|
||||
| `RX_VK_RB_REC_END=0` | (Triforce, 11-27; `gpu/vk/wb_rec_wait.h` `readback_wait`, `tests/test_readback_rec_end.py`) **11-28: modes.** Unset or `=2` (the default): the last-part wait below only for a range the CPU writes after reading it (the exposure meter; the pages the write watch's collections name, `vk_memory.cpp` `memory_rb_cpu_written`), the first part, as before, for a range it only reads (a frame late at worst). `=1`: every readback, as 0.8.5 (its worker-thread reads of read-only results waited ~5 ms each, 98 -> 82 fps in Hyrule Field at the owner's settings). `=0`: off, as 0.8.5.1. A CPU readback of GPU results waits for the **last** part of the recording that writes it back. A recording made in parts (`RX_VK_CHUNK`'s counted parts, 240 draws on NVIDIA's driver, or Threaded rendering's pass-end parts) writes back at each part's end, all under the recording's one value, and the readback's wait looked that value up in a table that keeps the first part (`RX_VK_REC_LAST`, off, keeps a later one only when the value comes again). A read that came between the first part's submit and the last one's got what guest memory held then: OoT's exposure meter read as 0 where the GPU's sum was still to come, then the sum landed over the CPU's next 0 and the next frame added to it. In a still view the picture flashed brighter for a frame and stepped down: 3 times at Hyrule Field in a four-scene held-camera benchmark run (`HOS_BENCH_PAN=0`), on v0.8.4 too. Now the readback looks up the newest part submitted and whether it ended the recording: an ended recording's last part is waited for; one that goes on, the part found (the old wait), then 1 ms slices of the submissions' timeline between looks until it ends or the timeline reaches the value. A value not recorded yet goes to the fallback as before. `RX_VK_LOG_READBACK_ZERO=1` now says the writer's recording's first part, newest part and the recordings done at a zero read; the 3000-readback line counts the reads that waited past a part. Measured on an RTX 5090 (held camera): the meter's zero reads after a wait went from 0-10 a run to 0 in 4 runs, and Hyrule Field's flashes from 3 a run to 0. The rule waits 350-550 times a run, 2-5 ms each, on the game's worker threads, nearly all at a scene's load and in its first seconds. Frame rate unchanged (144.5 against 143.2 fps, 3 runs each); Hyrule Field's p99 frame time 9-13% higher. Waiting only for the part that wrote the range would be cheaper (not done). The rule's branches stay out of `invalidate` and submit_recording's registration, so that the renderer's play profile still matches them. `0`: the first part, as before |
|
||||
| `RX_VK_RB_REC_END=0` | (Triforce, 11-27; `gpu/vk/wb_rec_wait.h` `readback_wait`, `tests/test_readback_rec_end.py`) **11-28: modes.** Unset: `=3` where a submission's parts end at the game's render passes (`RX_VK_PART_PASS_END`: NVIDIA's driver's default, or Threaded rendering; since 11-29, the owner's decision), else `=2`. `=2`: the last-part wait below only for a range the CPU writes after reading it (the exposure meter; the pages the write watch's collections name, `vk_memory.cpp` `memory_rb_cpu_written`), the first part, as before, for a range it only reads (a frame late at worst). `=1`: every readback, as 0.8.5 (its worker-thread reads of read-only results waited ~5 ms each, 98 -> 82 fps in Hyrule Field at the owner's settings). `=0`: off, as 0.8.5.1. **11-29: `=3`** (the default with the pass-end parts, with `RX_VK_PART_RB=32`). Mode 2, and a range the CPU only reads waits for the part that copied it back (`readback_range_wait`; `vk_memory.cpp` `memory_wb_part_seq`, the part's batch noted at its submit), not the recording's first part; while no part submitted has copied it, the newest part and 1 ms slices as below, until its part is known or the recording ends. Why: with the parts ending at the game's render passes (`RX_VK_PART_PASS_END`, NVIDIA's driver's default since 11-29) the first part is ~32 draws, and a read-only result written back in a later part was read as it was a frame before. One of them moves OoT's exposure: with the camera moving the whole picture went ~5 levels brighter for 15 presents and back, 3 times in 30 s at Kakariko (a moving-camera picture check, 160 x 90 shots of every present), never with `=1` or the counted parts. The 3000-readback line counts these waits and those whose part came after the first. A CPU readback of GPU results waits for the **last** part of the recording that writes it back. A recording made in parts (`RX_VK_CHUNK`'s counted parts, 240 draws on NVIDIA's driver, or Threaded rendering's pass-end parts) writes back at each part's end, all under the recording's one value, and the readback's wait looked that value up in a table that keeps the first part (`RX_VK_REC_LAST`, off, keeps a later one only when the value comes again). A read that came between the first part's submit and the last one's got what guest memory held then: OoT's exposure meter read as 0 where the GPU's sum was still to come, then the sum landed over the CPU's next 0 and the next frame added to it. In a still view the picture flashed brighter for a frame and stepped down: 3 times at Hyrule Field in a four-scene held-camera benchmark run (`HOS_BENCH_PAN=0`), on v0.8.4 too. Now the readback looks up the newest part submitted and whether it ended the recording: an ended recording's last part is waited for; one that goes on, the part found (the old wait), then 1 ms slices of the submissions' timeline between looks until it ends or the timeline reaches the value. A value not recorded yet goes to the fallback as before. `RX_VK_LOG_READBACK_ZERO=1` now says the writer's recording's first part, newest part and the recordings done at a zero read; the 3000-readback line counts the reads that waited past a part. Measured on an RTX 5090 (held camera): the meter's zero reads after a wait went from 0-10 a run to 0 in 4 runs, and Hyrule Field's flashes from 3 a run to 0. The rule waits 350-550 times a run, 2-5 ms each, on the game's worker threads, nearly all at a scene's load and in its first seconds. Frame rate unchanged (144.5 against 143.2 fps, 3 runs each); Hyrule Field's p99 frame time 9-13% higher. Waiting only for the part that wrote the range would be cheaper (not done). The rule's branches stay out of `invalidate` and submit_recording's registration, so that the renderer's play profile still matches them. `0`: the first part, as before |
|
||||
| `RX_VK_LATE_QUEUE=1` or `0` | (Triforce, 11-20; 11-23) A capture's late pages (pages a submission still on the GPU writes back: OoT's exposure meter and the per-frame pools) waited for at the queue's next submit, not at the capture's take (`gpu/vk/vk_memory.cpp` `late_queue_on`). Unset: at the queue, except while the replay's submits are held (`RX_VK_BATCH`, on by default with Mesa's RADV): there a held submit applies no fix, the fixes wait for the batch's flush and copy guest memory the game has written again for its next frame, and the replay reads those slots live meanwhile: the lighting and exposure flicker on Linux AMD from 50-90 s into play in v0.7.0. `1`: at the queue with held submits too (v0.7.0 as shipped); `0`: at the take on every driver, as before 11-20. The log says `vk: late pages' wait ...` when it is first asked and when the answer changes |
|
||||
| `RX_VK_LATE_PART=1` | (Triforce, 11-29, the performance session; `gpu/vk/vk_replay.cpp` `late_fix_part_wait`, `gpu/vk/vk_memory.cpp` `late_pages_part`, `tests/test_readback_rec_end.py`; **off unless set**, the `RX_VK_LAB_AB` knob `latepart`) The queue's wait for the late pages (`RX_VK_LATE_QUEUE`, above) waits for the part that wrote the pages back last, on the recordings' timeline, not for their value, which a recording made in parts signals with its last part. The part is found at the take, where the fix is put off (its recording was sent whole by then, so no later part of it writes the pages again): the newest part among the write-backs still in flight over the fix's pages; one not known (its part not submitted, the list cut) or none found: the value, as before. The `vk: RX_VK_LATE_PART (600 takes)` line counts the waits made at a part and the fixes whose part was not known. Measured (RTX 5090, a held camera, 200 s, paired phases): +0.61% at Lake Hylia (0.031 ± 0.037 ms a frame), +0.45% at the Market (the owner's options), +0.69% at Kakariko (the defaults): the pages are written back in one of a frame's last parts, so the wait is ~0.1 ms shorter (0.70 -> ~0.55 ms each at Lake Hylia). Every fix's part was known. The moving-camera picture check clean (Kakariko 6.0, the Market 8.4). Not measured: other cards; with `RX_VK_BATCH` (no fix is put off while submits are held) |
|
||||
| `RX_VK_LATE_INLINE=1` | (Triforce, 11-22, the performance audit's MEM-80, after Source B's; `gpu/vk/late_inline.h`; **off unless set**, not yet run in the game) A late page (one the CPU wrote while a submission still on the GPU writes it back) is waited for and taken again by default (`RX_VK_LATE_QUEUE`: at the queue's next submit). `RX_VK_LATE_NEW=1` (knob `latenew`) turns four no-wait rules on, each of which brought brightness steps back at the Castle Town save. This turns on the partial rule alone (knob `lateinline`): a page only part of which a submission on the GPU writes back has its other parts synced from the capture, no wait; pages of pools with no mirror, texture storage, pages written back whole and pages whose write-backs' ranges are not known are waited for as by default. The partial rule, here and under `RX_VK_LATE_NEW`, now asks which ranges are still on the GPU against the progress the capture read before its copies, not a second read at the take: a write-back done between the two counts as in flight, and its range is not synced from the older copy. `RX_VK_LOG_LATE` shows the pages waited for |
|
||||
| `RX_VK_PASS_TIMING=1` or `2` | GPU time per pass (2: per program too), logged every 600 presents |
|
||||
| `RX_VK_SLOW_LOG=<ms>` | The replay's times for each frame that took longer than this |
|
||||
@@ -237,7 +238,8 @@ a frame; the two knobs are now asked once a phase and once a submission.
|
||||
| `RX_VK_NO_SPILLING_RATE=1` | (Triforce, the performance audit's PIPE-55, after Source A's; Linux build only) The Linux build sets `shader_spilling_rate=2` in its environment before the Vulkan instance is made (`gpu/vk/mesa_spilling.h`, `gpu/vk/vk_main.cpp` `create_instance`), unless the player has set that variable. Only Mesa's Intel shader compiler reads it: a program whose registers do not fit is built in fewer, larger steps (Source A, an Iris Xe: one compute program not built after 20 minutes and 13 GB, 32 s and 1.7 GB at rate 2). `=1` sets nothing, so the driver keeps its own rate. On Mesa's Intel driver the log has `vk: Mesa's Intel compiler spills at rate ...`. The Windows build sets nothing: under Proton, add `shader_spilling_rate=2` to the launch options. Not run on an Intel GPU here |
|
||||
| `RX_VK_DRIVER_FAULTS=0` or `2` | (Triforce, 11-22, the performance audit's PIPE-57, after Source A's; `gpu/vk/driver_faults.h`) On AMD's own Windows driver only (`VK_DRIVER_ID_AMD_PROPRIETARY`), unless `0`: a program whose pipeline build faulted inside the driver is not asked of the driver again this run, and its key is appended to `triforce_driver_faults.txt` beside the executable (one line: vendor, driver version, program) by the fault's handler, before a fault during the start's shader work restarts the game, so the next start with that driver skips it instead of faulting again (`vk: driver faults: N programs ... kept out of it`; delete the file to try them again, another driver version ignores its lines). And one build of a program is inside the driver at a time: a second waits outside it, a probe of the caches is told a compile is required. `2`: on every driver (the lab's); `0`: nowhere. On other drivers nothing of it runs (`gpu/vk/vk_draw.cpp` `fault_quarantine`, `build_graphics`, `guarded_graphics`) |
|
||||
| `RX_VK_PASS_BARRIER=game` or `full` | The barrier a draw pass starts with (`gpu/vk/pass_barrier.h`). `game`: a pass right after another, with nothing recorded between (no barrier of the game's, no copy, clear, uniform update or dispatch), waits for the earlier work in its fragment stages only, so its vertex, task and mesh work may overlap the earlier pass's fragments; a pass the replay itself split off for a hazard (`a pass of its own` in the log) and `RX_VK_BARRIER_EVERY_DRAW`'s keep a full one. (Triforce, P4) "Nothing recorded between" is the command buffer's own count (`RX_VK_BARRIER_CONTEXT`), so beside the Replay helper threads too. `full`: a full barrier at every pass start, as before. Unset: `game` with NVIDIA's driver, `full` on every other card. The log's `vk: pass barriers:` line says which, and the frame statistics' `pass starts ordered in their fragment stages only` how many a frame |
|
||||
| `RX_VK_CHUNK=<n>` | (Triforce, 11-22, the performance audit's SYNC-66, after Source B's; `gpu/vk/barrier_rules.h` `part_draws`) How many draws and dispatches a part of a long submission has in a serial replay: the GPU starts on the first part while the rest is recorded, and each split costs a queue submit, two full barriers and the part's bookkeeping (about 27 a frame at 120). Unset: the driver's default, **240 on NVIDIA's driver** (its driver id, `VK_DRIVER_ID_NVIDIA_PROPRIETARY`, on Windows and Linux; 11-26, measured on v0.8.3: RTX 5090 at 2560 x 1440, the benchmark's four scenes with the camera held, `RX_VK_PARALLEL=0`, the knob `chunk:240` against 120 in neighbouring phases: 0.37, 0.18, 0.21 and 0.08 ms off the frame at Lake Hylia, the Market, Hyrule Field and Kakariko, +0.8 to +3.1% fps; on v0.8.4 (11-27, the same way, 300 s a scene): 0.55 ± 0.20 ms at Lake Hylia (6.3% fps), 0.42 ± 0.03 ms in the Market (5.1%), 0.26 ± 0.06 ms at Kakariko (3.5%), and at Hyrule Field, the fastest scene (183 fps), 120 was 0.05 ± 0.03 ms faster (0.9%); with this PC's default helpers 0.05 to 0.06 ms (0.8%, at Lake Hylia not significant); with the GPU slowed to about half busy (`RX_VK_SIM_GPU_SLOW=8`) 0.45 ± 0.06 ms at Lake Hylia (5.2%); 480 was mixed and 960 lost about 1.2 ms everywhere, the write-backs the game waits for starting too late; fewer cuts change which occlusion counts arrive in time, fewer straddling a split and some finishing later, and a count is written only when whole, so none is ever hidden; measured only on that RTX 5090 desktop, with the replay thread alone but for the default helpers' figure: 4-core and laptop PCs, NVIDIA's Linux driver and capped frame rates are not measured) and **120 on every other driver** (NVK, Dozen and Venus on an NVIDIA card too) until the lab has measured one (Source B cuts at 128 where the GPU idles while the CPU records and at 4096 on desktop drivers); `0`: whole submissions, never split; `120`: the size before, whatever the default says (on NVIDIA's driver too). The size, its default and the knob apply where parts are cut by count: with Threaded rendering off (the default) or `RX_VK_PART_PASS_END=0`. With Threaded rendering on and `RX_VK_PART_PASS_END` unset, a part ends where the game ends its render pass, from 120 draws (the first part from 32) to 512 (the log's `vk: a submission's parts end where the game has ended its render pass` line), and neither default is read: leave `RX_VK_CHUNK` unset there, because any value turns those parts off: a number above 0, 120 too, cuts every n draws wherever that falls, inside the game's passes too, and any other value (0, empty, negative) gives whole submissions (`RX_VK_PART_PASS_END=1` gives those parts on any run, and the variable is then read only in the knob's phases). The size was read once into a static: now the `RX_VK_LAB_AB` knob `chunk:<n>` changes it in its phases while the variable is unset (`RX_VK_LAB_AB=chunk:120,chunk:480` with `RX_VK_PARALLEL=0` and Threaded rendering off; with Threaded rendering's parts on, the knob's phases are counted and the phases between end at the game's passes, so add `RX_VK_PART_PASS_END=0` to compare sizes). The log's first `vk: a submission's parts:` line says the size in force and the driver's default, and when Threaded rendering's parts decide instead |
|
||||
| `RX_VK_CHUNK=<n>` | (Triforce, 11-22, the performance audit's SYNC-66, after Source B's; `gpu/vk/barrier_rules.h` `part_draws`) How many draws and dispatches a part of a long submission has in a serial replay: the GPU starts on the first part while the rest is recorded, and each split costs a queue submit, two full barriers and the part's bookkeeping (about 27 a frame at 120). Unset: the driver's default, **240 on NVIDIA's driver** (its driver id, `VK_DRIVER_ID_NVIDIA_PROPRIETARY`, on Windows and Linux; 11-26, measured on v0.8.3: RTX 5090 at 2560 x 1440, the benchmark's four scenes with the camera held, `RX_VK_PARALLEL=0`, the knob `chunk:240` against 120 in neighbouring phases: 0.37, 0.18, 0.21 and 0.08 ms off the frame at Lake Hylia, the Market, Hyrule Field and Kakariko, +0.8 to +3.1% fps; on v0.8.4 (11-27, the same way, 300 s a scene): 0.55 ± 0.20 ms at Lake Hylia (6.3% fps), 0.42 ± 0.03 ms in the Market (5.1%), 0.26 ± 0.06 ms at Kakariko (3.5%), and at Hyrule Field, the fastest scene (183 fps), 120 was 0.05 ± 0.03 ms faster (0.9%); with this PC's default helpers 0.05 to 0.06 ms (0.8%, at Lake Hylia not significant); with the GPU slowed to about half busy (`RX_VK_SIM_GPU_SLOW=8`) 0.45 ± 0.06 ms at Lake Hylia (5.2%); 480 was mixed and 960 lost about 1.2 ms everywhere, the write-backs the game waits for starting too late; fewer cuts change which occlusion counts arrive in time, fewer straddling a split and some finishing later, and a count is written only when whole, so none is ever hidden; measured only on that RTX 5090 desktop, with the replay thread alone but for the default helpers' figure: 4-core and laptop PCs, NVIDIA's Linux driver and capped frame rates are not measured) and **120 on every other driver** (NVK, Dozen and Venus on an NVIDIA card too) until the lab has measured one (Source B cuts at 128 where the GPU idles while the CPU records and at 4096 on desktop drivers); `0`: whole submissions, never split; `120`: the size before, whatever the default says (on NVIDIA's driver too). The size, its default and the knob apply where parts are cut by count: with Threaded rendering off (the default) on a driver other than NVIDIA's, or `RX_VK_PART_PASS_END=0` (on NVIDIA's driver the 240 above is in force only then, since 11-29). With Threaded rendering on, or on NVIDIA's driver (the `RX_VK_PART_PASS_END` row), and `RX_VK_PART_PASS_END` unset, a part ends where the game ends its render pass, from 120 draws (the first part from 32) to 512 (the log's `vk: a submission's parts end where the game has ended its render pass` line), and neither default is read: leave `RX_VK_CHUNK` unset there, because any value turns those parts off: a number above 0, 120 too, cuts every n draws wherever that falls, inside the game's passes too, and any other value (0, empty, negative) gives whole submissions (`RX_VK_PART_PASS_END=1` gives those parts on any run, and the variable is then read only in the knob's phases). The size was read once into a static: now the `RX_VK_LAB_AB` knob `chunk:<n>` changes it in its phases while the variable is unset (`RX_VK_LAB_AB=chunk:120,chunk:480` with `RX_VK_PARALLEL=0` and Threaded rendering off; with Threaded rendering's parts on, the knob's phases are counted and the phases between end at the game's passes, so add `RX_VK_PART_PASS_END=0` to compare sizes). The log's first `vk: a submission's parts:` line says the size in force and the driver's default, and when Threaded rendering's parts decide instead |
|
||||
| `RX_VK_PART_PASS_END=0` or `=1`, `RX_VK_PART_FIRST=<n>`, `RX_VK_PART_MIN=<n>`, `RX_VK_PART_MAX=<n>`, `RX_VK_PART_RB=<n>`, `RX_VK_PART_IDLE=<n>` | (Triforce; `gpu/vk/vk_replay.cpp` `pass_end_parts`, `maybe_split`; **on by default on NVIDIA's driver since 11-29** (`gpu/vk/barrier_rules.h` `part_pass_end_default`, by the driver id as for `RX_VK_CHUNK`'s 240) and with Threaded rendering on; off by default on every other driver) A long submission's parts end where the game has ended its render pass instead of every `RX_VK_CHUNK` draws wherever that falls: a submission's first part from `RX_VK_PART_FIRST` (32) draws and dispatches, the rest from `RX_VK_PART_MIN` (120), at `RX_VK_PART_MAX` (512) at the latest. Why on NVIDIA's driver: the frame trace (`HOS_FT`) at Lake Hylia showed the GPU idle about 0.9 ms of a 5.4 ms frame once the submission that waits on another queue's event was released: the work it had held was recorded as one burst and reached the GPU only at the first 240-draw cut, while a first part from 32 starts the GPU sooner. Measured 11-29 on v0.8.5.2 (RTX 5090, driver 621.40, Windows, 16 threads; the benchmark's seven places with the camera turning, 3 runs of each arm interleaved, `=1` against unset, which cut every 240): with the defaults 183.8 (183.6-184.0) to 193.8 (193.6-194.3) fps, +5.5%, every scene faster (+1.6% at Kokiri to +7.6% at Kakariko), the 1% lows +3.9% (+1.6 to +7.0%); with ULTRA HD and Evil HD on 170.2 (169.2-170.7) to 178.8 (177.9-179.3), +5.1% (+0.8% at Kokiri, +4.9 to +6.8% elsewhere), the 1% lows +3.6% (Kokiri -2.1%, inside the runs' spread); the median frame 0.1 to 0.45 ms shorter, frames over 8 ms fewer in every scene but Kokiri with ULTRA HD (12.6 against 14.4 in 1000), and frames over 10 to 12 ms, under 4 in 1000 everywhere, a few more with ULTRA HD at the Deku Tree, Kokiri and Death Mountain Trail and fewer or as many elsewhere. In the run at a held camera (`=1` with the `RX_VK_LAB_AB` knob `chunk:240`, 200 s, each knob phase against the phases beside it): the 240-draw cut cost 0.385 ± 0.017 ms a frame at Lake Hylia with ULTRA HD (6.97% fps, 63 pairs), 0.371 ± 0.021 ms there with the GPU slowed (`RX_VK_SIM_GPU_SLOW=8`, 6.6%), and nothing measurable in two slower views, the Market with ULTRA HD (137 fps, 0.049 ± 0.056 ms) and Kakariko with the defaults (155 fps, 0.012 ± 0.038 ms). The picture: a shot of every present at four places with the camera held had no flash, step or blink the unset run did not have. **11-29 afternoon: a flicker with the camera moving.** The whole picture went ~5 levels brighter for 15 presents and back (3 of 4 moving-camera runs at Kakariko; 160 x 90 shots of every present): a readback of a range the CPU only reads waited for the first part, here ~32 draws, and read a result written back in a later part as it was a frame before (`RX_VK_RB_REC_END=3`'s row). **`RX_VK_PART_RB=<n>`** (32 unset where `RX_VK_RB_REC_END` is 3, the default with these parts; `=0`, or another mode set, off; the `RX_VK_LAB_AB` knob `partrb:<n>`): a part that queues the write-back of a page the CPU reads back (`vk_memory.cpp` `rb_write_note`, at the written binding) ends from <n> draws, not `RX_VK_PART_MIN`, so that `=3`'s wait for it is shorter. In the run at a held camera with `RX_VK_RB_REC_END=3` (200 s, paired phases): `partrb:32` +8.5% at Death Mountain Trail (0.450 ± 0.157 ms a frame), +1.7% at Lake Hylia, -0.4% at the Market (ULTRA HD on), -0.8% at Kakariko (the defaults); `partrb:1` +6.5%, -1.7%, -0.8%, -0.6%. **`RX_VK_PART_IDLE=<n>`** (off unset; `partidle:<n>`): a part ends from <n> draws once the GPU has done everything sent (the recordings' timeline at `rec_seq`, `part_min_now`): +0.7%, -1.0%, +0.1%, -0.2%, nothing measurable. Both are asked through calls, so `maybe_split` and the binding keep their control flow (and their renderer profile). The benchmark tour (RTX 5090, 180 s, the PC quiet; mode 2 against `RX_VK_RB_REC_END=3 RX_VK_PART_RB=32`): ULTRA HD and Evil HD on 176.4 against 177.8 fps (+0.8%; rounds of +5.2%, +1.2%, -3.9%), the defaults 188.7 against 185.1 (-1.9%, 2 rounds): within the spread. The moving-camera picture check clean with both (Kakariko 6.2). Both the default with these parts since 11-29 (the owner's decision); `RX_VK_RB_REC_END=2` gives the parts as `3f9728b` made them (it turns `RX_VK_PART_RB` off too). Not measured: other NVIDIA cards, laptops, 4-core PCs, NVIDIA's Linux driver, capped frame rates. `=0`: counted parts (`RX_VK_CHUNK` or the driver's default) on any run, the size before 11-29 on NVIDIA's driver; `=1`: these parts on any run and driver, `RX_VK_CHUNK` set too (then read only in the `RX_VK_LAB_AB` knob `chunk:<n>`'s phases); unset with `RX_VK_CHUNK` set: counted parts. The log's `vk: a submission's parts end where the game has ended its render pass` line says when they are in force and why |
|
||||
| `RX_VK_SPLIT_BARRIER=pass` or `full` | (Triforce) A long submission goes to the GPU in parts (`RX_VK_CHUNK`: 240 draws and dispatches on NVIDIA's driver, 120 on every other); `gpu/vk/barrier_rules.h`. `pass`: a pass open at a part's split goes on in the next part, begun again with the same targets behind a barrier of its attachments' outputs alone and with what its draws sampled and wrote, so the GPU does not drain between two draws of one of the game's passes; where the part's end records anything (its uniform updates, its write-backs) or an event's write is held, the full barriers as before. A parallel replay's segments are not split into parts: each begins and ends with a full barrier, so nothing goes on across a segment's edge. `full`: a full barrier at each part's end and the next one's start, as before. Unset: `full` on every card ((Triforce, 11-22, SYNC-66) this row said `pass` with NVIDIA's driver; `pass` has been off unless set since 11-16, when the lab's Market showed no gain from it: `barrier_rules.h` `split_in_pass`). The log's `vk: a submission's parts:` lines say which and, every 3,600 splits, how many went on in their pass and how many of those parts had uploads (whose own full barriers order them after the part before all the same) |
|
||||
| `RX_VK_GPU_WAITS=0` | (Triforce, 11-22, the performance audit's SYNC-27; on by default; not yet run in the game) The host's calls that block on the GPU are made without being timed, as before. By default each is timed where it is wrapped (`gpu/vk/vk_work.h`, `gpu/vk/gpu_wait_kinds.h`) and summed by kind: `vkWaitForFences` and `vkWaitSemaphores` with a timeout above 0 (fences, timelines), `vkQueueWaitIdle` and `vkDeviceWaitIdle` (idle), `vkGetQueryPoolResults` with the wait bit (queries). Polls count nothing, a wait inside a wait counts once, and the low-latency sleep's wait is left out as pacing. After each 120-present line the log has `vk: host waits for the GPU: ... ms a frame (fences, timelines, idle, queries; all threads)`, which counts what that line's "GPU-bound wait" (the recording slots' waits alone) does not, and the frame trace has `gpu_waits_ms`. The cost is two clock reads a blocking wait. The `RX_VK_LAB_AB` knob `nogpuwaits` turns the count off in its phases |
|
||||
| `RX_VK_ORDER_WAKE=1` | (Triforce, 11-22, the performance audit's SYNC-59; off unless set; not yet run in the game) A queue stopped at a wait for an event goes on when a submit finds the wait met. A signal of the CPU's (`nvnEventSignal`) wakes no one: the stop waits for the order thread's next `Sleep(1)`, or a game thread's wait yields up to 3 ms and then forces it. With the switch (`gpu/vk/vk_replay.cpp` `sync_watch`, `event_signal_queued`) the order thread waits on an auto-reset event, 1 ms at most, which the signal sets while a queue is stopped: one `SetEvent`, no lock and no replay on the signalling thread. And a game thread's wait for stopped work that sees a signal pending lets the queues whose waits are met go on first, as `sync_settle` does; nothing is forced. The order line counts the wakes and those that let work on: under about one a second, leave it off. The `RX_VK_LAB_AB` knob `orderwake` turns it on in its phases |
|
||||
@@ -431,7 +433,7 @@ a frame; the two knobs are now asked once a phase and once a submission.
|
||||
| `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`; since 11-27 not handed a part at a time, `RX_VK_RECORDER_PARTS` below), 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_THREADED=0`, `=1`, `=auto` | (Triforce; **Auto by default since options_version 11** (11-29, the owner's decision; `gpu/vk/vk_menu.cpp` `menu_init` turns an older options file's Off into Auto once, On or Auto chosen stays), 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`; since 11-27 not handed a part at a time, `RX_VK_RECORDER_PARTS` below), 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`. Measured 11-29 (RTX 5090, 8 cores, the benchmark tour, `=0` against `=1`, 2 rounds, with the readbacks' fix for the parts' flicker, `RX_VK_RB_REC_END` above): +8.4% fps with the owner's options (186.6 -> 202.2), +4.7% with the defaults (195.0 -> 204.2), every scene up, the 1% low better in 13 of 14 rows; with the camera moving 183.3 fps against 165-167, the picture the same. The benchmark tour (`HOS_BENCHMARK`) takes the row as play does (`RX_VK_BENCH` is another bench); the lab's RX 7900 XT (11-27): the picture right, no gain. Not measured: other cards since |
|
||||
| `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`) |
|
||||
@@ -651,7 +653,7 @@ number is not the obvious one:
|
||||
| `vibration_curve` | hundredths, 20 to 150: the power on the motors' rumble, 100 is 1.00 (none) |
|
||||
| `walk_key` | 0 Off, 1 Caps Lock, 2 Shift, 3 Ctrl, 4 Tab |
|
||||
| `walk_scale` | hundredths, 20 to 90: 51 is 0.51 of the stick's travel |
|
||||
| `robust_buffers` | 0 Auto (on), 1 Off, 2 On |
|
||||
| `robust_buffers` | 0 Auto (off since 11-17), 1 Off (the default), 2 On. With Intel's Windows driver robust buffer access is on whatever it says (11-30, `gpu/vk/vk_vendor.h` `robust_buffers`: Arc B570, Pro B70 and A770 lost the device at the file select without it); `RX_VK_ROBUST=0` or `1` over both |
|
||||
| `game_speed` | 0 Per frame, 1 Real time |
|
||||
| `text_speed` | 0 Normal, 1 2x, 2 4x, 3 Instant |
|
||||
| `achievements` | 1 on, 0 off: whether anything is earned (`host/achievements.c`, option id 175); at once |
|
||||
|
||||
Reference in New Issue
Block a user