perf(gpu): scope title write invalidations, trim submit steps, and speed up texture refresh #3109
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by qlfu on 2026-11-29T20:03:31Z.
Summary
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%).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by qlfu on 2026-11-30T00:12:42Z.
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.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DoubleD17 on 2026-11-30T07:58:18Z.
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
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.