GPU: pool HostList upload buffers across resets #2017
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2017
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2017"
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?
@lizapropanol on GitHub · 2026-11-25 03:10 UTC · original
lizapropanol:perf/pool-list-upload-buffers→main· +171 −5 · 1 files · 1 commits · openReuse 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@upipibi on GitHub · 2026-11-25 03:20 UTC · original
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
0f4fd8c.victory-gpu: 143 passed, 2 failed, 2 ignored; the newupload_pool_reuses_smallest_fit_and_enforces_capsandlist_upload_reuses_buffers_after_reset_and_skips_pooling_oversizedpass. The 2 are #1744's NVIDIA failures onmain(dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_views, the heap-cap ones). Same asmainon this hardware. Not run: a title.AI-assisted (Claude Code).
@jeremygold02 on GitHub · 2026-11-25 03:34 UTC · original
Triage verdict — Choose one upload pool; verify retention and GPU lifetime (
0f4fd8c)Evidence
Checks and limits
Next step
This verification was AI-assisted.
@Marvisak on GitHub · 2026-11-25 09:17 UTC · original
Automated triage for the maintainers.
Proposed close.
This pools the mapped upload buffers handed out by
HostList::upload(crates/victory-gpu/src/host.rs), which is theshortcut:note on that function. The same change is already open as #1894 (host-wide pool, returned inHostList::reset, capped at 64 buffers / 64 MiB in total), which merges cleanly and was triaged as a merge candidate earlier; #982 is a third take on it. The reuse here is safe for the same reason as there (resetruns only after the list's submissions finished), but the design is weaker on one point: the 32 MiB cap is perHostList, and buffers stay retained for the list's whole life, so a title with many long-lived command lists can keep far more upload memory than #1894's single shared cap allows. There is also no measurement showing upload creation cost in a session.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 (
check).Generated by Claude Code
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.