Diagnostics: VICTORY_FRAME_HEALTH=1 writes a per-frame CSV of draws/dispatches not run, unready textures and VRAM (off by default) #1415

Closed
TG0000 wants to merge 1 commit from upstream-pr/1415 into main
TG0000 commented 2026-11-27 00:04:41 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by TG0000 on 2026-11-27T00:04:41Z.


What

VICTORY_FRAME_HEALTH=1 (or =<path.csv>) writes one CSV row per presented frame:

frame,ms,draws_ok,draws_dropped_compiling,draws_dropped_refused,compute_ok,
compute_dropped_compiling,compute_dropped_refused,rt_skipped,
textures_empty_or_unready,textures_waiting_room,vram_mb,vram_budget_mb

It also prints a summary line on stderr every 5 s. The point is to see whether a frame drew everything the title asked for: draws or dispatches skipped because their pipeline is still compiling or was refused, textures not on the card yet, and VRAM pressure. A plain FPS number does not show any of that.

Off by default. When it is off, the only cost is one cached flag test on the paths that already drop work. When it is on, each draw or dispatch that does not run adds one relaxed atomic add, and each present adds one video-memory query and one buffered row.

Files

  • health.rs (new, 283 lines)
  • Call sites at the existing drop points in draw.rs and pipeline.rs
  • make::being_made in pipeline/make.rs
  • The per-present row in host.rs

This PR does not change rendering.

Tested

  • cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings passes, with and without diagnostics. It ran on a Mac M3 Pro, cross-checked for the Windows target.
  • In game, on our local build that carries the same module: one 240 s run over 2,853 frames on an AMD RX 6800 16 GB (ReBAR), Adrenalin 26.11.2, Ryzen 9 5900X, Windows 11, Series X profile at 1440p. The CSV was complete and readable, and there was no visible change with it on.
  • This branch as ported onto main has not been run in game yet. Two changes were needed to apply it to main:
    • Here the skipped-shader check uses is_skipped, which exists only with diagnostics.
    • The local build also counted a ray-tracing skip switch that is not on main. Those lines were left out.
  • #1275 (VICTORY_FRAME_WHY2) and #1364 (present intervals) are also diagnostics, but they measure time: where a frame's time went. This PR counts the work that was not done. They can be used together.
  • repository_passes_policy will fail for the same reason it fails on main: host.rs and lower.rs are over 512 KiB. Depends on: #1357

AI-assisted (Claude). GPL-3.0, like the rest of the repository.

🤖 Generated with Claude Code

<!-- greyfinch-sync:fxceless/victory-fork:issue:5518893857 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1415). Originally posted by [TG0000](https://github.com/TG0000) on 2026-11-27T00:04:41Z. --- ## What `VICTORY_FRAME_HEALTH=1` (or `=<path.csv>`) writes one CSV row per presented frame: ``` frame,ms,draws_ok,draws_dropped_compiling,draws_dropped_refused,compute_ok, compute_dropped_compiling,compute_dropped_refused,rt_skipped, textures_empty_or_unready,textures_waiting_room,vram_mb,vram_budget_mb ``` It also prints a summary line on stderr every 5 s. The point is to see whether a frame drew everything the title asked for: draws or dispatches skipped because their pipeline is still compiling or was refused, textures not on the card yet, and VRAM pressure. A plain FPS number does not show any of that. **Off by default.** When it is off, the only cost is one cached flag test on the paths that already drop work. When it is on, each draw or dispatch that does not run adds one relaxed atomic add, and each present adds one video-memory query and one buffered row. ## Files - `health.rs` (new, 283 lines) - Call sites at the existing drop points in `draw.rs` and `pipeline.rs` - `make::being_made` in `pipeline/make.rs` - The per-present row in `host.rs` This PR does not change rendering. ## Tested - `cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings` passes, with and without `diagnostics`. It ran on a Mac M3 Pro, cross-checked for the Windows target. - In game, on our local build that carries the same module: one 240 s run over **2,853 frames** on an AMD RX 6800 16 GB (ReBAR), Adrenalin 26.11.2, Ryzen 9 5900X, Windows 11, Series X profile at 1440p. The CSV was complete and readable, and there was no visible change with it on. - **This branch as ported onto `main` has not been run in game yet.** Two changes were needed to apply it to `main`: - Here the skipped-shader check uses `is_skipped`, which exists only with `diagnostics`. - The local build also counted a ray-tracing skip switch that is not on `main`. Those lines were left out. ## Related - #1275 (`VICTORY_FRAME_WHY2`) and #1364 (present intervals) are also diagnostics, but they measure time: where a frame's time went. This PR counts the work that was not done. They can be used together. - `repository_passes_policy` will fail for the same reason it fails on `main`: `host.rs` and `lower.rs` are over 512 KiB. Depends on: #1357 AI-assisted (Claude). GPL-3.0, like the rest of the repository. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
UwUCammie commented 2026-11-27 00:15:59 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by UwUCammie on 2026-11-27T00:15:59Z.


I ported this to the AMD branch in #37. The Windows MSVC CSV test passed under Wine, and the diagnostics-feature check passed. During the port I kept the AMD present-status gate and treated a successful completion racing the missed-bind count as a compile miss. Before this, the compute-wait-off run had no comparable drop notice. The fixed-driver rerun will collect the same counters for both settings.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7206316176 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1415#issuecomment-7206316176). Originally posted by [UwUCammie](https://github.com/UwUCammie) on 2026-11-27T00:15:59Z. --- I ported this to the AMD branch in [#37](https://github.com/jtrudeau1530/VIctory-7900XTX/pull/37). The Windows MSVC CSV test passed under Wine, and the diagnostics-feature check passed. During the port I kept the AMD present-status gate and treated a successful completion racing the missed-bind count as a compile miss. Before this, the compute-wait-off run had no comparable drop notice. The fixed-driver rerun will collect the same counters for both settings.
TG0000 commented 2026-11-28 01:14:46 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by TG0000 on 2026-11-28T01:14:46Z.


Closing: this targets the earlier line and no longer merges. Its counting of draws that did not run continues in a different form as VICTORY_PROBE (Marvisak/VIctory#3638); the per-frame CSV and the texture and VRAM columns are not carried over. Thanks @UwUCammie for porting it. (AI-assisted comment.)

<!-- greyfinch-sync:fxceless/victory-fork:comment:7231527110 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1415#issuecomment-7231527110). Originally posted by [TG0000](https://github.com/TG0000) on 2026-11-28T01:14:46Z. --- Closing: this targets the earlier line and no longer merges. Its counting of draws that did not run continues in a different form as `VICTORY_PROBE` (Marvisak/VIctory#3638); the per-frame CSV and the texture and VRAM columns are not carried over. Thanks @UwUCammie for porting it. (AI-assisted comment.)

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!1415
No description provided.