mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 18:09:58 -04:00
A draw that misses its pipeline has the rest of its submission read ahead, and the stage libraries of the pipelines the later draws need are queued at once.
The next draw with a new pipeline was only found when the replay reached it, so the draws of an area's first frame, or of a turn that brings several new materials into view, paid for their pipelines one after another while the workers that could have built them together sat idle. The submission is recorded before it is replayed: the first draw of a submission that finds a shader or pipeline missing now has the ops after it read (vk_exec.c vk_exec_ahead) with the binds that decide a draw's shaders and shader libraries applied to a copy of the replay state. Each draw there looks its shaders up as the real draw will, which also queues a shader that is not in memory, and names its state to vk_pipeline_hint, which queues the pre-rasterization and fragment shader libraries that are missing. No pipeline is entered and no key recorded, so a wrong guess costs two libraries at most. The draw's own lookup then links on its thread when both libraries are there. On a first visit to Kokiri Forest a scan read 6,900 ops in 0.78 ms on average (the longest 5.5 ms; a scan ends after 3 ms), and the scans of the load and the walk named 377 states without a pipeline and queued 104 libraries for them. pipe_ahead = 0 (NX2NAVI_PIPE_AHEAD) turns it off. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -96,6 +96,10 @@
|
||||
# How many milliseconds the draws of one frame may wait, in all, for a missing pipeline to be linked from the shader
|
||||
# libraries in the graphics driver's cache before they are dropped (0 to 100; 0: dropped at once, as before).
|
||||
# pipe_link_ms = 6
|
||||
# When a draw finds its pipeline missing, the rest of the commands the game submitted with it are read ahead and the
|
||||
# shader libraries of every other pipeline they will need are built at once on background threads, so the later draws
|
||||
# find theirs ready instead of waiting one after another or being left out of a frame. 0: off, as before.
|
||||
# pipe_ahead = 1
|
||||
# A pipeline whose fragment shader reads the picture it draws into (soft particles, water, some full-screen passes) is
|
||||
# linked from the shader libraries like any other. 0: as before, such a draw waits for the whole compile.
|
||||
# gpl_feedback = 1
|
||||
|
||||
Reference in New Issue
Block a user