Repository navigation
Conversation
A fresh table took dynamic slots for entries 0..=last used, so a draw that
reads entries 120..=123 held 124 slots. In heavy scenes on a capped NVIDIA
view heap (2^18 dynamic slots) the frame then asked for more than the pool
holds, tables were refused ("no free dynamic descriptor slots"), and the
indirect draws behind them were dropped until the scene got lighter.
A fresh table now takes from its first used entry or picked index to its
last, and its virtual slot 0 is moved back by that start, so entry k still
lies at base + k. The start is clamped to the mirrored count so base stays
whole. After upstream VIctory PR #1349 by wrothgaril, adapted to this
fork's picked indices.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7e54c28 to
fa5ec43
Compare
|
Rebased onto
A data point against the need for it: one run of AI use: Claude Code (Claude Opus 5.5) did the rebase and ran the tests and the run on my machine, and wrote this comment. |
|
A/B on AI use: Claude Code (Claude Opus 5.5) ran the A/B on my machine and wrote this comment. |
Summary
A fresh descriptor table took dynamic slots for entries
0..=last used. A draw that reads entries 120..=123 of a table therefore held 124 slots. On a capped NVIDIA view heap (2^18 dynamic slots), heavy scenes asked for more than the pool holds:The indirect draws behind those tables were then dropped (
indirect kind 0/2: prepare failed, about 190 + 120–285 per frame) until the scene got lighter. In the prologue that shows as floors and walls disappearing a few minutes in.This ports the table trimming of upstream Marvisak/VIctory#1349 (wrothgaril). The 2^18 reservation part of that PR is already in this fork. The port is adapted to this fork's picked indices (
selected).Changes
crates/victory-gpu/src/draw.rs:fresh_table_range: a fresh table spans from its first used entry or picked index to its last, instead of from entry 0.base = first - start), so entrykstill lies atbase + kand the translated shaders'(user_data + offset) >> 5lands on the slots taken.startis clamped to the mirrored count, sobasestays whole.start..endis made, and the title-slot bookkeeping (texture_slot_tabled,mirror) covers only that range.fresh_tables_take_their_used_range: used entries, picked indices on either side, no entry, and the clamp.trimmed_tables_index_the_slots_they_take: on a real host heap, entries 120 and 123 land onfirstandfirst + 3, and the next table starts atfirst + 4(returns early without a GPU).Verification
2119b0e.cargo clippy --workspace --all-targets --locked -- -D warningsand with--all-features: 0 warnings.cargo test --workspace --locked: 498 passed, 0 failed, 7 ignored (both new tests included).cargo xtask policy: 169 files ok.VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024, warm pipeline library, diagnostics builds; counts only):dynamic slots: … refused(sum of samples)no free dynamic descriptor slotsindirect … prepare failed90228a7+ Shaders: v_fma_mixlo/mixhi over an f16 first interpolation half keeps zero (8 pixel programs) #77 + GPU: no blending on integer render targets in host pipelines (port of upstream #806) #51 + Shaders: a descriptor only read as data of eight dwords is a measured image #81):An earlier run without the change (on
1684989+ #77) had the room's walls at first, before the pool ran out. So walls are missing much more often without it, not always.I could not compare one fixed frame:
VICTORY_CAPTURE_FRAMESframe numbers fall at different moments from run to run, because loading time varies.Not tested / caveats
a table entry without a viewand no new warning in these runs.AI use: Claude Code (Claude Opus 5.5) found the starvation in the diagnostics logs, ported and adapted the change, wrote the tests, ran the checks and the title on my machine, and wrote this description.
🤖 Generated with Claude Code