GPU: count skipped descriptor table slots once per page #1125

Open
UwUCammie wants to merge 1 commit from upstream-pr/1128 into main
UwUCammie commented 2026-11-25 20:58:07 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by UwUCammie on 2026-11-25T20:58:07Z.


In the prison scene the descriptor scan skips roughly 180k recently tabled records per frame. Each skip updates the same atomic statistics counter while the copied-record lock is held. Count skips locally and add the page total after releasing the lock. The single-record path keeps its existing accounting.

I timed the change on an RX 7900 XT, RADV 26.3.1, Wine 11.22 and vkd3d-proton. Two 480 s scripted runs used the same instrumented local stack with #1043, parallel heap scanning and relay 2. The medians below cover seconds 270–390, before the next scripted input.

Per frame Per-record counter Per-page counter
Parallel scan, join and sort 4.89 ms 3.07 ms
Whole descriptor sync 21.64 ms 18.99 ms
Total frame time 113.3 ms 112.1 ms
Records inspected 356k 346k
Slots counted as tabled 188k 184k

The two runs had slightly different workloads. The frame-time difference is small, and the parallel scan on this stack can benefit more than the serial scanner on main. This patch can land independently.

All 18 descriptor-host tests passed under Wine on the PR branch. On the instrumented stack, 31 descriptor-host, 12 watch and 6 plain-copy tests passed. A separate Windows Event Log subscription test fails under Wine on both this branch and its unmodified base.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6613619453 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1128). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-25T20:58:07Z. --- In the prison scene the descriptor scan skips roughly 180k recently tabled records per frame. Each skip updates the same atomic statistics counter while the copied-record lock is held. Count skips locally and add the page total after releasing the lock. The single-record path keeps its existing accounting. I timed the change on an RX 7900 XT, RADV 26.3.1, Wine 11.22 and vkd3d-proton. Two 480 s scripted runs used the same instrumented local stack with #1043, parallel heap scanning and relay 2. The medians below cover seconds 270–390, before the next scripted input. | Per frame | Per-record counter | Per-page counter | |---|---:|---:| | Parallel scan, join and sort | 4.89 ms | 3.07 ms | | Whole descriptor sync | 21.64 ms | 18.99 ms | | Total frame time | 113.3 ms | 112.1 ms | | Records inspected | 356k | 346k | | Slots counted as tabled | 188k | 184k | The two runs had slightly different workloads. The frame-time difference is small, and the parallel scan on this stack can benefit more than the serial scanner on main. This patch can land independently. All 18 descriptor-host tests passed under Wine on the PR branch. On the instrumented stack, 31 descriptor-host, 12 watch and 6 plain-copy tests passed. A separate Windows Event Log subscription test fails under Wine on both this branch and its unmodified base.
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/1128:upstream-pr/1128'
git switch 'upstream-pr/1128'

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