VICTORY_WC_BAR=1 ignores VICTORY_WC_NO_BACK_MIN_KB: small write-combined results go stale (dark lighting, ~1,450 draws a frame missing) #355
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#355
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@MJ26gaming on GitHub · 2026-11-27 21:20 UTC · original
VICTORY_WC_BAR=1(from50c15a1) gives every write-combined title buffer a single GPU-upload (BAR) copy whose shader writes are never landed. It does this regardless ofVICTORY_WC_NO_BACK_MIN_KB, the cutoff that2f81d0cadded because small write-combined results the title reads back (exposure and similar) went stale.Where:
wc_bar()incrates/victory-gpu/src/shadow.rs(mainatca9c75c, line 2204) takes no length, and thelookupsite uses it before the normal shadow allocation. Thegpu_writesearly return (self.mapped && !self.window) then skipsStep::GpuWritefor those copies, whilewc_no_backchecksself.len >= wc_no_back_min().Measured: Linux, GE-Proton 11-14, vkd3d-proton master
71cae09, RX 9070 XT, Series S profile, one saved checkpoint (opening cutscene, then the cell), 5-minute runs, withVICTORY_WC_NO_BACK=1 VICTORY_WC_NO_BACK_MIN_KB=1024in all three rows.With the BAR path as on
main, 4,272 of 4,348 BAR allocations in the run were under 1 MiB (4,162 under 64 KiB). In captures of the cell, most of the room's fill light is gone and a poster fades (frame RMSE 0.15–0.18 against 0.02–0.06 between ordinary runs). The title issues about 1,450 fewer draws a frame, while pipeline drops (253) and indirect drops (594) are unchanged, which fits stale visibility or lighting results. With the fix, draws and the picture match the run without BAR, and the submit thread still saves about 3 ms overWC_NO_BACKalone.Fix (attached as a patch, applies to
mainwith offsets):wc_bar(len)honours the write-back cutoff.VICTORY_WC_BAR=1places only copies withlen >= MIN_KBin the BAR, and smaller ones keep the two-sided path and its write-back.VICTORY_WC_BAR=2keeps the old unrestricted policy for comparison. A unit test (bar_obeys_write_back_policy_unless_legacy_mode_is_selected) covers the policy, and the write-combined and card-steps tests pass under Wine.Untested on Windows and on NVIDIA. The 30 fps figures are the title's own frame cap.
Found and fixed with AI assistance (Codex for the investigation and patch, Claude Code for review and testing).
@cloph-dsp on GitHub · 2026-11-27 23:00 UTC · original
Vou implementar a correcao descrita nesta issue (wc_bar(len) honrar o cutoff de write-back; modo 2 mantem politica antiga) com teste sintetico em crates/victory-gpu/src/shadow.rs. AI-assisted (Hy4 flash), sem dados de jogo.
@cloph-dsp on GitHub · 2026-11-27 23:16 UTC · original
Implementado e aberto em #481 (branch cloph-dsp:fix/wc-bar-writeback-cutoff, commit
35252c8). wc_bar(len) honra o cutoff de write-back no modo 1; modo 2 mantem a politica antiga; teste sintetico shadow::write_combined_tests::bar_obeys_write_back_policy_unless_legacy_mode_is_selected passa (2/2 no modulo), diff --check limpo. Windows/Rust 1.100.0/MSVC, cargo test --locked, CARGO_TARGET_DIR proprio, AI-assisted (Hy4 flash), sem dados de jogo.@trustno1-coder on GitHub · 2026-11-28 00:43 UTC · original
Thanks @MJ26gaming and @cloph-dsp, noted. Pull requests are on hold for the moment. I'll look at #481 when I get back to them.
@trustno1-coder on GitHub · 2026-11-29 15:51 UTC · original
Closing this since there's been no reply for over a day. If it still happens on the latest release, comment here with the log and it will be reopened.