Skip to content

[RFC] Architectural roadmap to 2 frames in flight + benchmarked GPU-Side Dirty Bitmap (slot 251) & low-risk RAM/VRAM trims #756

Backlog

Description

@shiman1901

Hi! Did a deep read-only audit of commit 8fc22547 focused on two goals: (1) cutting host RAM/VRAM pressure on 12 GB GPUs / 16–32 GB systems, and (2) unblocking true end-to-end 2 frames in flight (docs/findings.md:170-177).

Full disclosure upfront: we do not have game assets to run live captures, so all performance numbers below are either cited directly from the repo's own logs or measured on a standalone D3D12 repro benchmark on an RTX 3060 12 GB (Win11 26300, driver 621.35) modeling the exact 174 MiB (0xAE00000) / 11-dispatch scenario from docs/findings.md and shadow.rs:147.

Posting this as a concise technical map + standalone benchmark in case any of these pieces help prioritize upcoming PRs.


1. Three quick, zero-render-risk memory wins (especially for 12 GB VRAM / 16–32 GB RAM)

  1. Auto-trim idle host lists under commit pressure (list.rs:303-341, host.rs:436-464, 1459-1500):
    • docs/findings.md:95 notes host-list command allocators hold up to ~9 GB private memory after loading spikes (IDLE_MOST = 512, 2 allocators each).
    • allocator_trim and idle_trim already exist, just gated behind env vars. Triggering a trim down to e.g. IDLE_TIGHT = 64 inside Host::sweep() when residency::pressured() || residency::critical_commit() should drop post-load commit peaks by ~0.5–2.5 GB with zero rendering risk (list recreation is already measured at ~0.2 ms in list.rs:297-299).
  2. Scale pool.rs SPARE_KEPT with VRAM budget (pool.rs:30-77):
    • SPARE_KEPT = 64 × 64 MiB holds up to 4 GiB of empty VRAM as a constant until usage crosses 85%. On 8–12 GB GPUs that's 33–50% of local VRAM tied up in empty chunks, causing oscillation between 4 GiB and 128 MiB around the 85% threshold. Capping it as a fraction of DXGI budget (e.g. budget / 32, clamped [2, 64]) fixes this cleanly.
  3. Pool read_back_buffer for texback.rs (host.rs:9513-9550, texback.rs:144-198):
    • Currently allocates a fresh CreateCommittedResource (~310 µs/alloc per pool.rs:5-7) on every readback. A small power-of-two reuse pool (mirroring send.rs::SPARE) removes that hot-path allocation overhead.

2. Standalone RTX 3060 benchmark: GPU-Side Dirty Bitmap (shadow.rs:3444)

shadow.rs:3444-3446 explicitly notes a GPU-side dirty mask as an unimplemented shortcut. Checking the shader compiler, everything needed to emit it is already in place:

  • Free root UAV slot: SLOT_DIRTY = 251 (victory-shader/src/emit/shader.rs:26-73, where 252–255 are taken; add to ours in victory-pipeline/src/host.rs:523-529, guard against the 64 root-param limit).
  • Store instrumentation points: emit/lower.rs:12797-12882 (buffer stores), :3710-3724 (global stores), :12713-12739 (narrow), :12767-12795 (atomics). atomicBinOp.i32 (opcode 78, op 2 = Or) is already emitted at lower.rs:3766-3773.
  • Map size: 1 bit per 64 KiB page → 348 bytes (4 KiB alloc) for the 174 MiB heap (vs 174 MiB CPU before snapshot, or 44.6 KB hash + 11.1 KB differs in CARD_COMPARE).
  • Safety: clamp word with an overflow bit (overflow → mark copy all-dirty), use a small per-flight pool (e.g. 8 × 4 KiB) or 32-bit page generation for LATE_WAIT, and fall back to existing before/CARD_COMPARE for multi-copy draws or image stores.

Measured results on RTX 3060 12 GB (174 MiB UAV, 11 compute dispatches, medians of 21 warm runs)

Tested 3 paths honestly — including the actual default VRAM CARD_COMPARE hash path (host.rs:2461-2541), not just the worst-case CPU before path:

  • A (before + readback + 8-thread AVX2 diff) — fallback when a copy doesn't fit in VRAM (card_room_for refusal / VICTORY_CARD_BUFFERS=0 / small copies).
  • C (CARD_COMPARE GPU hash) — current default for carded 174 MiB copies.
  • D (GPU Dirty Bitmap) — worst-case SM 5.0 per-thread InterlockedOr (no WaveActiveBitOr coalescing yet; SM 6.6 DXIL with WaveActiveBitOr will be equal or faster) + 4 KiB map readback + targeted page fetch + AVX2 merge.
Path Scenario GPU (ms) wait1 (ms) wait2 / fetch (ms) CPU work (ms) Snapshot (ms) Total (ms)
A (before + AVX2) sparse (16 pages / 1 MiB) 0.004 17.520 — 8.532 8.417 34.871
A (before + AVX2) dense (256 pages / 16 MiB) 0.004 17.116 — 8.214 7.984 33.571
C (CARD_COMPARE default) sparse (16 pages) 0.487 0.561 0.139 0.037 — 0.774
C (CARD_COMPARE default) dense (256 pages) 0.501 0.604 1.356 1.016 — 3.241
D (GPU Dirty Bitmap) sparse (16 pages) 0.005 0.070 0.136 0.036 — 0.272
D (GPU Dirty Bitmap) dense (256 pages) 0.005 0.097 1.339 0.727 — 2.308
  • Accuracy validation: 48 full validation rounds (133,632 page decisions, 254,592 dword checks) — 0 misses, 0 false positives, 0 data errors.
  • Realistic scope: On carded copies (C), D saves ~0.5–0.9 ms and 55 KB VRAM; on non-carded copies (A, common on 12 GB cards), it drops ~34 ms → 0.27–2.31 ms and eliminates the 174 MiB snapshot (snapshot pool up to 512 MiB). Crucially, it does not eliminate waiting on an in-flight dispatch (the bitmap is only known after execution), but it unblocks multi-flight / 2-frames-in-flight without duplicating 174 MiB CPU Shadow::before snapshots (which are currently single-per-copy at shadow.rs:60-64) and narrows line.written / copied_read post-landing.

3. What actually blocks true "2 Frames In Flight" end-to-end

Tracing queue/behind.rs, host.rs, fence.rs, and draw.rs, most of the async machinery is already built and active via scripts/play-foxhound.ps1 (THIN=1, RELAY=2, CARD_STEPS=2, late_stage() == 3, non-blocking title fences via late_signal). The remaining concrete blockers appear to be:

  1. Present window & swapchain depth (the main choke point):
    • frames_most() defaults to 1 (queue/behind.rs:733-739, VICTORY_SUBMIT_FRAMES isn't set in play-foxhound.ps1), and BUFFERS = 2 (host.rs:9620).
    • Moving to VICTORY_SUBMIT_FRAMES=2 + BUFFERS = 3 also requires handling HostTexture.state (currently a single AtomicU32 at resource.rs:2897-2904, which can race if two presents/frames touch the same source texture).
  2. Intra-frame settles & card_steps refusals (biggest single CPU-wait win):
    • The 226–326 ms settle on 12 GB configs (findings.md:125-131, 32 B upload fill colliding with the declared 174 MiB heap) can't be solved by dirty bitmaps alone while the skinning dispatches are still in flight — card_steps is supposed to run that fill on the GPU behind the flight, so checking why it refuses via card_steps::REFUSALS (card_steps.rs:1012-1043) looks like the fastest single win.
    • Secondary intra-frame settles to eliminate before 2-frame overlap: dynamic descriptor fallback settle_for_fence() (draw.rs:2240,2314,4627), synchronous decoration bake execute_sync_internal (host.rs:5662) + texture/ahead.rs:155 drain(), and synchronous CopyPageMappingsBatchX (queue.rs:1193-1251).
  3. Per-flight CPU Shadow::before (shadow.rs:60-64):
    • Carded paths already have per-flight CardPlan, but non-carded CPU Shadow::before is one Mutex<Option<Vec<u8>>> per copy. Replacing it with a per-flight DirtyMap pool (Section 2) prevents 2×–3× RAM blowup and cross-flight contamination when two frames overlap.

Suggested order of attack

  1. Measure baseline first (0 code): capture logs with VICTORY_SUBMIT_FRAMES=2, VICTORY_SUBMIT_DEPTH=128, VICTORY_LATE_WAIT_LISTS=512, VICTORY_BURY_LAG=8 and inspect card_steps::REFUSALS, at presents, and DynamicRefused.
  2. Stage 1: fix the top card_steps refusal on the 174 MiB fill + eliminate intra-frame settles (dynamic slots / async bake) + land the 3 quick memory trims.
  3. Stage 2: implement SLOT_DIRTY = 251 GPU Dirty Bitmap with a VICTORY_DIRTY_CHECK=1 parallel validation switch.
  4. Stage 3: BUFFERS = 3, frames_most = 2, per-flight HostTexture state/copy handling → based on the timelines in docs/findings.md, this should move RTX 5080 from ~28.4 ms (~35 FPS) toward ~20–22 ms (~45–50 rendered FPS) and reclaim substantial CPU idle/memory headroom on 12 GB cards.

Happy to share the standalone D3D12 C++ benchmark source (bench.cpp) or help draft clean unit-tested PRs for the memory trims / SLOT_DIRTY scaffolding if any of this aligns with your current branch priorities!

Activity

  1. github-actions commented on Nov 28, 2026

    @github-actions

    Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

    1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
    2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

    Also say which GPU, Windows version (10 or 11)

  2. nick0451 commented on Nov 28, 2026

    @nick0451

    In-game numbers for the late-wait stages, since you have no assets to run.

    Setup: release build of main at 63b902f, victory.exe play with its defaults. RTX 3090 24 GB (driver 610.88), i9-14900K, 32 GB, Windows 11. Series S, DLSS Performance, frame generation off. The same save in an interior (about 5,800-6,000 draws a frame). Stages were run alternately, two runs each, and the figures are medians of the last 12 frame lines in the world.

    VICTORY_LATE_WAIT fps frame preparing card busy
    unset (stage 3: late_stage() falls to 3 when the relay is on, which the launcher sets) 23.8 / 23.1 42.0 / 43.3 ms 23.4 / 23.6 ms ~92%
    2 18.2 / 18.7 54.8 / 53.5 ms 33.3 / 34.0 ms ~73%
    1 14.9 / 14.6 67.2 / 68.7 ms 30.2 / 31.5 ms ~57%
    0 (an earlier session in the same room) 11.1 / 11.4 89.7 / 88.0 ms 34.9 / 34.7 ms ~41%

    Notes:

    • As you traced, stage 3 is already what players get. Setting VICTORY_LATE_WAIT=0 explicitly turns late wait off, so A/B runs against =0 measure the wrong baseline. (I made that mistake first; these numbers are against the real default.)
    • With the default, this card is about 92% busy in this room, so here the frame is the card's, not the submitting thread's. In a diagnostics build in a lighter room the card was about 67% busy and the submitting thread was the wall (Frame breakdown on a 16-core CPU: the submitting thread paces the frame (43 of 46.5 ms), and three things that did not help #699). Whether two frames in flight would gain much on this PC depends on the scene.
    • I also compared screenshots across stages at the same point in each run. A lampshade in the room was drawn in 1 run of 8, with stage 0 and with the default alike, so it is not related to late wait.

    If it helps your step 1, I can run your baseline switches (VICTORY_SUBMIT_FRAMES=2, VICTORY_SUBMIT_DEPTH=128, VICTORY_LATE_WAIT_LISTS=512, VICTORY_BURY_LAG=8) here and post the card_steps refusals and the at-presents lines.

    Measured with an AI assistant (Claude Code); every number above is from this PC's logs.

  3. shiman1901 commented on Nov 28, 2026

    @shiman1901
    Author

    @nick0451 Huge thanks for running those A/B numbers — that's super clean data, and great catch on 92% vs 67% GPU busy (#699). You're completely right: in a 92%-busy room, overlapping submissions has at most ~5–8% headroom, whereas the ~67%-busy scene is where the submitting thread is actually the wall.

    Yes, running the Step 1 switches would be massively helpful! If you have time for a quick A/B against your real default (ideally in that lighter ~67%-busy scene from #699, or both if convenient):

    VICTORY_SUBMIT_FRAMES=2
    VICTORY_SUBMIT_DEPTH=128
    VICTORY_LATE_WAIT_LISTS=512
    VICTORY_BURY_LAG=8
    

    The specific lines from the log that would settle the biggest open questions from our static audit are:

    1. at presents / queue line (submissions prepared ... presents ... in the line ... at presents) + card busy % / frame / preparing — tells us right away whether SUBMIT_FRAMES=2 immediately stalls on the 2-buffer swapchain (BUFFERS = 2) or actually lifts FPS when the card is ~67% busy (and whether you notice any visual flicker/tearing from 2 frames sharing HostTexture.state).
    2. card_steps refusals (steps done on the card ... submissions refused) — shows which refusal reason is actually firing in practice.
    3. DynamicRefused / tables asked, N refused and stood waiting — shows if dynamic slots or intra-frame settles spike when pushing 2 frames ahead.
    4. (Optional, if easy in one diag run) VICTORY_MEMORY_MAP=1 on your 32 GB system — would give a real live baseline for how much commit idle host lists + CARD_COMPARE / non-carded before snapshots actually hold on main @ 63b902f before anyone writes a PR for trim_idle or SLOT_DIRTY.

    Really appreciate you testing this live — once we see those lines, we'll know immediately whether Stage 1 (card_steps + intra-frame settles) or Stage 3 (BUFFERS = 3 + per-flight HostTexture.state) is the real bottleneck on current main!

  4. nick0451 commented on Nov 28, 2026

    @nick0451

    Step 1 switches, run here: VICTORY_SUBMIT_FRAMES=2, VICTORY_SUBMIT_DEPTH=128, VICTORY_LATE_WAIT_LISTS=512, VICTORY_BURY_LAG=8.

    Caveat first: this is not the lighter scene. My save has moved since #699, and the frozen save I benchmark from is outdoors on a balcony by the water, where the card is about 95% busy. So this answers "does it stall or break", not "does it lift fps where the submitting thread is the wall". I'll add the lighter scene when I have a save there.

    Setup: release build of main at 63b902f, victory.exe play, RTX 3090 24 GB, i9-14900K, 32 GB, Windows 11, Series S, DLSS Performance, frame generation off. The same frozen save for every run, standing still. One warm-up start per variant, then default and step 1 in turn, three rounds each. Each run is 40 s to settle, 60 s measured. The figures are medians of each run's lines, then the median of the three runs.

    default step 1
    fps (runs) 24.1 (23.9, 24.1, 24.4) 24.6 (24.8, 24.2, 24.6)
    frame / preparing 41.5 / 25.6 ms 40.7 / 26.8 ms
    queue: submissions per frame / in the line when one was added 42.0 / 11.1 42.0 / 10.6
    that thread worked 39.5 ms 39.0 ms
    title waited for room in the line 0.0 ms 0.0 ms
    title waited at presents 6.7 ms 0.0 ms
    waits not met at a present 0.00 0.00
    card steps: fills per frame 9,409 9,657
    card steps: submissions refused and waited 0.12 0.08
    card busy / idle behind the submitting thread 95% / 1.9 ms 95% / 1.8 ms
    submitting thread stood waiting for the card 3.6 ms 3.4 ms

    On your questions:

    1. at presents: the second frame takes the title's 6.7 ms a frame of waiting at presents to zero, and nothing stalls on the swap chain: no waits for room, no unmet waits at a present, the same depth in the line. The fps difference (+2%) is inside the 2-3% noise of this setup (main A/A). With the card at 95%, there is no room for it to show. I saw no flicker or tearing in end-of-run screenshots of all six runs, but a still frame cannot rule out a one-frame flicker.
    2. card_steps refusals: only one reason fires, in both variants: "a copy at its place in a list writes what it reads, or reads or writes what it writes", 0.12 (default) and 0.08 (step 1) per frame. So refusals are rare here, and the 174 MiB fill case from findings.md does not appear in this scene.
    3. DynamicRefused / tables refused / no free dynamic slots: none in any measured window of either variant.
    4. VICTORY_MEMORY_MAP=1 (diagnostics build of 63b902f, one warmed run, default switches), committed / in memory:
      • the title's heaps 3,093 / 1,754 MB; views of the title's pages 3,847 / 2,474 MB;
      • the title's page pool section 3,977 / 0 MB;
      • process heap segments 1,261 / 1,212 MB; windows of title memory and other 4 MiB allocations 3,041 / 2,386 MB;
      • write-combined (buffers shared with the card) 8,630 / 1,545 MB;
      • other private ≥ 1 MB 4,596 / 4,180 MB; files and mappings 5,313 / 3,401 MB; programs 607 / 250 MB.
      • Biggest groups: 65 × 64 MB write-combined (4,158 MB), 94 × 32 MB write-combined (2,664 MB), 3 × 1,024 MB (2,234 MB), 27 × 32 MB (837 MB).
      • Texture blocks 3,712 MB plus 320 MB staging; shader containers 189 MB, translations 129 MB, pipeline library 90 MB.

    Raw logs are available if you want other lines.

    Measured with an AI assistant (Claude Code); every number above is from this PC's logs.

  5. shiman1901 commented on Nov 28, 2026

    @shiman1901
    Author

    @nick0451 Massive thanks for running that clean 3-round A/B and pulling VICTORY_MEMORY_MAP=1 — both results are super informative!

    Two big takeaways from your numbers:

    1. VICTORY_SUBMIT_FRAMES=2 completely eliminated title waited at presents (6.7 ms -> 0.0 ms) with zero swapchain stalls, zero DynamicRefused, and zero unmet waits even on BUFFERS = 2. Obviously at 95% GPU busy it can't move FPS, so seeing the same switch on a ~65–70%-busy CPU-bound scene (where #699 showed 19.5 ms waiting at presents!) will be the real test — plus watching out for any 1-frame flicker in motion from HostTexture.state.
    2. Huge signal in your VICTORY_MEMORY_MAP=1 dump: write-combined (buffers shared with the card) is holding 8,630 MB committed vs only 1,545 MB resident (65 × 64 MB + 94 × 32 MB = 6.8 GB of commit alone, over 7 GB of uncommitted/cold WC overhead!). On 16–32 GB systems that looks like the single biggest remaining commit pressure point on 63b902f, even bigger than host-list allocators now that memory stack is on by default.

    Also reassuring that card_steps refusals are down to 0.08–0.12/frame on your 24 GB setup. Whenever you get a save in a lighter CPU-bound spot, that SUBMIT_FRAMES=2 A/B will be super interesting — and meanwhile we'll dig into where those 65 × 64 MB + 94 × 32 MB WC shared buffers come from!

  6. shiman1901 commented on Nov 28, 2026

    @shiman1901
    Author

    @nick0451 Quick follow-up on the 8,630 MB write-combined / 1,545 MB resident mystery from your dump — turns out my initial impression ("7 GB of cold shared upload overhead") was mostly a WDDM / NVIDIA driver quirk, and we nailed it down empirically!

    We ran an isolated D3D12 VirtualQuery + QueryWorkingSetEx probe (mirroring copystat.rs) across 21 test cases on an RTX 3060 (driver 621.35):

    65 × 64.00 MB (4,158 MB) is mostly VRAM (pool::TEXTURES), NOT host staging buffers:

    On NVIDIA driver 621.35, CreateHeap(D3D12_HEAP_TYPE_DEFAULT, 64 MiB) with pool.rs:826-835's exact flags (ALLOW_ONLY_NON_RT_DS_TEXTURES | CREATE_NOT_RESIDENT) shows up in VirtualQuery as 64.00 MB PAGE_WRITECOMBINE, committed = 64.00 MB, resident = 0.00 MB.
    That matches your log almost to the block: 58 × 64 MB (pool::TEXTURES = 3,712 MB VRAM) + 5 × 64 MB (pool::STAGING = 320 MB) + 2 allocated between the two unsynchronized log prints = 65 × 64.00 MB!
    Also ruled out ID3D12CommandAllocator (32 allocators × 50,000 commands = 0 bytes of PAGE_WRITECOMBINE) and shared_buffer (CUSTOM / WRITE_BACK / L0 = 0 bytes WC).
    94 × 32.00 MB (2,664 MB, avg 28.34 MB) is NVIDIA's 32 MiB small-resource arena fragmentation:

    Resources ≥ 4 MiB get dedicated bases of their exact size (no rounding to 32/64 MiB), whereas small ≤ ~2 MiB UPLOAD resources are sub-allocated by the driver into 32.00 MiB WC arenas.
    Reproducing churn (1,500 × 1 MiB UPLOAD -> 48 × 32.00 MB arenas at 31.64 MB avg commit -> freeing every 2nd buffer) kept the exact same 48 × 32.00 MB arenas while the driver MEM_DECOMMITted the holes down to 26.30 MB avg commit (whole = 32.00 MB, committed < 32 MB, regions > 1).
    Why 8,630 MB committed vs 1,545 MB in memory makes total sense:

    ~3.7+ GB is pure DEFAULT VRAM (resident = 0 by definition), and cold UPLOAD pages are trimmed out of the working set by Windows while keeping their commit charge (verified with EmptyWorkingSet: 2.68 GB committed -> 1.5 MB resident, commit unchanged).
    Practical takeaway
    So there is no 7 GB host-RAM leak hiding in that write-combined line — actual host RAM there is ~1.5 GB (and touching pool::TEXTURES wouldn't save RAM).
    Tiny diagnostic win for copystat.rs:727-740: because NVIDIA exposes DEFAULT VRAM heaps as PAGE_WRITECOMBINE (resident = 0), the label "write-combined (buffers shared with the card)" mixes pure VRAM with host upload buffers. Printing per-group present (in memory) next to committed would instantly make 65 of 64.00 MB (320 MB in memory) self-explanatory in future memory-map dumps.
    For real host RAM / commit savings on 16–32 GB rigs (a realistic ~0.5–1 GB), the actual knobs are capping idle texture staging (texture.rs:538) + trimming STAGING_KEPT (pool.rs:37, 8 -> 2), host/send.rs:123 (768 -> 256 MB), and scratch SPARE_KEPT (host.rs:2244, 1 GB -> 256 MB) — easy to cross-check against the staging of textures: N alive X MB line in a memory-map log.

  7. tippythetaidum commented on Nov 28, 2026

    @tippythetaidum

    Some in-game numbers for the "2 frames in flight" question, on a PC where the submitting thread was thought to be the wall. RTX 5080 + Ryzen 7 9800X3D (8 cores, one CCD), 32 GB, Windows 11 26200. 63b902f with #1014, #1066, #1133, #1134 and #393. Series X 2560x1440, DLSS Quality, frame generation off, relay 2 + relay copy on, indoors, the same save restored before each run (5,000 to 7,500 draws a frame).

    Where a frame of ~45 ms goes (the card's clock line and queue::behind):

    • card busy about 50 % (~23 ms);
    • card idle ~12 ms "while the submitting thread was working" and ~10 ms "while the title had not submitted";
    • lane thread "worked" 33 to 35 ms; title threads waited 11 to 16 ms at presents.

    VICTORY_SUBMIT_SPLIT=1 + VICTORY_OFF_LINE=1 (#1066), two alternating pairs of runs: the lane thread's work drops 4 to 6 ms (to 28 to 31 ms), and the sender works 3.8 ms. The title's waits at presents and the frame rate stayed the same (20 to 22 fps).

    VICTORY_SUBMIT_FRAMES=2 with the split on: the waits at presents go to 0.0 ms, but the lane thread's work goes up to 41 to 44 ms a frame. The settles for "lists in the air" take 4 to 14 ms a frame. The median frame stays at 46 ms. So with this tree, a second frame in the line moves the wait into the submitting thread instead of removing it.

    VICTORY_PORT_CONSTANTS=1 (16 GB card): 7.7 fps, median frame 159 ms. Far worse, as the README warns for 12 GB.

    What did help on this card was #1271's swap-chain sizing, with frame generation on. With 2 back buffers the present call held the presenting thread ~32 ms a frame at 4x, and the rendered rate sat at exactly 14.0. With 8 back buffers the present takes 0.1 ms.

  8. shiman1901 commented on Nov 28, 2026

    @shiman1901
    Author

    @tippythetaidum Huge thanks for bringing real 50%-GPU-busy numbers on a 9800X3D + RTX 5080 — that "lists in the air" line (4 to 14 ms per frame!) is a huge smoking gun!

    Checking host.rs:3046-3051 and host.rs:5725-5750, "lists in the air" (WHY_MOST) is the default VICTORY_LATE_WAIT_LISTS = 256 cap — and flying counts command lists (*flying += order.len()), not submissions, so 40–60 submissions × 1–3 lists/submission hits 256 at ~1.5–2 frames and forces relay_wait/settle(WHY_MOST) right on the lane thread! (And right behind it sits VICTORY_SUBMIT_DEPTH, default 64 at queue/behind.rs:728-731.)

    If you have a minute to re-test VICTORY_SUBMIT_FRAMES=2 (with #1066 split on) together with:

    VICTORY_SUBMIT_FRAMES=2
    VICTORY_LATE_WAIT_LISTS=512
    VICTORY_SUBMIT_DEPTH=128
    

    — that should clear those 4–14 ms "lists in the air" settles (just watch dynamic slots: N tables asked, M refused in the log, since holding 2 frames of lists at once can pressure dynamic slots — which #821 / VICTORY_DYNAMIC_WAIT addresses).

    Also great validation on #1271 (BUFFERS = 2 holding present for ~32 ms at 4x FG -> 0.1 ms with 8 back buffers) — confirms our Stage 3 BUFFERS = 2 choke point from live data too!

  9. nick0451 commented on Nov 28, 2026

    @nick0451

    The indoor run, as promised. The step 1 switches (VICTORY_SUBMIT_FRAMES=2, VICTORY_SUBMIT_DEPTH=128, VICTORY_LATE_WAIT_LISTS=512, VICTORY_BURY_LAG=8) against the default, in the living room of the same house.

    Setup: release build of main at 32ecacf (current), victory.exe play, RTX 3090 24 GB, i9-14900K, Windows 11, Series S, DLSS Performance, frame generation off. The save can't be made indoors (it reloads on the balcony), so every run replays the same recorded walk into the living room (keyboard keys through VICTORY_KEYS_FILE), then stands still. Each run is checked by screenshot: all 6 measured runs ended inside, and two stopped at a slightly different spot (about 8,600 draws against 7,700-8,000) and are left out. One warm-up start per variant, then the variants in turn, three rounds. Each run is 40 s to settle, 60 s measured.

    default step 1
    fps (runs in the common spot) 21.4 (21.7, 21.0) 21.6 (21.6, 21.7)
    frame / preparing 46.9 / 29.4 ms 46.2 / 30.4 ms
    submissions per frame / in the line 42.0 / 13.0 42.0 / 13.0
    that thread worked 43.5 ms 44.2 ms
    title waited at presents 7.5 ms 0.0 ms
    title waited for room / waits not met at a present 0.0 / 0.00 0.0 / 0.00
    card steps: fills / refused and waited 13,488 / 0.00 12,974 / 0.00
    card busy / idle behind the submitting thread 94% / 2.8 ms 93% / 3.4 ms
    submitting thread stood waiting for the card 0.0 ms 0.0 ms
    • The same picture as on the balcony: the second frame takes the title's wait at presents to zero (7.5 ms here), with no stalls. There are no card-steps refusals, and no dynamic-slot refusals or other waits in any window. The screenshots look the same as the default's.
    • This room is not the lighter scene I hoped for. It has more on screen than the balcony (about 7,900 draws against 5,900), and the card is still about 94% busy. So on an RTX 3090 neither scene is bound by the submitting thread, and the gain can't show as fps (+1%, inside this setup's 2-3% noise). tippythetaidum's 50%-busy RTX 5080 numbers above are the better test of the fps side.

    So, from this PC: step 1 is clean in two scenes on current main, and the fps question needs a faster card or a CPU-bound scene.

    Measured with an AI assistant (Claude Code); every number above is from this PC's logs.

  10. shiman1901 commented on Nov 28, 2026

    @shiman1901
    Author

    @nick0451 Awesome — clean 2/2 scenes on 32ecacf with 0.0 ms present waits and 0 refusals! Agreed, @tippythetaidum's 50%-busy 5080 with LATE_WAIT_LISTS=512 + SUBMIT_DEPTH=128 will be the real FPS test.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions