Count why the idle sweep keeps loose windows (#3646) #3825
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3825
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3825"
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?
@xiepeixuan on GitHub · 2026-11-30 08:26 UTC · original
xiepeixuan:auto/3646→main· +81 −4 · 2 files · 3 commits · closed without mergingPart of #3646
What it changes
The idle sweep already decides why a loose window must stay, but the predicate on main only returns yes or no. In a diagnostics build, set
VICTORY_LOG=info,victory_gpu::shadow=debugto get one line per nonempty sweep, after the table lock is released:other_owner: the table is not the only owner of theArc.recent: the window did not meet the sweep's actual time and frame requirements.buffer_held,staging_held: another reference to the host buffer or its shared staging buffer kept the entry.eligible: entries the unchanged sweep removed.These are entries, classified by the first failed check, not bytes or independent totals. A window failing two checks is counted once. The change does not diagnose the cause of the reported crash, change the eviction policy, or introduce a cap.
How it was tested
loose_sweep_counts_only_the_first_failed_checkfirst. It checks every one of the 16 combinations of the four gates, the exact order of the checks that ran, and which entry is eligible. Counts: 8 other owners, 4 recent, 2 host-buffer refs, 1 staging ref, 1 eligible. On an otherwise identical scratch copy with only the counter increment disabled, the test compiled and failed with[0, 0, 0, 0]instead of[8, 4, 2, 1](exit 101); the exact draft passed (exit 0). Windows test and negative controlcargo check --workspace --locked: passed on pristine41adb551and draft03b16eae. The fork CI explicitly checked out and verified those two source SHAs; the validation workflow is not in this PR.Unfiltered Windows
victory-gpulibrary results (passed / failed / ignored); both full crate runs also executed the available integration and doc tests:The diagnostics replay integration test also passed on both. Every draft failure reproduced on the same main in the same feature configuration. The default draft failed only the translator-switch cache-key test; main also failed the card-steps test. Both diagnostics runs failed those two plus the BGRX-view and timeline-waits tests. Unfiltered fork CI
cargo testpassed for the crate it touches: yes with the verified baseline exclusions; no unfiltered. Using identical exclusions on both commits, the default library passed 920 → 920 (2 filtered) and the diagnostics library passed 991 → 992 (4 filtered). Zero failures in all four jobs. Baseline-filtered Windows CIUpstream CI stops before tests at the same
victory-loaderClippy error on plain main and this draft:unwind_copyis never used.Checked for overlap
shadow.rs,let_go_idle,LOOSE, the reference and age checks, and related diagnostics. Checked #1138: the shadow-copy work in #318, #1094 and #1157 concerns refresh costs, not this sweep. The issue had no assignee, comments or linked work before the draft claim.Uses audit:
host::sweepis the only production caller ofshadow::let_go_idleand still calls it at the same point. The only production use ofLooseSweep::eligibleis the original filter: same four checks, same order and thresholds, same short circuit, same keys removed. No extra clock or COM reference query. DerivedDefaultinitializes one local accumulator per sweep (also used by the unit test). The newfirst_holdfield is incremented only at the first rejection and read only by the debug line and the test; it does not exist without the diagnostics feature. The new test has no production callers. No statics, switches, or other call sites changed.Diagnostic requested by Zendothony in #3646. This is not a ported patch.
Opened as a draft early so others know this is being worked on (README: 'Opening a draft pull request early works too').
AI-assisted (Codex). Not run in the game.
@dyshay on GitHub · 2026-11-30 08:55 UTC · original
Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch
janus-prs). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with--profile diag --features diagnostics, and the CPU tests of the touched code pass. A run on an RTX 4090 is queued. Frame times will follow here.Pull request closed