Skip to content

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

Open
TG0000 wants to merge 1 commit into
fxceless:mainfrom
TG0000:pr/frame-health
Open

TG0000 wants to merge 1 commit into
fxceless:mainfrom
TG0000:pr/frame-health

Conversation

@TG0000

@TG0000 TG0000 commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

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

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

🤖 Generated with Claude Code

…nder health

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 <noreply@anthropic.com>
@UwUCammie

Copy link
Copy Markdown

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants