perf(gpu): optimize card_steps planner, batched fill-to lookup, sorted writer search #1279
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!1279
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1279"
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?
@qlfu on GitHub · 2026-11-28 16:52 UTC · original
qlfu:pr/card-steps-perf→main· +208 −124 · 1 files · 1 commits · openSummary
Reduces submitting-thread CPU overhead in
crates/victory-gpu/src/host/card_steps.rs(planning steps done on the card):plan()when noDoes::Copyexists:has_copy/has_placedandtaken_countduring the initial scan so submissions with onlyDoes::Fillskip redundant copy/placement overlap passes.Box<dyn Iterator>heap allocations during level assignment.FillTolookups perHostList:collect_fill_tos(), gathering eachHostList's fill targets in a single pass.writerssearch + fast barrier deduplication + empty-slot skip:writerssorted and usespartition_pointinholder()instead of linear scanning.AddressHash.each_underthread-pool dispatch whenslot_ops == 0.Benchmark (GTA VI, 90s steady gameplay, 1440p Series X, DLSS Quality, Ryzen 7 5700X + RTX 4070 Ti 12 GB)
Paired A/B on
main(9ce3cf9) with-FrameGen:main(9ce3cf9)pr/card-steps-perf(674d1c5)15.6516.3016.0617.10p90)21.3(19.2)27.3(20.7)prep/copy back)63.95 ms(46.95/18.4)61.45 ms(45.55/17.7)ASYNC_SUBMITworked61.1 ms58.9 mspresent-wait19.7 ms16.1 msWARN/ERRORcount0/00/0Verification
cargo clippy -p victory-gpu --all-targets --lockedand--all-features --locked: 0 warnings/errors incard_steps.rs.cargo test -p victory-gpu --lib --locked -- --test-threads=1 --quiet: 455 passed, 0 failed, 36 ignored.cargo build --release --locked -p victory: exit0.@Aniseto on GitHub · 2026-11-28 19:39 UTC · original
Ran the full victory-gpu library suite at
674d1c5on an NVIDIA Blackwell desktop part with an updated driver.System
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5Results
VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib --locked -- --test-threads=1 --quiet: 455 passed, 0 failed, 36 ignored.What this adds
The count matches the author's run. This covers the faster card-step planner, batched FillTo lookup and sorted writer search. The PR has no comments yet, so this is the first datapoint in the thread and the first from an RTX 5070 Ti on driver 32.0.16.2140. It is a correctness run, not a CPU-time measurement.
Not tested
A retail title, CPU-time or FPS A/B, a paired smoke run, the whole workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the commands above on this machine and wrote this report; no game data was used.
674d1c5a0ftoda94a8e9ef@meonline42 on GitHub · 2026-11-29 09:18 UTC · original
Measurements from a Zen 3 + Ampere machine, in case they're useful (stacked builds, so most PRs aren't isolated, see below).
Machine: Ryzen 9 5900X (thermally limited: ~3.7 GHz average, Tctl 80-87 °C), RTX 3090 at 350 W, 64 GB DDR4-3200, Windows 11. Series X profile, 1080p rendered to 1440p, DLSS Performance, FSR 3 frame generation 2x.
Base:
mainate1f2eb6, plus a local keyboard-input patch (victory-hle only, nothing in the GPU path).Method: each build was started unattended from the same save, standing still, and measured for 150 s once the world was drawn. The scene isn't identical between runs (traffic and time of day differ), so I also bucketed the 5-second
victory_gpu::hostlines by draws per frame.maine1f2eb6VICTORY_PRESENT_QUEUE=1VICTORY_SPANS_QUICK=1, so its default flip made no difference in this run.preparing: copies of 24-28 ms for 60-70 MB per frame, and the card busy only a few ms. Copy-back dropped from ~13 ms to ~6.5 ms between923e38cande1f2eb6.Posted by Claude Code on behalf of the machine's owner.
da94a8e9efto6fcaa51f66@dyshay on GitHub · 2026-11-29 15:40 UTC · original
Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch
janus-prs). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with--profile diag --features diagnostics, and the CPU tests of the touched crates pass. Runs on an RTX 4090 are queued (Series X 1440p, and Series S with ray tracing, DLSS Quality). Frame times will follow here.@DoubleD17 on GitHub · 2026-11-30 07:58 UTC · original · edited 2026-11-30 09:57 UTC
We ran a test of this PR on current main (
41adb551with this PR merged), on a CPU-bound machine.We compare only the seconds where the idle camera shows the same lighter views (about 7,500 draws a frame). Its heavier view (about 15,000 draws, half the frame rate) takes 10 to 60 s of each 150 s run, and it moved whole-run means by several ms.
No difference we can measure. The five main runs of the session agreed within 1.3 ms on these seconds. But we also ran main again, built in another folder, eight times: it ranged from 57.5 to 65.5 ms. Its first four runs were 2.4 ms slower than main on average, and the last four 4.2 ms faster. All nine PRs we tested in this session came out 0.4 to 3.9 ms slower than main, and fps moved with it. So we read the difference as a newly built executable, not as this PR.
Picture: 0 defects in 160 frames.
Setup:
41adb551(only its own commits on top), against41adb551itself;Picture check: a burst of 10 captures a second at the end of each run (80 frames), looked at frame by frame.
AI Assisted
@Cooperos on GitHub · 2026-11-30 09:39 UTC · original
I tested this changes on the same CPU (Ryzen 7 5700X), 8 GB RTX 3070 Ti,
driver 610.88, Series S profile, 1440p scene 1280x720, DLSS quality, frame
generation off, same save and overlapping routes:
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.