GPU diagnostics: keep pipeline drop reasons until they are reported #2110
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2110
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2110/head"
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?
@AwsAli05 on GitHub · 2026-11-25 05:10 UTC · original
AwsAli05:diagnostics/keep-drop-counts→main· +18 −24 · 1 files · 2 commits · merged 2026-11-25 21:54 UTCProblem
The frame meter drains the per-reason counts every time it updates the one-second window caption. It prints those reasons only in the five-second diagnostics report, so drops during the intervening updates can disappear from that report. This can obscure pipelines that fail only during the first few seconds of world entry.
Change
Drain the per-reason counts when the diagnostics report is emitted. Divide by the number of frames in that interval, which is already recorded for the other diagnostics. The one-second caption and headline FPS sample still use their original interval.
Verification
AI-assisted.
@Dathinel on GitHub · 2026-11-25 05:21 UTC · original
I checked the emitted diagnostic lines on the parent (
940d32f6) and this head (26eef9ba) with the same four-frame fixture. I injected six drops taggedearlybefore frame 1 and two taggedlatebefore frame 4. I advanced the meter's clock thresholds so frame 2 updated the caption and frame 4 emitted the report.A second, one-frame reporting interval with one new drop emitted only the new reason at 1.0/frame on both revisions. This checks retention, the four-frame denominator and reset using the actual
Meter::framelogging path. The counts were synthetic; no rendering or performance measurement was involved. AI-assisted.@fiestorra on GitHub · 2026-11-25 06:13 UTC · original
Right fix, and the same bug is still in the five lines above it
The change does what it says:
take_drops()now drains where the reasons are printed, so a count survives the one-second caption updates in between, and the divisor becomes the interval's own frame count instead of the caption's. Two details I checked because they would have been easy to get wrong:diagnostic_framesis incremented before the one-second early return, so it counts every present of the interval, not the last second's — that is what makes the divisor right;What I would add, and it is in the same
ifblock, five lines up. The report prints these, and all of them are drained every second and divided by the one-secondframes:So the 5-second report's headline —
dropped {dropped:.0} without a host pipeline (… being made) and {indirect:.0} indirect— is a one-second number inside a five-second report, which is the same defect this pull request fixes for the per-reason lines directly below it. A pipeline that fails only in the first second of world entry still gets flattened to "0/frame" in the report, which is the case the description says it cares about.The fix is the same shape as yours: drain those inside the report block too, and divide them by
diagnostic_frames. The caption can keep its one-second window; the two consumers just stop sharing a counter that resets at different rates — which is the general form of the bug, and worth saying in the description so the next reader does not re-introduce it by adding another per-interval count to the caption path.On verification: I built the GPU crate with
--features diagnostics(clean), but I could not produce a boot here that shows the report changing — on this machine the title removes the device at frame 64 onmain(the format-115 texture), so there are no five seconds of presenting after entry, and before entry there are no pipeline drops worth counting. That half of your verification needs a machine that reaches the world; mine is not one today.No game data is involved: code and counts.
Written with an AI assistant.
@Marvisak on GitHub · 2026-11-25 10:41 UTC · original · edited 2026-11-25 16:17 UTC
Automated triage for the maintainers.
Merge candidate. In
host.rsMeter::frame, the five-second report used to drain and divide some counters every second, using that second'sframes. These were the dropped, indirect and root-view counts, the per-reason pipeline drops,ALIAS_COPIESand twin copies, and read-backs. The report therefore showed one-second numbers, or lost the counts entirely. After this PR they are drained only inside the report block and divided byreport_frames, which counts every present since the last report. That covers the follow-up raised in the thread as well. I checked that the window caption uses none of these counters, so it keeps its one-second fps/ms/draws. No other code drains them:draw.rsonlyloadsALIAS_COPIES.report_framesis at least 1 whenever the report runs. CI (check) is passing on this head, and the PR merges cleanly.Generated by Claude Code