Skip to content

GPU: index recorded steps for submission prechecks - #3309

Draft
spk-c wants to merge 1 commit into
trustno1-coder:mainfrom
spk-c:perf/recorded-step-index
Draft

spk-c wants to merge 1 commit into
trustno1-coder:mainfrom
spk-c:perf/recorded-step-index

Conversation

@spk-c

@spk-c spk-c commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

What it changes

The submission prechecks repeatedly walk all recorded steps, including refresh-heavy lists, even when they only need blocking steps or shader write declarations.

  • Index those two sparse subsets as steps are recorded and remember whether the recording contains a Copy or Run.
  • Use the original indices in blocked_with, the flag in joinable and the write subset in declared_writes; ordering, hazard checks and deduplication are unchanged.
  • Keep the full ordered vector as the source of truth. Shift indices when late heap refreshes are inserted and clear them on reset. Only existing Copy lengths and Fill metadata can be edited in place. No additional resource references are retained.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): Ryzen 9 9950X3D / RTX 4090, Windows. Synthetic CPU tests and preliminary in-title diagnostics builds tested; Series X, 2560x1440 native, DLSS and frame generation off, RT on. Both local diagnostics builds include the same build fix from Diagnostics-only barrier stats: six needless borrows the all-features gate refuses #3086.
  • Before / After: debug-profile synthetic stress test, 100 recordings of 20,000 refresh steps plus sparse writes and fills, median of three runs. Each pass performs both precheck scans; recording and index-maintenance costs are included. Checksums match.
    • 1 pass: 70.17 ms -> 55.40 ms.
    • 3 passes: 109.24 ms -> 56.28 ms.
    • 6 passes: 167.66 ms -> 57.52 ms.
  • Optimized release-profile benchmark on the same machine and synthetic workload, median of three runs (100 recordings):
    • 1 pass: 23.85 ms -> 16.97 ms (-28.8% elapsed).
    • 3 passes: 27.15 ms -> 17.32 ms (-36.2% elapsed).
    • 6 passes: 31.89 ms -> 16.92 ms (-46.9% elapsed).
    • These are synthetic CPU timings, not frame times or FPS. The workload intentionally stresses sparse prechecks; real list distributions and gameplay impact still need validation.
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): N/A.
  • cargo test passed for the crates it touches: yes, targeted tests only: cargo test -p victory-gpu --lib --locked recorded_steps_tests -- --include-ignored --nocapture --test-threads=1: 2 passed (equivalence and synthetic benchmark). The same two tests also passed with --release (2 passed). Full crate/workspace suite not run.
  • cargo clippy -p victory-gpu --lib --tests --no-deps --locked: exit 0; existing warnings outside the changed hunks, none in the new code. This is not a clean workspace -D warnings run.
  • git diff --check: clean.
  • Preliminary gameplay A/B (90 s measurement, 30 s warmup, same seed and route): baseline median 12.9 FPS, candidate 13.5 FPS; median CPU preparation 36.5 vs 36.3 ms; p99 872.1 vs 350.8 ms. Not a controlled performance result: median pipelines still compiling 291 vs 0, and draw loads differed. In the 7,000+ draws band the medians were 12.9 vs 10.5 FPS. A second candidate run ended with DXGI device removed (0x887A0005 / 0x887A0004), cause not established; no breadcrumbs were available. No FPS improvement or stability claim is made from these runs.
  • Follow-up stability: the baseline (without the indexed-step change, with the same Diagnostics-only barrier stats: six needless borrows the all-features gate refuses #3086 diagnostics build fix) also reproduced a device removal during warmup, with zero pipelines being compiled, around 17.2 GB VRAM and a matching Windows nvlddmkm event ID 153. Thus device removal is not exclusive to the candidate; the underlying trigger and any difference in crash frequency are not established. A dedicated baseline DRED-light/debug-layer diagnostic run was launched separately.
  • Follow-up A/B: separate warmups for both builds, snapshot their common warmed cache, restore identical copies before each measured run, 60 s warmup and 90 s measurement from the same save with no scripted movement. Alternate builds, reject incomplete/cold-cache/crashed runs, record failures separately; additional D3D12 diagnostic run if needed.

Checked for overlap

AI assistance

Prepared with AI assistance. Draft pending controlled gameplay validation. No FPS gain claimed.

@github-actions github-actions Bot added pr-performance Pull request: makes it faster or use less memory rendering Missing, black, flickering or corrupted graphics labels Nov 29, 2026
@github-actions github-actions Bot changed the title [pr-performance][rendering] GPU: index recorded steps for submission prechecks GPU: index recorded steps for submission prechecks Nov 29, 2026
OGShotz added a commit to OGShotz/VIctory-Turing that referenced this pull request Nov 29, 2026
moritz-eckhard-nickel added a commit to moritz-eckhard-nickel/VIctory-NVIDIA that referenced this pull request Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-performance Pull request: makes it faster or use less memory rendering Missing, black, flickering or corrupted graphics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant