GPU: a title heap a capped host heap does not hold whole keeps its lower 393,215 slots; the rest are dynamic #1258
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1258
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1258"
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?
@notquiteog on GitHub · 2026-11-26 03:50 UTC · original
notquiteog:pr-fx-capped-split→main· +68 −5 · 1 files · 1 commits · openProblem
On a host that caps the shader-visible CBV/SRV/UAV heap at exactly 1,000,000 views (NVIDIA), the host heap cannot hold the title's heap (1,245,184 slots) plus the dynamic slots.
HostHeap::new(crates/victory-gpu/src/descriptor/host.rs) then gives the title's first 737,855 slots a host slot and leavesDYNAMIC= 262,144 dynamic slots for the tables made afresh per draw (draw.rs,tables(): every table that holds a constant buffer, and every table reaching past the host heap's title slots).In the open world a frame asks for about 200,000 dynamic slots and holds them until the GPU has run it. 262,144 ran dry: tables were refused (
no free dynamic descriptor slots: a table is not made) and their draws dropped, seen as flicker and vegetation popping in and out.Measurement
Not measured on this tree. Measured on notquiteog/victory-nvidia, a tree based on avatarmanz/VIctory-7900XTX, where the capped heap is laid out the same way (title slots, then
DYNAMICdynamic slots, then the null slot at 999,999). RTX 5060 Ti 16 GB, i5-13600K, 32 GB RAM, Windows 11, open-world free roam.Before (737,855 title slots, 262,144 dynamic):
Which title slots ever hold a view, counted by 256-slot page and by band of 131,072 slots (512 pages a band). Pages used per band, from slot 0:
So from slot 393,216 on the title's heap is its own ring of per-draw tables. Those tables are copied into dynamic slots anyway, so the host slots reserved for the ring were not used.
After (393,215 title slots, 606,784 dynamic):
Change
DYNAMICmore, in a host heap capped belowPORTABLE_VIEWSkeeps its lower 393,215 slots; the rest up to the null slot (606,784) are dynamic (capped_dynamic_slots).VICTORY_DYNAMIC_SLOTS=<n>sets the number of dynamic slots for such a heap: at least 262,144, and leaving the title at least 65,536 slots. This tree had no such variable; it is read only for such a heap.HostHeap::dynamicused the constantDYNAMIC, which would have left the added slots unused.index >= host.count()intables()); nothing new is needed for them.DYNAMICmore.draw.rsstill refuses a fresh table of more thanDYNAMICslots; that is a limit on one table, not on the pool.One file, +68 −5.
Switch
VICTORY_DYNAMIC_SLOTS=262144restores the split as it was (737,855 title slots, 262,144 dynamic).Not tested
cargo check --locked -p victory-gpu, with and without--features diagnostics, and with--tests; the unit test itself was not run. The numbers above are from the fork named under Measurement.🤖 Generated with 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.