mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 22:19:57 -04:00
Raise the frame rate: fewer copies into the VRAM mirrors, earlier GPU starts, render target images reused.
From the local fixes package (fix 11), measured in Kokiri Forest at 4K on an RTX 4090 over PCIe 3.0: 40.5 to 62.6 fps native and 45.6 to 74.9 fps with DLSS Quality, the mirror copies from 6.5 to 0.3 ms of GPU time a frame. - Pages a VRAM mirror wrote back into guest memory are not copied up into it again: the mirror sync reads page stamps of their own that a mirror's write-back leaves alone (vk_gpu_written_back, decided at record time by vk_mem_mirrored). This replaces the lookup table NX2NAVI_WB_NO_REUP had, keeps its name, and is now on by default. - The game's flushes of mirrored memory are not copied where the write watch covers the region, as every page the game wrote there is stamped already (47-57 MiB a frame); NX2NAVI_FLUSH_UPLOAD=1 copies them as before. - Written storage ranges up to NX2NAVI_WB_MERGE_MAX (now 32 MiB) are merged in 4 MiB pieces, so a range is no longer bound to what one dispatch covers; the snapshot pool keeps its budget-scaled size with 128 slots. - A submission's first part goes to the GPU at the first pass boundary while the GPU is idle (split_idle), long passes are split too (split_in_pass), and the part's time limit reads the clock less often. - A render target that needs an image of its own takes the image of a released one with the same parameters, released two or more frames before (tex_reuse); memory requirements are kept per parameter set; a released entry another descriptor's entry replaced at its address is kept and taken back. - The memory check reads a page's write-watch bit and stamp under the lock that keeps them together. - The launcher reads the gamepad only while its own window is in front, and does not start a second copy of the game. - make_game.py says why a Python package did not load, not only that it is missing. The fix's per-pass GPU timing is left out: NX2NAVI_GPU_PASSES does the same in main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -133,6 +133,9 @@
|
||||
# With astc = gpu: 1 stages a texture's ASTC blocks in the shared staging ranges instead of a buffer of their own
|
||||
# (0 = a buffer each; off until a play test measures it).
|
||||
# astc_arena = 0
|
||||
# A render target that needs an image of its own takes the image of a released one of the same size and format
|
||||
# instead of making a new one (0 = always a new image).
|
||||
# tex_reuse = 1
|
||||
# Host zstd decoder in place of the game's (0 = the game's), and a check that decodes every call both ways and logs
|
||||
# the differences (1 = on; slow).
|
||||
# zstd_native = 1
|
||||
@@ -164,8 +167,14 @@
|
||||
# dyn_delta = 1
|
||||
# Submit GPU work in parts every N draws between passes so the GPU starts earlier (0 to 1000; 0 = off), each part at
|
||||
# least split_us microseconds long (0 to 20000).
|
||||
# Submit GPU work in parts every N draws so the GPU starts earlier (0 to 1000; 0 = off), each part at least split_us
|
||||
# microseconds long (0 to 20000). split_in_pass = 1 also splits inside a long pass (it ends there and begins again in the
|
||||
# next part); 0 splits between passes only. split_idle = 1 sends a submission's first part at the first pass boundary
|
||||
# while the GPU has nothing else to run.
|
||||
# split_draws = 64
|
||||
# split_us = 1000
|
||||
# split_in_pass = 1
|
||||
# split_idle = 1
|
||||
|
||||
# Vulkan.
|
||||
# Vulkan validation layer: checks every call and slows the game down a lot. Needs the layer installed (Vulkan SDK).
|
||||
@@ -511,11 +520,15 @@
|
||||
# the next refresh and show their stand-in until then. Lower spreads streaming over more frames (smaller hitches, a
|
||||
# frame or two of pop-in); higher loads sooner.
|
||||
# pool_create_budget = 16
|
||||
# Written storage-buffer ranges up to this size in MiB (1 to 16) go back to game memory as a merge: copied within video
|
||||
# memory and only the words that changed written over PCIe. Larger ones are copied back whole at the end of every
|
||||
# submission. Raising it from 4 to 16 took a 5.5 MiB range off the plain copies (about 46 MiB a frame in the field).
|
||||
# wb_merge_max = 16
|
||||
# 1: pages of a VRAM-mirrored pool that the GPU wrote and copied back to game memory are not copied up to the mirror
|
||||
# again for that write, which already holds them (a write by the game still is). Outdoors this removed about 57 MiB of
|
||||
# copies a frame. Default: 0.
|
||||
# wb_no_reup = 0
|
||||
# Written storage-buffer ranges up to this size in MiB (1 to 256) go back to game memory as a merge, in 4 MiB pieces:
|
||||
# copied within video memory and only the words that changed written over PCIe. Larger ones are copied back whole at
|
||||
# the end of every submission. Raising it from 4 to 16 took a 5.5 MiB range off the plain copies (about 46 MiB a frame
|
||||
# in the field), and 32 the 4-15 MiB ranges of Kokiri Forest.
|
||||
# wb_merge_max = 32
|
||||
# 1: pages a VRAM mirror wrote back to game memory are not copied up into it again, as it already holds them (a write by
|
||||
# the game still is). Outdoors this removed about 57 MiB of copies a frame. 0: they are copied up again.
|
||||
# wb_no_reup = 1
|
||||
# 1: the game's flushes of mirrored memory are copied into the mirrors even where the write watch already sees every
|
||||
# page the game wrote; 0 (default) copies only the written pages there, which saved 47-57 MiB of copies a frame in
|
||||
# Kokiri Forest.
|
||||
# flush_upload = 0
|
||||
|
||||
Reference in New Issue
Block a user