GPU: bound raw descriptor synchronization to the host mirror #2956

Open
github-bot wants to merge 2 commits from github-bot/gh-2956 into main AGit
Owner

@⁠ghptc on GitHub · 2026-11-29 19:01 UTC · original
ghptc:perf/bound-capped-descriptor-sync-20261129 → main · +63 −2 · 1 files · 2 commits · open

A capped shader-visible descriptor heap can have more title slots than host mirrors. The raw-write synchronization pass previously asked for dirty pages across the whole title heap, queued work for pages beyond the cap, and, on the kernel reader, copied those pages before clipping the visible records.

Bound the raw-write query to the last page containing a mirrored slot. Clip the work ranges to the final mirrored byte for both raw and hooked writes. Taking the full boundary page lets this reader acknowledge its writes. Other consumers keep their own change history, and hook tracking still rearms the full allocation.

A Windows/Proton CPU control exercised production write tracking and descriptor comparison with two independent readers. It included writes on both sides of the cap, another write to the final mirrored slot, tail-only writes, and an uncapped heap. Four ABBA arms for each reader mode produced identical visible slots and software-rendered RGB at 28 distinct camera positions in the dense case.

With 7,000 procedural draws and 144 mirrored plus 100 tail pages dirty per step, the in-place scan median went from 0.249 to 0.207 ms, P95 from 0.302 to 0.281 ms, and the median number of work ranges from 246 to 146. For the dense mapped-view case the in-place scan went from 0.402 to 0.363 ms. The kernel-reader dense case was essentially flat at the median and had a higher P95. The tail-only case queued zero comparison ranges. These durations cover scan and comparison. End-to-end gameplay and the D3D12 descriptor creation stage were outside the benchmark.

The focused regression allocates private write-watched memory, checks that a second observer still sees writes on both sides of the cap, and confirms that a subsequent change at the boundary reaches the capped reader.

**@⁠ghptc** on GitHub · 2026-11-29 19:01 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2956) `ghptc:perf/bound-capped-descriptor-sync-20261129` → `main` · +63 −2 · 1 files · 2 commits · open A capped shader-visible descriptor heap can have more title slots than host mirrors. The raw-write synchronization pass previously asked for dirty pages across the whole title heap, queued work for pages beyond the cap, and, on the kernel reader, copied those pages before clipping the visible records. Bound the raw-write query to the last page containing a mirrored slot. Clip the work ranges to the final mirrored byte for both raw and hooked writes. Taking the full boundary page lets this reader acknowledge its writes. Other consumers keep their own change history, and hook tracking still rearms the full allocation. A Windows/Proton CPU control exercised production write tracking and descriptor comparison with two independent readers. It included writes on both sides of the cap, another write to the final mirrored slot, tail-only writes, and an uncapped heap. Four ABBA arms for each reader mode produced identical visible slots and software-rendered RGB at 28 distinct camera positions in the dense case. With 7,000 procedural draws and 144 mirrored plus 100 tail pages dirty per step, the in-place scan median went from 0.249 to 0.207 ms, P95 from 0.302 to 0.281 ms, and the median number of work ranges from 246 to 146. For the dense mapped-view case the in-place scan went from 0.402 to 0.363 ms. The kernel-reader dense case was essentially flat at the median and had a higher P95. The tail-only case queued zero comparison ranges. These durations cover scan and comparison. End-to-end gameplay and the D3D12 descriptor creation stage were outside the benchmark. The focused regression allocates private write-watched memory, checks that a second observer still sees writes on both sides of the cap, and confirms that a subsequent change at the boundary reaches the capped reader.
(cherry picked from commit 3d80405b9f39d5e3b3580b64bec8c519e4d3926a)
(cherry picked from commit c656340916068fa35b9b06af6552dafaf199a1e1)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 19:02:42 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2956/head:github-bot/gh-2956'
git switch 'github-bot/gh-2956'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2956'
git switch 'github-bot/gh-2956'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2956'
git switch 'github-bot/gh-2956'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2956'
git switch 'main'
git merge --squash 'github-bot/gh-2956'
git switch 'main'
git merge --ff-only 'github-bot/gh-2956'
git switch 'main'
git merge 'github-bot/gh-2956'
git push origin 'main'
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!2956
No description provided.