Preserve budget charges for fallback windows #4145
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!4145
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4145"
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?
@john-9474 on GitHub · 2026-11-30 16:44 UTC · original
john-9474:codex/window-fallback-charge→main· +233 −63 · 4 files · 1 commits · closed without mergingWhat it changes
With
VICTORY_WINDOWS_OWN=1, a window whose second side falls back to system memory takes no device-local budget reservation. Dropping it nevertheless subtracts its size fromCARD_BYTES[0]; failing its private CPU-mirror allocation subtracts fromWINDOW_CARD_BYTES. A 64 KiB fallback can therefore wrap an unrelated zero counter to18446744073709486080.This carries the allocator's actual counter and byte reservation in a non-copyable
Charge, through second-side allocation intoCard. A failed mirror releases that reservation with the allocated side. Window fallbacks carry no charge; ordinaryCARD_ALLfallback keeps its existing charge. Device-local windows, late promotion and arena sides retain their original counters. Allocation order, admission limits and placement policy stay the same.Includes five production charge-helper tests and three ignored native allocation/drop fixtures, plus the existing file-backing fixture's constructor update.
How it was tested
CARD_BYTES[0]from zero to18446744073709486080, with both shared and private mirrors. Injected mirror failure wrapsWINDOW_CARD_BYTESby the same amount.CARD_ALLsuccess/drop/rollback accounting in both mirror modes.Chargetests pass standalone and in the integrated test binary.c71899d9. Both diagnostic test builds include the complete existing-test repair from #4018 equally as a separate local prerequisite; it is excluded from this PR.7d93ee07. Compared with the original84bd61e2contribution, only upstream's unusedrangedhelper removal differs; the charge implementation and all authored fixtures are byte-identical. The native evidence above remains scoped to the original c718 paired builds, not a new-main native run.7d93ee07: all five productionChargeCPU tests pass again.cargo check --locked --jobs 2 -p victory-gpu --liband strictcargo clippy --locked --jobs 2 -p victory-gpu --all-targets -- -D warningsboth pass with default features and with--features diagnostics. These focused checks do not execute the ignored native fixtures.cargo run --locked --quiet --jobs 2 -p xtask -- policy --stagedpasses for all four files;git diff --cached --checkpasses and Cargo.lock is unchanged.Historical CI on original head
3c47d211failed on three unchanged baseline Clippy findings, matching clean 84bd CI. Upstream #4297 has since addressed them; the refreshed focused strict checks above pass without authored suppressions. New remote workspace CI is separate from these local results.The native fixtures submit no GPU commands and use no title data. Diagnostics and error-drain assertions were enabled, but actual InfoQueue availability was not asserted, so this is not a claim of clean D3D12 validation. No gameplay/FPS improvement is claimed;
WINDOWS_OWNwas off in our gameplay benchmarks.Checked for overlap
WINDOWS_OWN,CARD_BYTES, window charges, fallback rollback and reservation counters, and inspected related source changes. The original audit found no matching active repair; the refresh now records the material overlap with #4243 below.on_cardprovenance, bundled with admission-line, twin-size and ordinaryCARD_ALLaccounting changes. This existing PR keeps the narrower actual-reservation ownership fix and its paired native drop/rollback tests; the broader policy changes remain separate. Neither feature is in refreshed main.3c47d21165tob0267a96db@trustno1-coder on GitHub · 2026-12-01 18:46 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed