GPU: guard non-positive frame counts and test copystat #2069
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!2069
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2069/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?
@fuzeofficlal on GitHub · 2026-11-25 04:20 UTC · original
fuzeofficlal:fix/gpu-copystat-frames-guard-919→main· +315 −144 · 1 files · 1 commits · closed without mergingCloses #919.
Summary
framesinputs incopystat::logto1.0so per-frame averages never formatNaNorinfwhile still draining counters, snapshots, and copy-range maps.parse_modefor deterministicVICTORY_COPY_MODEunit testing.Testing
crates/victory-gpu/src/copystat.rsverifying counter array length alignment,parse_mode, range/snapshot accumulation and draining,NaN/inf-free log formatting across0.0,-3.0,NAN, and±INFINITY, and process memory queries.cargo test -p victory-gpu --features diagnostics --locked copystat,cargo clippy, andcargo xtask policy.@jeremygold02 on GitHub · 2026-11-25 04:25 UTC · original
Triage verdict — Keep the diagnostic guard, isolate the global-state regression (
98dd74f)Evidence
mainand checks the formatted output rather than treating a floating-point divide as a panic. The older PR closed without merging. Current guard · Prior maintainer feedbackChecks and limits
Next step
This verification was AI-assisted.
@upipibi on GitHub · 2026-11-25 04:41 UTC · original
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
98dd74f.cargo test -p victory-gpu --locked: 141 passed, 2 failed, 2 ignored. The 2 are #1744's heap-cap failures onmain. The new tests aren't in this run, becausecopystatiscfg(all(windows, feature = "diagnostics")).--features diagnostics -- copystat: 4 passed (counter_enum_matches_array_length,parse_mode_maps_known_and_unknown_values,process_memory_queries_succeed,range_and_snapshot_accumulate_and_log_guards_invalid_frames).Same as
mainon this hardware. Not run: a title.AI-assisted (Claude Code).
@fuzeofficlal on GitHub · 2026-11-25 05:00 UTC · original
Updated in
9fe73dfe— thanks @jeremygold02. Encapsulated counter/range/snapshot state inStatsso unit tests exercise an isolatedStats::new()instance without racing concurrentdiagnosticsproducers on the process-wideSTATSsingleton.@Marvisak on GitHub · 2026-11-25 10:25 UTC · original
Automated triage for the maintainers.
Proposed close: the guard is for a case that can't happen, and the rest is a refactor of a diagnostics-only module.
copystat::loghas one caller, in theframe()function ofvictory-gpu/src/host.rs. That function incrementscopy_stats_framesjust before it callslog, soframesis always at least 1. The same guard was the reason #1188 was closed.Statsstruct and add tests of the log formatting, all for a module that only builds with--features diagnostics. No behaviour changes.A bug in what
copystatmeasures would change this verdict. The PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the label.Generated by Claude Code
@fuzeofficlal on GitHub · 2026-11-25 10:46 UTC · original
Agreed with the triage analysis —
host.rs::frame()incrementscopy_stats_framesimmediately before callingcopystat::log, soframes == 0cannot occur onmain. Closing to keep the review queue focused.Pull request closed