mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 17:59: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:
@@ -90,9 +90,17 @@
|
||||
# Draws whose pipeline is still building: default waits on a reserved worker; draw is the previous scheduling.
|
||||
# pipe_wait = default
|
||||
# Which draws are dropped instead of waiting for their pipeline: strict (only draws into per-frame passes), any (also
|
||||
# draws into passes whose target a recent frame rendered; full-screen draws wait, up to 50 ms a frame) or fullscreen
|
||||
# draws into passes whose target a recent frame rendered; full-screen draws wait, from pipe_frame_wait_ms) or fullscreen
|
||||
# (those and full-screen draws: no wait, but a lighting or fog pass that is dropped shows as a black or unlit frame).
|
||||
# pipe_skip = any
|
||||
# How many milliseconds one frame may wait, in all, for the shaders and pipelines of its full-screen draws and of
|
||||
# draws into pictures drawn for the first time (0 to 500). What is not ready by then is left out of that frame and
|
||||
# built in the background.
|
||||
# pipe_frame_wait_ms = 50
|
||||
# A picture the game has drawn in many frames counts as drawn every frame after a pause too (a loading screen, a
|
||||
# menu), so the first frame of an area leaves a draw out while its pipeline is built instead of stopping for it.
|
||||
# 0: as up to 0.7.1, such a frame waits for each new pipeline in turn.
|
||||
# pipe_skip_steady = 1
|
||||
# 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
|
||||
@@ -112,13 +120,12 @@
|
||||
# NVIDIA under Windows, Shader Cache Size Unlimited in the NVIDIA app), start once with force, or delete
|
||||
# shader-warm.txt, to warm again.
|
||||
# lib_warm = 1
|
||||
# How long (ms) a draw into a target no recent frame rendered waits for a pipeline built for the first time,
|
||||
# then is skipped. The default waits, as such a target (a lookup table, a new area's target) can stay empty if
|
||||
# skipped; a lower value caps the stall.
|
||||
# Draws into a picture drawn for the first time (a lookup table, a new area's target) wait for a pipeline built for
|
||||
# the first time from pipe_frame_wait_ms; one left over is drawn the next frame its picture is drawn. 0: as up to
|
||||
# 0.7.1, each such draw waits up to oneshot_wait_ms milliseconds, which stops the game for as long as the pipelines
|
||||
# of a new area take to build.
|
||||
# oneshot_budget = 1
|
||||
# oneshot_wait_ms = 30000
|
||||
# 1: those draws share a wait budget per presented frame instead (100 ms for large passes, 300 ms for small ones); a
|
||||
# draw left over is drawn the next frame its target is drawn. Shortens the long first frame of a new area.
|
||||
# oneshot_budget = 0
|
||||
# Build shader stage libraries in the background ahead of time, and the threads for it (1 to 16; default 2). More
|
||||
# threads mostly wait on the graphics driver's lock: 16 on NVIDIA spent about 8 cores spinning in the driver.
|
||||
# lib_prebuild = 1
|
||||
|
||||
Reference in New Issue
Block a user