GPU: track changed buffer descriptor slots with reusable bitsets #1187

Open
UwUCammie wants to merge 2 commits from upstream-pr/1190 into main
UwUCammie commented 2026-11-25 23:18:09 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by UwUCammie on 2026-11-25T23:18:09Z.


The first-room heap pass inspects about 43,000 buffer slots per frame on my RX 7900 XT. Membership updates currently touch a B-tree and a hash set, and draining the changed set drops its allocation. The descriptor indices already fit within the heap. This keeps one bit per slot in each set, returns changed slots in ascending order, and retains the allocation across drains.

I ran all 19 descriptor-host tests under Wine 11.22. A native 9700X benchmark with 83,000 live descriptors and 43,000 writes per frame took 73.56 ms with the original sets and 2.53 ms with the bitsets over 16 frames (medians of eight alternating pairs). With only 16 writes per frame over 48 frames, the medians were 0.38 and 0.51 ms. The integration run in the first room averaged 9.04 FPS at 4,844 draws/frame, within the range of the controls.

Benchmark source and commands

<!-- greyfinch-sync:fxceless/victory-fork:issue:6615749289 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1190). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-25T23:18:09Z. --- The first-room heap pass inspects about 43,000 buffer slots per frame on my RX 7900 XT. Membership updates currently touch a B-tree and a hash set, and draining the changed set drops its allocation. The descriptor indices already fit within the heap. This keeps one bit per slot in each set, returns changed slots in ascending order, and retains the allocation across drains. I ran all 19 descriptor-host tests under Wine 11.22. A native 9700X benchmark with 83,000 live descriptors and 43,000 writes per frame took 73.56 ms with the original sets and 2.53 ms with the bitsets over 16 frames (medians of eight alternating pairs). With only 16 writes per frame over 48 frames, the medians were 0.38 and 0.51 ms. The integration run in the first room averaged 9.04 FPS at 4,844 draws/frame, within the range of the controls. [Benchmark source and commands](https://github.com/UwUCammie/victory-amd/tree/bench/first-room-radv/benchmarks#descriptor-slot-bookkeeping)
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/1190:upstream-pr/1190'
git switch 'upstream-pr/1190'

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/1190'
git switch 'upstream-pr/1190'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1190'
git switch 'upstream-pr/1190'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1190'
git switch 'main'
git merge --squash 'upstream-pr/1190'
git switch 'main'
git merge --ff-only 'upstream-pr/1190'
git switch 'main'
git merge 'upstream-pr/1190'
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!1187
No description provided.