mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 09:39:58 -04:00
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>
19 KiB
19 KiB