GPU: a title heap a capped host heap does not hold whole keeps its lower 393,215 slots; the rest are dynamic #1255
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from fxceless/victory-fork. Originally posted by notquiteog on 2026-11-26T03:50:27Z.
Problem
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
Imported from fxceless/victory-fork. Originally posted by EgoraWyn on 2026-11-26T14:57:06Z.
Data point from a different approach to the same 1,000,000-view cap. This is a port of ScarlettPort's "VIcky" heap map onto a cool_fox-based branch:
Results on an RTX 3060 Laptop 6 GB (Windows 11), warm caches, 120 s window after the first frame with ≥1000 draws, one run each:
host view heap capped at 1000000; views past it read a null slot count=1245184no longer appears. No pool slots were refused and nothing crashed.Happy to share the diff if it's useful as a cross-check.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.