The opening movies stutter: a quarter to a third of their pictures are skipped (RTX 3090, Linux) #73
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
needs measurements
question
testing wanted
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#73
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
The opening movies of a new game play with visible stutter: the picture jumps, because many of the movie's pictures are skipped to keep up with the sound. A second tester has reproduced it.
One session, measured
RTX 3090, NVIDIA 620.70.06, Linux, 2048x1152 window, default options, frame rate cap 60. A build of main at
4dd972a8(before the rename) with #40 on top; nothing in #40 touches video, and no shader work happened in the session (0 pipelines compiled, 0 draws left out, 0 pipeline waits). A new game from the title, the intro left to play.What the log says about the two movies (both AV1, 1920x1080, decoded by libdav1d):
So decoding is not the cost: a picture takes 0.7 to 2.0 ms and one is due every 16.7 ms. The pictures are skipped because the frames that show them are late.
The frames, from the frame trace (22,288 frames in the session):
video: the first buffer went out before the first picture was decoded (shown black).Not known
HOS_CHAIN(the frame's critical path across threads) during a movie would name it.Claimed. First step: name what the late frames wait for during the movies (a critical-path recording with
HOS_CHAINwhile a movie plays, and a read of the video path: how pictures are handed to the presenter and why they are skipped to keep up with the sound). Findings will be posted here before any fix.First read of the same session, with corrections to the issue text. Nothing new was run; this is from the log, the frame trace and the code.
Corrections
The two movies behave differently
Likely causes, not confirmed
vcores:lines show 0.3 to 0.4 s of waiting for a core per 5 s in every smooth stretch and 6 to 40 s per 5 s in every slow block, with single waits of 100 to 800 ms against 3 to 5 ms. The first block is when the scene behind the movie loads (3,438 shader programs created in the movie's first 20 s). Against: it is a correlation so far; the log does not say who held the cores, and it could be a lock the loaders hold.host/nn_video.c(pictures more than 25 ms behind the wall clock since the first hand-out are dropped) against the movie library's own pacing. Mechanism not known yet.Next: a run with
HOS_VIDEO_LOG=1for the skips, and a critical-path recording in the second movie's first block for the core waits.