mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 18:09:58 -04:00
Both are about the time between two frames. Ocarina waits for the previous frame's fence before it lets the next frame's GPU work start: its main thread signals an event from the CPU, and the main queue's commands begin with a wait for it. The completion thread ran a submission's callbacks before it let the submission's waiters go, and the occlusion counts were among them: one vkGetQueryPoolResults and one vkResetQueryPool per reported query, about a hundred queries a frame in Hyrule Field. On an RX 7900 XT (26.10.1) each call goes into the kernel, 3.9 ms of every frame, so the fence was reached 4 to 6 ms after the GPU had finished with every game thread waiting. Slots come from the ring in order, so one call now reads up to 256 slots from the one asked for, the available results are kept for the segments that follow, and the slots taken are reset in runs (vk_exec_xfer.c oq_take, NX2NAVI_OQ_BATCH). Standing in Hyrule Field at 3440x1440 with FSR: 52.7 fps against 44.6, the longest frame of the measured minute 46 ms against 55; the completion thread spends 0.3 ms a frame in the callback. When the CPU's signal came a millisecond or two after the main queue's submit call, the submission took its copies, stopped at the wait and was held; the render thread polled the event, presented, and the present replayed the frame under a value the game's fence does not stand for. The next frame then skipped its wait for the GPU and was replayed inside its submit call, and frames of 23 and 15 ms took turns. A submission that begins with a wait for an event the CPU has signalled before now waits for the signal in the submit call, before its copies are taken, 10 ms at most (vk_exec.c vk_exec_gate_wait, NX2NAVI_GATE_WAIT_MS): 54.5 fps and a longest frame of 33 ms in the same place, 58.6 fps with the recorder thread on. With a camera sweep the pictures went out 21.0 ms apart on average with a 99th percentile of 55 ms, against 25.4 and 64. A village went from 48.6 to 53.7 fps and a graveyard from 56.5 to 64.2. 900 consecutive frames of a still scene show no dark or changed frame, with the recorder thread and without. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
Draft notes for the release after 0.7.1. The version number is not decided yet.
Faster
- AMD cards: about a fifth more frames in open areas, and more even frame times. The game asks the video card
which objects are visible, about a hundred questions a frame in Hyrule Field, and waits for a frame to be finished
on the card before it lets the next one start. The answers were fetched one call at a time, on the thread that also
reports "finished", and on AMD's Windows driver each of those calls goes into the kernel: every frame was reported
finished about 4 ms late, with every thread of the game waiting. They are now fetched a few hundred at a time.
Standing in Hyrule Field on an RX 7900 XT (driver 26.10.1, 3440x1440, FSR): 53 fps instead of 45, and the longest
frame of a minute 46 ms instead of 55 (
oq_batch = 0innx2navi.inibrings the old readback back). - No more frames drawn one present late. The game signals from the CPU when a frame's data is written, and its
render thread submits the frame's commands without waiting for that signal. When the signal came a millisecond or
two after the submit call, in about every other frame in Hyrule Field, the frame was set aside and drawn at its
present, and frames of 23 and 15 ms took turns. The submit call now waits for the signal, 10 ms at most
(
gate_wait_ms): 54.5 fps instead of 53 in the same place and the longest frame 33 ms instead of 46; withvk_recorder = 1, which AMD cards do not have on by default, 58.6 fps.
Fixed
- Black and white blocks on AMD RX 5000 and RX 6000 cards: on Navi and on Link next to her, on bright floors near her,
and on the bright outdoors seen through a door or window from inside a house. Every float colour a shader writes is
checked for NaN, so that one bad pixel cannot spread through the blur and bloom passes; those checks, and the
game's own NaN tests in nearly nine of ten shaders, are float comparisons that a shader compiler may decide can
never be true. The Windows driver for these cards uses AMD's older shader compiler (the log reads "AMD proprietary
shader compiler"); with it each NaN test is now made on the bits of the number instead, which no compiler can drop.
It is on by default only with that driver (
vk_nan_bits); the first start after the update compiles the pipelines again. Untested on those cards before this release: please report whether the blocks are gone.