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

Open
github-bot wants to merge 1 commit from github-bot/gh-1415 into main AGit
Owner

@⁠TG0000 on GitHub · 2026-11-27 00:04 UTC · original
TG0000:pr/frame-health → main · +335 −0 · 6 files · 1 commits · open

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

**@⁠TG0000** on GitHub · 2026-11-27 00:04 UTC · [original](https://github.com/fxceless/victory-fork/pull/1415) `TG0000:pr/frame-health` → `main` · +335 −0 · 6 files · 1 commits · open ## 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)
One CSV row per presented frame: draws and dispatches run, those not run
because their host pipeline is still being made or will never be, dispatches
left out because the ray-tracing structure builder is off, textures picked by
index that were not on the card or held back for room, and the card's memory
use and budget; a summary on stderr every 5 s. Off, it costs one cached flag
test on the paths that drop work.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:03:53 +00:00
Author
Owner

@⁠UwUCammie on GitHub · 2026-11-27 00:15 UTC · original

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.

**@⁠UwUCammie** on GitHub · 2026-11-27 00:15 UTC · [original](https://github.com/fxceless/victory-fork/pull/1415#issuecomment-7206316176) 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.
This pull request can be merged automatically.
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 origin '+refs/pull/1415/head:github-bot/gh-1415'
git switch 'github-bot/gh-1415'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1415'
git switch 'github-bot/gh-1415'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1415'
git switch 'github-bot/gh-1415'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1415'
git switch 'main'
git merge --squash 'github-bot/gh-1415'
git switch 'main'
git merge --ff-only 'github-bot/gh-1415'
git switch 'main'
git merge 'github-bot/gh-1415'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.