Skip to content

Descriptors: a view heap with room past the title's slots makes them all dynamic, up to 2^20 - #1010

Closed
cmt8 wants to merge 1 commit into
fxceless:mainfrom
cmt8:up/dynamic-slots
Closed

cmt8 wants to merge 1 commit into
fxceless:mainfrom
cmt8:up/dynamic-slots

Conversation

@cmt8

@cmt8 cmt8 commented Nov 25, 2026

Copy link
Copy Markdown

What breaks today

Tables made afresh come from the view heap's 2^18 dynamic slots. A list holds its slots until it has run. With submissions sent ahead for longer between settles, more lists hold tables at once and the 2^18 run out. Their draws are then dropped ("a descriptor table found no free slots"). In one run under Proton on an RX 7900 XTX, 600 to 1,500 draws were dropped in frames of about 10,000, showing up as missing geometry and smearing in full-screen passes.

On a host whose view heaps take UNCAPPED_VIEWS (2^21: vkd3d-proton on RADV, and AMD on Windows), the title uses about 1,000,000 slots. That leaves about 800,000 slots between the dynamic ones and the null slot that nothing uses.

The change

Where the heap has that room, every slot between the title's and the null slot is dynamic, up to DYNAMIC_MOST (2^20). A capped host (NVIDIA, 1,000,000 views) keeps 2^18 as before. The search and the cursor now wrap at the heap's own count instead of DYNAMIC. The heap's debug line names the count. One test covers it: on a host with room, the slots up to the null slot are dynamic and can all be taken at once.

Evidence

  • One user's runs on one machine (cmt8: RX 7900 XTX, RADV Mesa 26.3, Proton Experimental). Before, 2,745 drop lines for no free slots in one run, with the missing geometry and smearing above. After, in two runs with the larger pool, at most 399,750 dynamic slots were in use at once (well over 2^18) and no table was refused. Those runs were of our Linux branch, where the change came with a wait for slots given back (below). Its counter shows the wait never fired, so the pool size is what made the difference.
  • Windows test binaries under Wine 11.22 with Proton Experimental's vkd3d-proton, using the wine-test xtask from Marvisak/VIctory A list holds the host copy of a texture it reads when the staging was up to date (VICTORY_TEXTURE_HOLD_READS) #1218 (not part of this PR): victory-gpu 163 passed, 8 failed. The same 8 fail on 0b0074e0. The new test and dynamic_slots_are_held_until_released pass with 2^20 dynamic slots.

Not verified

  • Not run on Windows (we have none). This change is not Wine-only: on Windows, a host that takes 2^21 views (AMD) also gets the larger pool. That costs about 6 MB more for the heap's bookkeeping, and the slot search can scan a longer ring when it fails. Capped hosts (NVIDIA) are unchanged. We have not measured whether 2^18 runs out on Windows AMD.
  • Our original commit (381e9d97) also made a table with no free slots wait up to 250 ms for slots given back (VICTORY_DYNAMIC_WAIT_MS). That wait is left out here: it never fired in our runs, and on a host that truly runs out it could stall each table.

Related

These save slots rather than add them, and would combine with this change:

AI-assisted (Claude Code); no game data.

…all dynamic, up to 2^20

Ported by hand from 381e9d97 of cmt8/VIctory linux/fx-next6, its larger
pool only.

A view heap has 2^18 dynamic slots for tables made afresh, and a list
holds the ones its draws took until it has run. In a run under Proton on
an RX 7900 XTX (RADV) with submissions sent ahead for longer between
settles, 2^18 ran out: 600 to 1,500 draws of frames of about 10,000 were
dropped for "a descriptor table found no free slots" (missing geometry,
smearing). Where the host's view heap is larger than the title's slots
plus 2^18 (UNCAPPED_VIEWS, 2^21 views: vkd3d-proton on RADV, AMD on
Windows) the slots between the title's and the null slot went unused; now
they are all dynamic, up to DYNAMIC_MOST (2^20). A capped host (NVIDIA,
1,000,000 views) keeps 2^18 as before. The search and the cursor wrap at
the heap's own count instead of DYNAMIC.

In two runs with the larger pool, the most dynamic slots in use at once
was 399,750 and no table was refused. 381e9d97 also had a table that
finds none free wait up to 250 ms for slots given back
(VICTORY_DYNAMIC_WAIT_MS) and a status line; the wait never fired in those
runs and is left out here, as is the status line.

Test: on a host with room, the slots up to the null slot are dynamic (up
to DYNAMIC_MOST) and can all be taken at once.

Tested: cargo xwin build --release -p victory; cargo xtask policy (179
files ok); Windows tests under Wine 11.22 with Proton Experimental's
vkd3d-proton on an RX 7900 XTX: victory-gpu 163 passed, 8 failed, the
same 8 as on this commit's parent; the new test and
dynamic_slots_are_held_until_released pass with 2^20 dynamic slots. Not
run on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@UwUCammie

Copy link
Copy Markdown

Tested on RX 7900 XT (CachyOS Linux, Wine 11.22 + vkd3d-proton VKD3D_CONFIG=descriptor_heap + RADV). spare_view_heap_slots_are_dynamic passes under Wine and gameplay runs cleanly with ~10.7k tables/frame and 0 refused dynamic slot allocations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants