Card steps: serve constant fills behind placed copies from destination shadow (VICTORY_PLACED_FILLS) #740
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!740
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-740"
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?
@Czer0xx on GitHub · 2026-11-28 04:42 UTC · original
Czer0xx:pr/placed-fills→main· +227 −11 · 2 files · 1 commits · merged 2026-11-28 19:39 UTCSummary
Adds an opt-in switch
VICTORY_PLACED_FILLS=1(off by default, exposed in the F1 menu asCONSTANTS AFTER PLACED COPIES) incrates/victory-gpu/src/host/card_steps.rsandcrates/victory-gpu/src/host/menu.rs.When enabled, constant-buffer fills (
Step::Fillwith a dedicated descriptor slot) that stand behind a placed buffer copy (Step::Placed) and read only bytes written by that copy are pointed directly at the placed copy's destination host shadow on the GPU instead of refusing the submission or copying bytes through the front-of-submission scratch buffer.With
VICTORY_PLACED_FILLSunset, behaviour is unchanged (includingVICTORY_PLACED_READS=1).Where the bytes are and why this differs from
VICTORY_PLACED_READS=1placed.shadow.bufferbyHostList::place_copy, followed bywait_for_all(crates/victory-gpu/src/host/place.rs).VICTORY_PLACED_FILLS=1adds zero GPU buffer copies:show_placedvalidates 256-byte CBV alignment, buffer bounds, and that the placed copy is not waiting on flights (!matches!(placed.waits(written), Waits::Yes)), then points the fill's dedicated descriptor slot straight atplaced.shadow.buffer.Does::Read, an untakenDoes::Copy/Does::Fill, or a laterDoes::Placedreading fromdst),served_fillsrefuses to serve from that copy so title-memory coherency is preserved.VICTORY_PLACED_READS=1on63b902f: in A/B testing,VICTORY_PLACED_READS=1still refused0.40submissions/frame (waiting for flightsmedian15.8 ms, peaks33-47 ms) witha step other than a fill done on the card reads what a copy at its place writes(PLACED_READER), becauseplaced_read_on_cpuchecks all steps indoes(including steps ahead of the placed copy and fills handled on the card).VICTORY_PLACED_FILLS=1avoids those false refusals and dropsBEHIND_PLACED/PLACED_READERrefusals to0.00/frame.Relation to existing open PRs
Checked existing open PRs before opening this one:
#34(perf(gpu): snapshot placed-copy constants on GPU and enable VICTORY_PLACED_ORDER): copies constants into a per-listDEFAULTbuffer during list recording and enablesVICTORY_PLACED_ORDERby default; predatesVICTORY_PLACED_READS.#295(perf(gpu): plan dependent GPU fills behind placed copies...): currently has merge conflicts againstmain(63b902f), bundles two ports, and does not include in-game A/B numbers.This PR stays strictly opt-in behind
VICTORY_PLACED_FILLS=1, performs no extra GPU copy, applies cleanly on63b902falongsideVICTORY_PLACED_READS=1, and is measured directly againstVICTORY_PLACED_READS=1.Measured results (in-game A/B on
63b902f)Hardware: Windows 11, NVIDIA GeForce RTX 3060 12 GB, Series X profile, 2560x1440, DLSS Performance,
releasebuild, same opening cutscenes through the prison room (up to ~7,150 draws/frame), pipeline cache warmed before both runs.VICTORY_PLACED_READS=1(main63b902f)VICTORY_PLACED_FILLS=1(this PR)waiting for flightsmedian (mean)card_stepssubmissions refused/frame median (max)PLACED_READER/BEHIND_PLACEDrefusalsPLACED_READER)preparingmedian (mean)on the GPUwaitVisual check: no corruption or regressions observed across the full opening stretch.
Verification
cargo clippy -p victory-gpu --all-targets --lockedand--all-features --locked: 0 warnings in modified files (card_steps.rs,menu.rs).cargo test -p victory-gpu --lib --locked: 454 passed, 0 failed, 36 ignored (including new unit testhost::card_steps::tests::fills_behind_a_copy_at_its_place_are_shown_its_bytesand existinga_fill_behind_a_copy_at_its_place_reads_where_the_copy_does).cargo xtask policy:asset policy: 294 files ok.cargo build --release --locked -p victoryand verified in-game againstVICTORY_PLACED_READS=1on the same build.@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-28 04:42 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
@Dukestar69 on GitHub · 2026-11-28 05:15 UTC · original · approved these changes
LGTM — verified on Windows (RTX 5090):
cargo test -p victory-gpu --lib card_steps::passed (10/10, includingfills_behind_a_copy_at_its_place_are_shown_its_bytes)cargo test -p victory-gpu --lib host::menu::passed (7/7)cargo xtask policypassed (294 files ok)Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@Yoshi-233 on GitHub · 2026-11-28 08:29 UTC · original
I tested
VICTORY_PLACED_FILLS=0/1on an RTX 4070 Ti SUPER (16 GB, Windows driver 617.42), with the same executable, checkpoint and cache. This was the only launch-setting change. Four screenshots per run verify the same overhead view of the swimmer and vegetation for 36 seconds. Here are the window medians after allowing the camera to settle:The destination-shadow path was exercised: 7 of 29 service reports in the enabled window were nonzero, reaching 0.32 served fills per frame. In the three longer route windows the log reported a wait for an upload-memory fill with the placed-copy dependency reason in 3, 13 and 14 reporting intervals with the option off, and in zero intervals with it on. Some of those longer windows faced different shores, so the FPS comparison above uses only the matched overhead view.
This confirms the change in the reported waits on this card. The scene’s median frame time moved by 0.25 ms with a small draw-count difference; it gives me no measurable throughput gain to claim here.
@grosterr on GitHub · 2026-11-28 12:19 UTC · original
One run here suggests
VICTORY_PLACED_FILLS=1may break the skin of faces, but I have not run it on its own yet, so take this as a lead, not a result.RTX 3060 12 GB (driver 621.40), Ryzen 7 5700X, 32 GB, Windows 11. Main
63b902fwith open PRs on top (among them #501, #635, #641, #799, #807, #857, #875), Series S, 1920x1080, DLSS Quality (preset K), FSR 3 frame generation 2x. Shader cache warmed, no misses.VICTORY_PLACED_FILLS=1+VICTORY_NARROW_BARRIERS=1VICTORY_NARROW_BARRIERS=1alone(Run 1 and one of the runs 2 also had the water program
5dc3b25986622949left out, for #739; it is not drawn in that cutscene.) So the face changed only whenVICTORY_PLACED_FILLS=1was added. #799 turns the picture white on this build (I posted that under #799), so run 1 is not a clean test of this switch. A run withVICTORY_PLACED_FILLS=1alone is next; I will add the result here.The log showed
fills behind a copy at its place shown that copy's bytes on the card, per frame (VICTORY_PLACED_FILLS=1)at about 3.3 a frame, and nothing new among the warnings.AI-assisted (Claude Code): the runs were judged by eye on my PC, and Claude wrote this text. No game files attached.
🤖 Generated with Claude Code
@grosterr on GitHub · 2026-11-28 12:25 UTC · original
The run with
VICTORY_PLACED_FILLS=1alone, same build, settings and route: the face in the first cutscene is normal, the cutscene-to-gameplay fade into the boat scene is normal, and nothing else looked wrong. So the magenta skin from my earlier comment came withVICTORY_NARROW_BARRIERS=1on as well, not from this switch by itself. Sorry for the false alarm.Cutscene with this switch: 40.1 ms a frame (
GPU BUSY39.3). One run, so I make no claim about speed.🤖 Generated with Claude Code
@nick0451 on GitHub · 2026-11-28 17:24 UTC · original
A smoke test only: the scene barely reaches this path.
RTX 3090 24 GB (driver 610.88), i9-14900K, 32 GB, Windows 11. A release build of this PR merged onto main at
63b902f. Series S, DLSS Performance, frame generation off. Every run used the same frozen save, outdoors on a balcony by the water (about 5,900 draws a frame), standing still. One warm-up start per build, then main and four PR builds were run in turn, three rounds each. Each run is 40 s to settle, 60 s measured, then a screenshot. An A/A run of main against itself in this setup differs by 2-3%.VICTORY_PLACED_FILLS=1: the log linefills behind a copy at its place shown that copy's bytes on the cardreads 0.00 a frame in most lines and 0.12 in some. So in this scene the path is reached rarely, and this says little about the gain.ERRORline.cargo test -p victory-gpu --lib: 454 passed.So nothing broke where it is idle. A real test needs a scene with many placed copies; I'll add one if I get a save there.
Tested with an AI assistant (Claude Code); results are from this PC.
@Czer0xx on GitHub · 2026-11-28 17:30 UTC · original
Thanks everyone (@Dukestar69, @Yoshi-233, @grosterr, @nick0451) for testing and verifying across RTX 3060, 3090, 4070 Ti SUPER, and 5090.
Summarizing where things stand from the independent runs:
cargo xtask policypassing). Thanks @grosterr for quickly isolating the magenta-skin artifact to the combination with #799 (that barrier issue is being tracked and fixed separately in #799).card_stepsrefusals behind placed copies (for example in the opening cutscenes and the heavy interior / prison room, where @grosterr saw ~3.3 served fills/frame and the A/B run droppedwaiting for flightsmedian from 15.8 ms to 0.1 ms). In static outdoor/overhead scenes with 0.00-0.32 served fills/frame that are already GPU-bound, matching baseline FPS with zero overhead is expected.The PR remains cleanly mergeable with no changes needed on this side, and is ready for maintainer CI approval and review.