GPU: retain Deferred container capacities across HostList::reset #185

Open
MartinIndra02 wants to merge 1 commit from upstream-pr/185 into main
MartinIndra02 commented 2026-11-24 22:19:11 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MartinIndra02 on 2026-11-24T22:19:11Z.


Summary

In \HostList::reset\ (\crates/victory-gpu/src/host.rs), replacing *self.deferred() = Deferred::default()\ with \self.deferred().clear()\ clears all recorded entries and updates the \ALIVE[6..8]\ upload counters in place while preserving the heap capacities of \copies, \uploads, \kept,
efreshed, \ extures, \writes, and \acks.

Previously, every command-list reset freed all 7 \Vec/\HashSet\ allocations inside \Deferred, forcing recording threads to grow and reallocate them from zero capacity on every frame.

Verification

  • \cargo test -p victory-gpu --lib -- --test-threads=1: 110 passed, 0 failed, 1 ignored.
  • \cargo clippy -p victory-gpu --all-targets -- -D warnings\ (default and --features diagnostics): 0 warnings.
  • \cargo xtask policy: 169 files ok.

AI-assisted contribution (authored and verified with an AI coding assistant).

<!-- greyfinch-sync:fxceless/victory-fork:issue:6592543468 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/185). Originally posted by [MartinIndra02](https://github.com/MartinIndra02) on 2026-11-24T22:19:11Z. --- ### Summary In \HostList::reset\ (\crates/victory-gpu/src/host.rs\), replacing \*self.deferred() = Deferred::default()\ with \self.deferred().clear()\ clears all recorded entries and updates the \ALIVE[6..8]\ upload counters in place while preserving the heap capacities of \copies\, \uploads\, \kept\, \ efreshed\, \ extures\, \writes\, and \acks\. Previously, every command-list reset freed all 7 \Vec\/\HashSet\ allocations inside \Deferred\, forcing recording threads to grow and reallocate them from zero capacity on every frame. ### Verification - \cargo test -p victory-gpu --lib -- --test-threads=1\: **110 passed, 0 failed, 1 ignored**. - \cargo clippy -p victory-gpu --all-targets -- -D warnings\ (default and \--features diagnostics\): **0 warnings**. - \cargo xtask policy\: **169 files ok**. *AI-assisted contribution (authored and verified with an AI coding assistant).*
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/185:upstream-pr/185'
git switch 'upstream-pr/185'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/185'
git switch 'upstream-pr/185'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/185'
git switch 'upstream-pr/185'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/185'
git switch 'main'
git merge --squash 'upstream-pr/185'
git switch 'main'
git merge --ff-only 'upstream-pr/185'
git switch 'main'
git merge 'upstream-pr/185'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!185
No description provided.