Buffers made ahead sixteen at a time, with one residency call and one wait #682
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/682"
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 0xkn0wh3r3 on 2026-11-28T03:32:43Z.
Stacked on #630. Its commits come first on this branch. New here: the last two commits,
Buffers made ahead sixteen at a time, with one residency call and one waitandBuffers made together: a bench.Why
Every title buffer gets a 64 KiB copy in the PC's memory (and, with card copies, one on the card), and a scene's first frame asks for thousands of them. The thread that makes them ahead (
crate::ahead) made them one at a time: a committed resource, aMakeResident, and a mapping copy waited for, each. At a scene start the title took buffers faster than the store refilled, and the rest were made by the threads a frame waits for.What
Host::shared_buffers_now(size, n)andHost::uav_buffers(size, n)makenbuffers together, with oneMakeResidentcall for all of them and one mapping copy.shared_buffer_nowanduav_bufferare the same withn = 1, so nothing else changes.VICTORY_AHEAD_BATCH;1: one at a time, as before), and pauses 50 ms if the host refuses, instead of asking again at once.Before / after
bench_buffers_made_one_at_a_time_or_together(--ignored --nocapture), 256 buffers of 64 KiB, RTX card, three runs. Time per buffer:VICTORY_BENCH_AHEAD_KB=65536)Correctness
buffers_made_together_are_whole_and_their_own: 16 shared and 16 card buffers made together are as many as were asked for, don't overlap in the card's address space, each have their own CPU mapping (each written and read back), and the debug layer reports nothing (VICTORY_D3D12_DEBUG=1, diagnostics build).-D warnings, andcargo test --workspace --locked, all pass.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.