Search free runs in eight shards, best fit, and size the pool for a capped heap #96
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!96
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-96"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@kalijerry on GitHub · 2026-11-26 03:22 UTC · original
kalijerry:fix/sharded-dynamic-slots→main· +381 −94 · 3 files · 1 commits · openWhat this does
The dynamic descriptor pool was one lock and a bit scan from a cursor. Once the world had cut the free slots into pieces, every table that did not fit walked the whole ring under the lock every recording thread needs, and the shortest length that found nothing refused every longer table for the rest of the frame.
Measured on an RTX 3080 10 GB, 30 s warm sample,
0a43566+ this tree: 2,800 draws a frame dropped with thousands of slots free, 0.30-0.40 s a frame spent inside the search.This PR keeps the free slots as runs in eight pools, each behind its own lock, and takes the smallest run that holds the table. A run given back joins its neighbours. Requests start at a shard that turns over.
It also sizes the heap for a capped adapter: take the largest view heap the card actually makes (1,835,008 on a 3080, instead of the 1,000,000 portable fallback) and give the pool room out of the title's own slots past the cap, keeping a quarter of the limit for direct title slots. Those tables are made afresh in the pool anyway; the old sizing left it with a few hundred slots, and refusals of 2-slot tables showed the pool was full, not only cut up.
Relation to #47
#47 (by @gomeaw) also replaces the scan with coalesced free ranges, single-threaded and keeping the old cursor order. The two are complementary and conflict textually in
descriptor/host.rs:too_longrefusal shortcut.Verification
cargo test -p victory-gpu --libon Windows: 328 passed, including two new tests (smallest-run choice, neighbour joining) and the sharded-run/giveaccounting.VICTORY_PLACED_ORDERfill waits drop to 13-17 ms from 16-25 ms.cargo check --profile diag -p victory --features diagnosticsclean.@avatarmanz on GitHub · 2026-11-26 07:36 UTC · original
Left open: replaces the dynamic descriptor allocator for every card (overlaps #47 and #48); needs an in-game check on the 7900 XTX first.
@Jesper-Andersson on GitHub · 2026-11-27 02:53 UTC · original
Test report from an RTX 2070 SUPER 8 GB (Turing, driver 621.14), Windows 11, 32 GB RAM, Series S + DLSS.
This card takes no view heap above 1,000,000 (
views=1000000 raw_twins=false), so the larger-heap probe changes nothing here. The split does:count=1245184 fitted=249999 dynamic=750000.Setup:
main014d52dplus #203 (DLSS), plus a local switch that turns off the early table release from1e72861. Early release is off in both runs: with it on, this card showed grid-like shadows on walls. B adds this PR'sdefe56b, cherry-picked. It conflicted only indraw.rs, wheremainhas since rewritten the table loop; I keptmain's loop, so theTablesPastCapcounter is not in this build. Both runs used the same worktree and route, about 3 min each in the world.prepare failed)On screen, B had less mesh flicker, and the smearing and brightness pumping were gone. Black skin and some black textures remained in both runs; I believe those come from elsewhere, not from descriptor slots.
The median frame is a little slower in B because it draws about 40 % more. The p90 is much lower.
This report was made with AI assistance (Claude Code).
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.Merge
Merge the changes and update on Forgejo.