Repository navigation
GPU: pool HostList upload buffers across resets - #2017
lizapropanol wants to merge 1 commit into
Conversation
|
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at AI-assisted (Claude Code). |
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
HostList upload buffers pooled across resets — allocation reuse; check pool growth bounds on long sessions.
|
Triage verdict — Choose one upload pool; verify retention and GPU lifetime ( Evidence
Checks and limits
Next step
This verification was AI-assisted. |
Xvania7
left a comment
There was a problem hiding this comment.
Verified locally merged onto main (940d32f, Windows 10 x64, NVIDIA GeForce RTX 5060, Rust MSVC):
cargo test -p victory-gpu --lib -- --test-threads=1 host::tests::— all 8host::tests::*tests passed (includinglist_upload_reuses_buffers_after_reset_and_skips_pooling_oversizedandupload_pool_reuses_smallest_fit_and_enforces_caps); the 1 unrelated failure in that filter wasdescriptor::host::tests::dynamic_slots_are_held_until_released(#1835, NVIDIA 1M descriptor heap cap).cargo clippy -p victory-gpu --all-targets -- -D warnings— 0 warningscargo xtask policy— ok (182 files ok)
Synthetic tests only; no game data.
|
Automated triage for the maintainers. Proposed close. This pools the mapped upload buffers handed out by Proposed for close as a duplicate of #1894; it will be closed in 48 hours unless the author pushes a change (for example, measurements showing the per-list design is better, or porting the cap and oversized-allocation tests onto #1894) or a maintainer removes the label. CI: passing ( Generated by Claude Code |
Reuse D3D12 staging upload buffers on
HostListacross resets instead of creating and mapping a new committed buffer for everyHostList::uploadcall (CopyTextureRegion/CopyTextureRegionX).Summary
UploadPool/UploadBufferonHostListincrates/victory-gpu/src/host.rsand return in-use buffers to the free list inHostList::reset.FIRST_UPLOAD_BUFFER) up to 4 MiB (MAX_POOLED_UPLOAD), selecting the smallest free buffer that fits and capping retained pool memory at 32 MiB (MAX_UPLOAD_POOL_BYTES) per list.deferred().uploadsso they drop on reset as before.upload_pool_reuses_smallest_fit_and_enforces_capsandlist_upload_reuses_buffers_after_reset_and_skips_pooling_oversized.Verification
cargo clippy --workspace --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test --workspace --lockedcargo xtask policy