GPU diagnostics: keep pipeline drop reasons until they are reported #2108
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2110"
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?
Imported from Marvisak/VIctory. Originally posted by AwsAli05 on 2026-11-25T05:10:56Z.
Problem
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.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T05:18:14Z.
Review: APPROVED
Verified locally merged onto
origin/main(940d32f, Windows 11 x64, Rust 1.98.1 MSVC):cargo clippy -p victory-gpu --all-targets— 0 warningscargo xtask policy— ok (183 files ok)Clean fix retaining pipeline drop reasons until they are actually reported instead of clearing them early. Looks good.
AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T05:48:55Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Pipeline drop reasons kept until read — diagnostics lifetime fix; good for debugging the capability-gating cluster.
Imported from Marvisak/VIctory. Originally posted by Dathinel on 2026-11-25T05:21:51Z.
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.Imported from Marvisak/VIctory. Originally posted by fiestorra on 2026-11-25T06:13:00Z.
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.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T10:41:30Z.
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