mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 15:19:58 -04:00
Land the shader and pipeline stutter pass, and the fixes it needed.
Large compute shaders that no cache holds are built on one background thread after the boot prebuild, smallest first, so their first dispatch no longer compiles them on the replay thread. NX2NAVI_BIG_BUILD_MAX_MB stops that builder once the process has grown by that much: on a 31 GB machine one of these shaders took the process up by 12.8 GB and the game stuttered while Windows paged. The builder takes the queue under its lock and copies each entry out before compiling it, so a shader queued meanwhile cannot free the arrays under it. The same change reports what pipeline-cache.bin gives back, and starts over when the file grows past NX2NAVI_PIPELINE_CACHE_MAX_MB. A tensor-core program is now tested before its shader is asked for, in both dispatch paths. It runs the stand-in while NX2NAVI_NATIVE_TENSOR is off, and translating it anyway recorded four AI-upscaler shaders of 0.87 to 4.4 million SPIR-V words that this game never dispatches natively. Process memory went from 29.3 GB to 24 GB and the multi-gigabyte builds during play are gone. The frame-time summary says which part a slow frame went to, and with NX2NAVI_REPLAY_TIME how the replay splits between draws, binds and transfers; NX2NAVI_SVC_SLOW_MS logs the kernel services that block, with the thread they blocked on. prof_report.py reads the map this build writes and adds the image base to a runtime Rip, so a profile resolves to function names instead of question marks. build_xlate.py applies the patches with GIT_CEILING_DIRECTORIES set to the build folder's parent. Inside a checkout git read 0021-prmt-byte-permute.patch's paths from the repository's top, skipped every file of it and still exited 0, so PRMT was missing from locally built translators and every byte permute was a no-op. A Skipped patch line now fails the build. The note in AmpereLowering.cs that said the translator emits nothing for PRMT is corrected.
This commit is contained in:
@@ -70,6 +70,19 @@
|
||||
# the CPU threads).
|
||||
# lib_prebuild = 1
|
||||
# lib_prebuild_threads = 4
|
||||
# 1: very large compute shaders that no cache holds are built on one background thread after the start. 0: each is
|
||||
# built when the game first uses it, which can hold that frame for a second or two.
|
||||
# lib_prebuild_big_bg = 1
|
||||
# The commit headroom in MB those background builds wait for (0: no check).
|
||||
# big_build_free_mb = 8192
|
||||
# How far those background builds may raise the process commit in MB before the rest wait for their first use instead
|
||||
# (0: no limit). Each large shader costs the driver 1-4 GB; on a 31 GB machine four of them took the process from 15 to
|
||||
# 29 GB and the game stuttered, so raise this only on a machine with room to spare.
|
||||
# big_build_max_mb = 4096
|
||||
# 1: the log says how many pipelines came from pipeline-cache.bin; 2 also logs every compute pipeline built. 0: off.
|
||||
# pipe_feedback = 1
|
||||
# pipeline-cache.bin larger than this (MB) starts empty and is rewritten (0: no limit).
|
||||
# pipeline_cache_max_mb = 512
|
||||
# Build known pipelines ahead of time.
|
||||
# pipe_prebuild = 1
|
||||
# 1: the start waits until every known pipeline is built. Default 0: with the graphics pipeline library the start
|
||||
@@ -411,3 +424,9 @@
|
||||
# names each dirty target that stays on the GPU ("fence write-back skipped-drawn-every-frame") and each one over 65536
|
||||
# bytes that went back ("over-default"). Raising it costs a copy per such target and wait.
|
||||
# wb_fence_limit = 65536
|
||||
# Log kernel services that block longer than this many ms, with the service number (0: off). A stalled frame shows up as
|
||||
# time in the replay; this says whether the guest was waiting in a service, and which one.
|
||||
# svc_slow_ms = 0
|
||||
# 1: the frame-time summary also splits the replay by op kind (draw, bind, transfer), which says where a stalled frame
|
||||
# went. The clock reads cost a fraction of a millisecond a frame, so it is off by default.
|
||||
# replay_time = 0
|
||||
|
||||
Reference in New Issue
Block a user