mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 09:19:58 -04:00
A frame no longer stops for the pipelines of an area's first frame: passes the game renders frame after frame stay per-frame through a loading screen, and the waits that remain share 50 ms a frame.
A draw whose pipeline is still building is skipped when its pass is rendered every frame and waits otherwise, so that a lookup table or a volume generated once is not left empty. "Every frame" meant "in the last four frames", so after a loading screen or a full-screen menu every pass of the first frame read as new: each draw with a new pipeline waited on the replay thread, up to 30 s each, and a mesh draw, whose pipeline has no fast link, for its whole compile. A player's 0.7.1 log shows it at three area changes: frames of 954, 1015 and 684 ms with 853, 960 and 663 ms of pipeline wait, six mesh draws waiting 52 to 660 ms in passes whose targets had been rendered in thousands of frames. The target history (now runtime/vk_target_frames.h) also counts the frames each target was rendered in, for as long as it is the same guest texture. From eight frames on its pass is per-frame however long ago the last one was, and its draws are skipped and built by the workers like any other (pipe_skip_steady, on by default). A target rendered for the first time still waits, now from one pool of 50 ms a presented frame that the full-screen draws share (pipe_frame_wait_ms; oneshot_budget = 0 gives the old wait back), a mesh draw 8 ms at most, and the wait for a one-shot draw's shader comes from the same pool (gfx_shader_await takes a limit). A full-screen draw with no picture left to hold waits 40 ms more instead of 500. One frame so waits under 100 ms for pipelines in all. Every 600 frames with a miss the log says how many draws found a shader or pipeline missing, how long they held the replay thread in all and in the worst frame, by the kind of wait, and how many were skipped at its end. tests/target_frames_check.py replays the area change of that log against the header. Not yet run in the game. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -131,7 +131,12 @@ keeps per-core data without locks and relies on that, so the host models it (`ru
|
||||
ring of Vulkan `{x, y, z}` records filled on the GPU.
|
||||
- Pipelines: `VK_EXT_graphics_pipeline_library` where the driver has it: stage libraries compiled ahead, a fast link
|
||||
at a new state, an optimised pipeline replacing it from a background thread. A draw whose pipeline is not ready is
|
||||
skipped when one of its pass's targets was rendered in the previous frame, and waits otherwise. Three things keep
|
||||
skipped when its pass is one the game renders frame after frame: one of its targets was rendered in the last few
|
||||
frames, or in eight frames or more at any time, which keeps the first frame after a loading screen from reading as
|
||||
all new (`runtime/vk_target_frames.h`). A draw into a target rendered for the first time, and a full-screen draw,
|
||||
wait instead, from one pool of 50 ms a presented frame (`pipe_frame_wait_ms`; `runtime/vk_exec_draw.c`
|
||||
`prepare_draw_ex`, `frame_wait`); what is not ready when the pool is spent is skipped and built on a worker, so no
|
||||
frame waits for pipelines much longer than that. Three things keep
|
||||
that short on a first visit (`runtime/vk_pipeline.c`): a pipeline whose fragment shader reads a target of its own
|
||||
pass is fast-linked like any other, the feedback loop flags being part of the fragment output library alone
|
||||
(`gpl_feedback`); the library workers also link the pipelines of skipped draws, so a burst of new materials is
|
||||
|
||||
@@ -322,6 +322,12 @@ A change to what the library warm logs when the driver's cache of stage librarie
|
||||
`runtime/vk_pipeline.c` `lw_main`) passes `python tests\warm_hint_check.py`, which builds the header alone and checks
|
||||
the added text by GPU vendor and by why the cache was cold. No game files.
|
||||
|
||||
A change to which render passes count as drawn frame after frame (`runtime/vk_target_frames.h`: a draw into one is
|
||||
skipped while its pipeline builds, a draw into any other waits) passes `python tests\target_frames_check.py`, which
|
||||
builds the header alone and replays an area change after a loading screen from a player's log: the scene, probe and
|
||||
half-resolution passes are per-frame again at once, a lookup table, a volume's slices and an icon capture still wait,
|
||||
and an image taken over by another texture starts without the history of the one before. No GPU, no game files.
|
||||
|
||||
The lifter (`recomp/`) and the CPU headers (`runtime/cpu.h`, `runtime/simd.h`) are checked against Unicorn. Every lifter
|
||||
change passes these, all run with `.venv`:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user