Bake: settle the flights in the air before a decoration bake reads title memory (VICTORY_BAKE_SETTLE) #1912
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!1912
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1912"
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?
@erquier on GitHub · 2026-11-29 02:21 UTC · original
erquier:pr/bake-settle→main· +18 −0 · 1 files · 1 commits · merged 2026-11-30 14:12 UTCProblem
With
VICTORY_PLACED_READSandVICTORY_PLACED_ORDERa submission no longerwaits for the flights in the air. The pass before a decoration bake
(
bake_sources) reads the title's constants and records on the CPU, and thoseflights may still be writing that memory. Seen on our runs (RTX 5070 12 GB /
Ryzen 5800X / 32 GB RAM, 2026-11-28): skin with colour noise like TV static at
night. Together with
VICTORY_BAKE_ROOMand a look again at painted textures(a separate change, see below), black faces in the prologue cutscenes went from
frequent to rare, and bake reads that touched memory still in flight were 0 in
25 dumps. (That measure is of the three changes together; this one is the
smallest of them.)
What changes
Before the bake's CPU reads,
settle_for_fence()is called once per bake draw,as the other CPU readers of title memory in
draw.rsdo. It is one wait onflights already in the air, taken on the thread that draws the bake.
Switch and default
VICTORY_BAKE_SETTLE, on by default;VICTORY_BAKE_SETTLE=0leaves thesettle out, as before.
How it was tested
cargo test --release -p victory-gpu --lib -- --test-threads=4: 589 passed,0 failed, 44 ignored.
unit tested only.
Risks
The settle waits for the flights in the air, so a bake draw can cost a short
wait when several are in flight; bake draws are a few per frame at most in the
cutscenes where it matters. Off with
VICTORY_BAKE_SETTLE=0.Left out of this PR
VICTORY_RECHECK_PAINTED(keep looking at textures found changed withnothing to tell of it): the same mechanism is already in open PR #1573
(
VICTORY_PAINTED_EVERY, with the start addresses kept and an F1 menu entry),so it is not repeated here.
RECHECK_FRAMES: upstream'sRECHECK_FRAMESis still[4, 12, 40, 120, 400], so there is nothing tokeep.
🤖 Generated with Claude Code
@Dukestar69 on GitHub · 2026-11-29 03:34 UTC · original · approved these changes
Tested locally merged onto
main(568c5e5).crates/victory-gpu/src/draw.rs.cargo test -p victory-gpu --lib bakepassed (8 passed; 0 failed).cargo test -p victory-gpu --lib draw::passed (16 passed; 0 failed; 2 ignored).draw.rs.Clean opt-in
VICTORY_BAKE_SETTLEsynchronization guard before decoration bakes read title memory. LGTM.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).