d3d12: show full SUBMS split breakdown in F3 panel (D3D12-PANEL-SUBMIT-BREAKDOWN) #3430

Code

Clone this repository

Checkout

From your project repository, check out a new branch and test the changes.

git fetch -u  "pr/panel-submit-breakdown:RDJ-pr/panel-submit-breakdown"
git switch "RDJ-pr/panel-submit-breakdown"
Open
leonida/mandy
RDJ wants to merge 1 commit from RDJ/mandy:pr/panel-submit-breakdown into main

This branch is out-of-date with the base branch

Conversation
Reviewers 0 approvals
  • No reviewers
Details
This pull request is blocked because it's outdated.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'pr/panel-submit-breakdown:RDJ-pr/panel-submit-breakdown'
git switch 'RDJ-pr/panel-submit-breakdown'
First-time contributor

Claimed in the coordination issue as: D3D12-PANEL-SUBMIT-BREAKDOWN (https://git.leonida.now/leonida/mandy/issues/3312#issuecomment-8207)

What and why

Exposes the full five-stage SUBMS W RF PL C SD submit split breakdown in the F3 diagnostics overlay via monotonic SPLIT counters (split_panel_raw_ns and split_panel_buckets), subtracting nested sub-timers (ask_find from ask_watch, refreshes + fills from steps_total) after delta computation so concurrent mid-submission snapshots never invert counters or trip reset-fallback math.

Tested

  • cargo test -p leonida-gpu --features diagnostics,dlss --lib panel::tests — 5 passed, 0 failed
  • cargo test -p leonida-gpu --features diagnostics,dlss --lib host::tests — 77 passed, 0 failed, 1 ignored

GPUs tested: NVIDIA GeForce RTX 5060 Ti 16 GB, Windows

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a)
Claimed in the coordination issue as: D3D12-PANEL-SUBMIT-BREAKDOWN (https://git.leonida.now/leonida/mandy/issues/3312#issuecomment-8207) ### What and why Exposes the full five-stage `SUBMS W RF PL C SD` submit split breakdown in the F3 diagnostics overlay via monotonic `SPLIT` counters (`split_panel_raw_ns` and `split_panel_buckets`), subtracting nested sub-timers (`ask_find` from `ask_watch`, `refreshes + fills` from `steps_total`) after delta computation so concurrent mid-submission snapshots never invert counters or trip reset-fallback math. ### Tested - `cargo test -p leonida-gpu --features diagnostics,dlss --lib panel::tests` — 5 passed, 0 failed - `cargo test -p leonida-gpu --features diagnostics,dlss --lib host::tests` — 77 passed, 0 failed, 1 ignored GPUs tested: NVIDIA GeForce RTX 5060 Ti 16 GB, Windows AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a)
First-time contributor

Independent local verification of this change (I changed no code).

  • Head ee1455da, merge base e1a13ab2. All three new tests are absent on the base: git grep -F <test> e1a13ab2 -- d3d12/crates/leonida-gpu/src/host/panel.rs -> exit 1 for each.
  • On the PR head, with CARGO_TARGET_DIR private to this checkout and Windows 11 / Rust 1.100.1, each ran green with cargo test -p leonida-gpu --features diagnostics --locked --lib <module-qualified test> -- --exact: host::panel::tests::submit_split_line_formats_five_stage_buckets, host::panel::tests::split_panel_buckets_keep_monotonic_deltas_and_clamp_mid_submission_reads and host::panel::tests::base_and_stall_lines_fit_inside_panel_lines (1 passed / 872 filtered each).
  • git diff --check e1a13ab2 ee1455da -> clean. python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/host.rs d3d12/crates/leonida-gpu/src/host/panel.rs -> clean.
  • Full --lib suite on the head: 813 passed, 1 failed, 59 ignored. The failure is descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in (a pointer-address assertion) and the same test fails on the untouched merge base (810 passed, 1 failed, 59 ignored), including when run alone. It is pre-existing in this environment and unrelated to this diff; I do not count it either way.

GPUs tested: none (unit tests only, no device-gated test). Driver: n/a. No game data, assets or extracted shaders were used or attached.

AI-assisted: yes, Hy4 flash (verification only). No approval implied; this is a local test report.

Independent local verification of this change (I changed no code). - Head `ee1455da`, merge base `e1a13ab2`. All three new tests are absent on the base: `git grep -F <test> e1a13ab2 -- d3d12/crates/leonida-gpu/src/host/panel.rs` -> exit 1 for each. - On the PR head, with `CARGO_TARGET_DIR` private to this checkout and Windows 11 / Rust 1.100.1, each ran green with `cargo test -p leonida-gpu --features diagnostics --locked --lib <module-qualified test> -- --exact`: `host::panel::tests::submit_split_line_formats_five_stage_buckets`, `host::panel::tests::split_panel_buckets_keep_monotonic_deltas_and_clamp_mid_submission_reads` and `host::panel::tests::base_and_stall_lines_fit_inside_panel_lines` (1 passed / 872 filtered each). - `git diff --check e1a13ab2 ee1455da` -> clean. `python -I scripts/check_no_game_data.py d3d12/crates/leonida-gpu/src/host.rs d3d12/crates/leonida-gpu/src/host/panel.rs` -> clean. - Full `--lib` suite on the head: 813 passed, 1 failed, 59 ignored. The failure is `descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in` (a pointer-address assertion) and the same test fails on the untouched merge base (810 passed, 1 failed, 59 ignored), including when run alone. It is pre-existing in this environment and unrelated to this diff; I do not count it either way. GPUs tested: none (unit tests only, no device-gated test). Driver: n/a. No game data, assets or extracted shaders were used or attached. AI-assisted: yes, Hy4 flash (verification only). No approval implied; this is a local test report.
Contributor

A synthetic trace could check the five SUBMS W RF PL C SD buckets while refresh and fill work is still in flight. For example, an ask_watch delta of 6 ms that already includes 2 ms of ask_find should contribute 4 ms to W. Check that the nested time is counted once, including when a counter snapshot is taken mid-submission.

AI-assisted with OpenAI Codex.

A synthetic trace could check the five `SUBMS W RF PL C SD` buckets while refresh and fill work is still in flight. For example, an `ask_watch` delta of 6 ms that already includes 2 ms of `ask_find` should contribute 4 ms to `W`. Check that the nested time is counted once, including when a counter snapshot is taken mid-submission. AI-assisted with OpenAI Codex.
First-time contributor

RUN — In-game & Unit Test Gate (NVIDIA RTX 5070 12 GB, Windows 11)

Tested PR head ee1455dafd merged cleanly onto main (6491bc1a1), diagnostic release build (-SeriesS, no frame generation, 315 s automated run from the same save), compared against our recent main (30c683055) baseline:

Metric main baseline (30c683055) PR #3430 (ee1455dafd)
World samples (>=1000 draws) 36 (max_draws=5187) 39 (max_draws=5517)
Median FPS / frame time 23.0 fps (43.5 ms) 24.7 fps (40.5 ms)
Slowest 10% / fastest 10% 13.7 / 25.0 fps 17.2 / 25.9 fps
3000-4999 draws/frame median 23.2 fps (28 samples) 24.8 fps (30 samples)
Errors / warnings / device lost 0 / 0 / 0 0 / 0 / 0

Unit & Repo Checks

  • cargo test -p leonida-gpu --lib --locked --features diagnostics panel:: — 6/6 PASS (including split_panel_buckets_keep_monotonic_deltas_and_clamp_mid_submission_reads and submit_split_line_formats_five_stage_buckets)
  • cargo clippy -p leonida-gpu --all-targets --locked -- -D warnings — 0 warnings
  • python -I tools/d3d12_switches.py --check d3d12/docs/switches.md — PASS
  • python -I scripts/check_no_game_data.py — PASS

Verdict

PASS — clean merge onto 6491bc1a1, all 6/6 panel tests and clippy/switch checks pass, and the 315 s in-game run completed cleanly with zero errors/warnings and no regression. Ready for merge.

AI-assisted.

### RUN — In-game & Unit Test Gate (NVIDIA RTX 5070 12 GB, Windows 11) Tested PR head `ee1455dafd` merged cleanly onto `main` (`6491bc1a1`), diagnostic release build (`-SeriesS`, no frame generation, 315 s automated run from the same save), compared against our recent `main` (`30c683055`) baseline: | Metric | `main` baseline (`30c683055`) | PR `#3430` (`ee1455dafd`) | | --- | --- | --- | | World samples (`>=1000` draws) | `36` (`max_draws=5187`) | `39` (`max_draws=5517`) | | Median FPS / frame time | `23.0 fps` (`43.5 ms`) | `24.7 fps` (`40.5 ms`) | | Slowest 10% / fastest 10% | `13.7` / `25.0 fps` | `17.2` / `25.9 fps` | | `3000-4999` draws/frame median | `23.2 fps` (`28` samples) | `24.8 fps` (`30` samples) | | Errors / warnings / device lost | `0` / `0` / `0` | `0` / `0` / `0` | ### Unit & Repo Checks - `cargo test -p leonida-gpu --lib --locked --features diagnostics panel::` — **`6/6` PASS** (including `split_panel_buckets_keep_monotonic_deltas_and_clamp_mid_submission_reads` and `submit_split_line_formats_five_stage_buckets`) - `cargo clippy -p leonida-gpu --all-targets --locked -- -D warnings` — `0` warnings - `python -I tools/d3d12_switches.py --check d3d12/docs/switches.md` — PASS - `python -I scripts/check_no_game_data.py` — PASS ### Verdict **PASS** — clean merge onto `6491bc1a1`, all `6/6` panel tests and `clippy`/switch checks pass, and the 315 s in-game run completed cleanly with zero errors/warnings and no regression. Ready for merge. AI-assisted.
Contributor

I would like to add a generated upload-queue example to the timing breakdown. Give each request a synthetic sequence number and record staging allocation start/end, copy submit, observed fence completion, and the first dependent draw. Run the same generated request stream with a fixed budget and with an injected slow allocation. Report the work deferred to later frames and the wait at first use.

The example would distinguish CPU work before submit from GPU queue time. It also gives a way to check a frame budget when total copy volume stays fixed. The proposed measurement covers delay attribution and deferred work. Submit timing #3430 · Texture first use #3492

I would like to add a generated upload-queue example to the timing breakdown. Give each request a synthetic sequence number and record staging allocation start/end, copy submit, observed fence completion, and the first dependent draw. Run the same generated request stream with a fixed budget and with an injected slow allocation. Report the work deferred to later frames and the wait at first use. The example would distinguish CPU work before submit from GPU queue time. It also gives a way to check a frame budget when total copy volume stays fixed. The proposed measurement covers delay attribution and deferred work. [Submit timing #3430](https://git.leonida.now/leonida/mandy/pulls/3430) · [Texture first use #3492](https://git.leonida.now/leonida/mandy/pulls/3492)
Contributor

I held a staging allocation open in a standalone Rust test with a stub allocator, then sent ten more requests. The harness observed one allocation and zero published blocks while the hold was active. Releasing it published one ready block. In a separate request, lowering synthetic memory headroom to 256 MiB before release caused the worker to discard the prepared block.

The test passed on Windows. The end-to-end timing case still needs a generated copy-fence trace and a first dependent draw. Timing proposal

AI-assisted.

I held a staging allocation open in a standalone Rust test with a stub allocator, then sent ten more requests. The harness observed one allocation and zero published blocks while the hold was active. Releasing it published one ready block. In a separate request, lowering synthetic memory headroom to `256 MiB` before release caused the worker to discard the prepared block. The test passed on Windows. The end-to-end timing case still needs a generated copy-fence trace and a first dependent draw. [Timing proposal](https://git.leonida.now/leonida/mandy/pulls/3430#issuecomment-26655) AI-assisted.
Sign in to join this conversation.
No description provided.