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

Open
github-bot wants to merge 1 commit from github-bot/gh-185 into main AGit
Owner

@⁠MartinIndra02 on GitHub · 2026-11-24 22:19 UTC · original
MartinIndra02:perf/fxceless-deferred-clear → main · +18 −1 · 1 files · 1 commits · open

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).

**@⁠MartinIndra02** on GitHub · 2026-11-24 22:19 UTC · [original](https://github.com/fxceless/victory-fork/pull/185) `MartinIndra02:perf/fxceless-deferred-clear` → `main` · +18 −1 · 1 files · 1 commits · open ### 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).*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:37:46 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host.rs
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.
git fetch -u origin '+refs/pull/185/head:github-bot/gh-185'
git switch 'github-bot/gh-185'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-185'
git switch 'github-bot/gh-185'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-185'
git switch 'github-bot/gh-185'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-185'
git switch 'main'
git merge --squash 'github-bot/gh-185'
git switch 'main'
git merge --ff-only 'github-bot/gh-185'
git switch 'main'
git merge 'github-bot/gh-185'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.