perf(gpu): scope title write invalidations, trim submit steps, and speed up texture refresh #3109
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!3109
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3109"
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-29 20:03 UTC · original
qlfu:pr/perf-submit-steps-and-texture-refresh→main· +508 −110 · 6 files · 1 commits · closed without mergingSummary
Cuts CPU overhead in per-submission step execution (
steps_oth,HostList::run_deferred,HostList::prelude) and texture refresh checks:Batch::invalidate_written: evicts onlyaheadandtexturesentries overlapping[dst, dst + len)(and physical-page alias blocks viawatch::wrote_and_elsewhere/elsewhere_blocks) instead of clearing the entireahead/texturesmaps on everyStep::Copy/Step::Placed.Step::Hostsplit fromStep::Run: host-only bookkeeping callbacks no longer flushbatch.fill(), invalidateahead/textures, or terminateask_once. Also measuresStep::Copy/Step::Placedtiming afterbatch.fill()/batch.flush()so batched fill/flush work is not double-counted inSPLIT[7](copies_fills).Taken::has_list, batchedport::bounds_snapshot/note_filled_batch, lazyair&place::forwardsgated onany_placed, cachedHostList::cmd_list, lock trims inHostList::prelude(has_detiles,has_twins,alias_rt::on()), fusedrefresh_frontwalk,Batch::last_ahead1-entry cache.PreludeUpload::finish_refresh(uploaded && !dirty),Staging::watch_kind+ lock-freewatch::guarded_clean_since(PageEpochs::all_at_most),all_therechecked under_mapped, and AVX2 128-byte-stripetexture::digest.Verification
cargo +1.98.1-x86_64-pc-windows-msvc clippy -p victory-gpu --lib --tests --no-deps --locked: 0 new warnings.cargo +1.98.1-x86_64-pc-windows-msvc test -p victory-gpu --lib --locked -- --test-threads=1(texture::,host::,watch::):288/288passed.0 WARNs / 0 ERRORs):steps_oth:7.35 -> 4.40 ms(-2.95 ms/frame,-40.1%, Native) /6.50 -> 4.75 ms(FG).copies_fills:3.85 -> 2.75 ms(-1.10 ms/frame,-28.6%).texture refreshes (all threads):11.4 -> 8.5 ms(-25.4%),tex_ask:1.9 -> 0.2 ms(-89.5%),flush_one:248–268 -> 3–9(-97%).d955b13cedto083b1d6279@qlfu on GitHub · 2026-11-30 00:12 UTC · original
Rebased cleanly onto
main(41adb551), integrating upstream#2795(watch::writes_since) withwatch_kindcaching +guarded_clean_sinceintexture.rs, and keeping#2604's lock-free!is_kept()fast path inwatch::wrote/wrote_and_elsewhere. Verifiedwatch::tests::(41 passed) and--features diagnostics.github-bot referenced this pull request2026-11-30 01:14:29 +00:00
@DoubleD17 on GitHub · 2026-11-30 07:58 UTC · original · edited 2026-11-30 09:56 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
Pull request closed