Reduce CPU frame-preparation allocations and shadow lock contention #850

Closed
github-bot wants to merge 1 commit from github-bot/gh-850 into main AGit
Owner

@⁠t90 on GitHub · 2026-11-28 07:43 UTC · original
t90:contribute/stutter-fixes → main · +606 −167 · 5 files · 1 commits · closed without merging

Draw submission allocates a temporary descriptor-heap vector, constant-buffer fill planning repeatedly builds temporary ranges, and independent title-shadow allocations hold the shared registration lock. These add CPU work and can serialize unrelated refreshes during streaming.

This change binds descriptor heaps from stack storage, plans constant-buffer fills with fewer temporary collections, batches small refresh jobs and their accounting, and performs independent shadow allocations outside the shared table lock. Allocation publication revalidates the live registration, and existing placed-read ordering guards remain intact.

Validation:

  • Used in a combined RTX 5070 build where @⁠t90 reported stutter was seriously less prominent. This was not a controlled comparison and does not establish the gain from an individual optimization.
  • Regression coverage exercises descriptor ordering, fill planning, refresh merging, pending-allocation concurrency, registration replacement, and allocation retry.
  • 15 focused tests passed (descriptor bindings, fill planning, grouped refresh work, and pending shadow allocations); one existing isolated-process test was ignored. Asset policy:295 files passed.

This PR excludes newer early command-list recycling and texture-readback reuse experiments, lighting workarounds, typed-half changes, and local launch settings.

Local check detail: both workspace Clippy configurations (--all-targets, with and without --all-features) pass with command-line allowances for three lint classes already failing in unchanged upstream code: manual_is_multiple_of (descriptor.rs and shadow.rs), let_and_return (shader emit tests), and some_filter (gameinput.rs). No lint allowances were added to source or CI. Strict upstream CI can still report those existing failures. The complete workspace test suite was not run locally; the listed focused correctness tests were run on this isolated branch.

**@⁠t90** on GitHub · 2026-11-28 07:43 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/850) `t90:contribute/stutter-fixes` → `main` · +606 −167 · 5 files · 1 commits · closed without merging Draw submission allocates a temporary descriptor-heap vector, constant-buffer fill planning repeatedly builds temporary ranges, and independent title-shadow allocations hold the shared registration lock. These add CPU work and can serialize unrelated refreshes during streaming. This change binds descriptor heaps from stack storage, plans constant-buffer fills with fewer temporary collections, batches small refresh jobs and their accounting, and performs independent shadow allocations outside the shared table lock. Allocation publication revalidates the live registration, and existing placed-read ordering guards remain intact. Validation: - Used in a combined RTX 5070 build where @⁠t90 reported stutter was seriously less prominent. This was not a controlled comparison and does not establish the gain from an individual optimization. - Regression coverage exercises descriptor ordering, fill planning, refresh merging, pending-allocation concurrency, registration replacement, and allocation retry. - 15 focused tests passed (descriptor bindings, fill planning, grouped refresh work, and pending shadow allocations); one existing isolated-process test was ignored. Asset policy:295 files passed. This PR excludes newer early command-list recycling and texture-readback reuse experiments, lighting workarounds, typed-half changes, and local launch settings. Local check detail: both workspace Clippy configurations (--all-targets, with and without --all-features) pass with command-line allowances for three lint classes already failing in unchanged upstream code: manual_is_multiple_of (descriptor.rs and shadow.rs), let_and_return (shader emit tests), and some_filter (gameinput.rs). No lint allowances were added to source or CI. Strict upstream CI can still report those existing failures. The complete workspace test suite was not run locally; the listed focused correctness tests were run on this isolated branch.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 14:29:01 +00:00
github-bot closed this pull request 2026-11-28 19:25:04 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-28 19:23 UTC · original

Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.

**@⁠trustno1-coder** on GitHub · 2026-11-28 19:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/850#issuecomment-7244504474) Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!850
No description provided.