victory-gpu: WC BAR honours the write-back cutoff (VICTORY_WC_BAR=1; =2 legacy) (#355) #481
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!481
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-481"
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?
@cloph-dsp on GitHub · 2026-11-27 23:16 UTC · original
cloph-dsp:fix/wc-bar-writeback-cutoff→main· +36 −7 · 1 files · 1 commits · merged 2026-11-29 08:17 UTCDepends on: #355
VICTORY_WC_BAR=1gave every write-combined title buffer a single GPU-upload (BAR) copy whose shader writes were never landed, regardless ofVICTORY_WC_NO_BACK_MIN_KB. Small shader results the title reads back (exposure and similar) went stale; the issue reports ~1,450 fewer draws a frame in the cell.Change (1 file, +36/-7,
crates/victory-gpu/src/shadow.rs):wc_bar(len)now takes the copy length and honours the write-back cutoff: mode1places only copies withlen >= VICTORY_WC_NO_BACK_MIN_KBin the BAR; smaller ones keep the two-sided path and its write-back.VICTORY_WC_BAR=2keeps the original unrestricted policy for comparison.wc_no_backcondition reuses a sharedwc_no_back_cutoff()helper.shadow::write_combined_tests::bar_obeys_write_back_policy_unless_legacy_mode_is_selectedcovers all mode/cutoff/length combinations.Validation (Windows, Rust 1.100.0/MSVC, Scoop rust-msvc,
cargo test --locked, worktree-localCARGO_TARGET_DIR, synthetic inputs only):cargo test --locked -p victory-gpu --lib -- shadow::write_combined_tests --test-threads=1 --quiet→ 2 passed, 0 failed (new test + existingwrite_combined_regions).git grepon basedf2daafconfirms the new test name is absent (negative control).git diff --checkclean.Only the named tests were replayed; full workspace suite and clippy not run locally (no rustup/clippy component). GPU/driver N/A (pure policy function, CPU-only tests). AI-assisted (Hy4 flash). No game data, assets, extracted shaders, DRM or decrypt.
VICTORY_WC_BAR=1ignoresVICTORY_WC_NO_BACK_MIN_KB: small write-combined results go stale (dark lighting, ~1,450 draws a frame missing) #355@MJ26gaming on GitHub · 2026-11-27 23:42 UTC · original
Thanks! Checked the diff: it's identical to the patch from #355, test included. I've been running exactly this on AMD (RX 9070 XT, Proton/vkd3d-proton, Series S): picture correct, 29.94 / 29.90 fps over a 10-minute run with
VICTORY_WC_NO_BACK=1 VICTORY_WC_NO_BACK_MIN_KB=1024 VICTORY_WC_BAR=1.One note for reviewers: with
VICTORY_WC_BAR=1andVICTORY_WC_NO_BACKunset, there's no cutoff, so no BAR copies are made at all. Mode 1 now effectively needsWC_NO_BACK=1. That's intended (BAR copies never write back), but users who setWC_BAR=1alone should use=2for the old behaviour.VICTORY_WC_BAR=1ignoresVICTORY_WC_NO_BACK_MIN_KB: small write-combined results go stale (dark lighting, ~1,450 draws a frame missing) #355@KelvinSilvaDev on GitHub · 2026-11-28 15:55 UTC · original
Independent confirmation on Windows + NVIDIA Ampere, native D3D12 (RTX 3090 24 GB, Resizable BAR on, driver 621.40, Ryzen 7 7700), Series S profile, DLSS Performance, FSR 3 frame generation 2x,
VICTORY_WC_NO_BACK=1 VICTORY_WC_NO_BACK_MIN_KB=1024from the launcher defaults.Same fixed save (a long boat cutscene), 6-minute release runs, frame-rate cap off, screenshots taken at the same offsets after the menu Enter:
WC_BARoffWC_BAR=1WC_BAR=1So on this card the PR keeps a real part of the gain (about 5 ms of the submitting thread and about 7% of the frame in a GPU-bound scene) without the stale results. One residue we saw: in some frames a thin row of dotted pixels just under the picture, in the bottom letterbox, which does not appear with
WC_BARoff. Happy to test a follow-up for that.Numbers are from the runtime's own frame-rate lines. Measured with the help of an AI assistant (Claude).