Diag: the dropped draws of a frame named by reason, in release builds too (VICTORY_DROP_NOTES=1) #1238

Closed
github-bot wants to merge 4 commits from github-bot/gh-1238 into main AGit
Owner

@⁠T1bolus on GitHub · 2026-11-28 16:13 UTC · original
T1bolus:pr/drops-reasons → main · +307 −6 · 6 files · 4 commits · closed without merging

A frame's dropped draws, named by reason (VICTORY_DROP_NOTES=1)

Every site that feeds dropped N without a host pipeline names a reason: 15 refusal points across prepare_for, bind, root_uav, root_srv_table and rectangles, and all 7 DROPPED counters in draw.rs. The reason travels on a thread-local from the refusing site to the drop counter, an aggregate is kept per frame, and with the flag on a line after the fps line averages it:

dropped without a host pipeline a frame, by reason: 1052 a stage of the ray-tracing structure builder, which is off, 5 named in VICTORY_LEAVE_OUT, left out

Measured on a GeForce RTX 4070 SUPER 12 GB (AMD Ryzen 5 7600, 6 Zen 4 cores, Series S profile, DLSS frame generation 2x): this settles the open question of the ~206-1052 draws dropped a frame — they are the ray-tracing structure builder's stages (which is off), plus a small VICTORY_LEAVE_OUT rest. No refusals, nothing being made.

The switch reads from victory-settings.txt like every other switch (settings() names it), and VICTORY_DROP_NOTES sits among KEPT (the env vars a start keeps), so a direct launch with the env set works too. The gate says so once per run: drop notes on (VICTORY_DROP_NOTES=1).

Off by default; no dxil change, so the flag is deliberately not in the shader cache's key list. #800 works toward the same naming in diagnostics builds — this one names the reasons in a release build, across the preparation and binding sites, with the per-frame line.

Checks

  • cargo check --workspace clean; cargo test -p victory-gpu --locked green, including a_dropped_draw_is_counted_by_reason_without_the_diagnostics_feature, which proves the un-gated chain end to end.
  • clippy: today's main carries four clippy findings (#1160 fixes them); this branch shows the same base findings and adds none.
**@⁠T1bolus** on GitHub · 2026-11-28 16:13 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1238) `T1bolus:pr/drops-reasons` → `main` · +307 −6 · 6 files · 4 commits · closed without merging ## A frame's dropped draws, named by reason (`VICTORY_DROP_NOTES=1`) Every site that feeds `dropped N without a host pipeline` names a reason: 15 refusal points across `prepare_for`, `bind`, `root_uav`, `root_srv_table` and `rectangles`, and all 7 `DROPPED` counters in `draw.rs`. The reason travels on a thread-local from the refusing site to the drop counter, an aggregate is kept per frame, and with the flag on a line after the fps line averages it: ``` dropped without a host pipeline a frame, by reason: 1052 a stage of the ray-tracing structure builder, which is off, 5 named in VICTORY_LEAVE_OUT, left out ``` Measured on a GeForce RTX 4070 SUPER 12 GB (AMD Ryzen 5 7600, 6 Zen 4 cores, Series S profile, DLSS frame generation 2x): this settles the open question of the ~206-1052 draws dropped a frame — they are the ray-tracing structure builder's stages (which is off), plus a small `VICTORY_LEAVE_OUT` rest. No refusals, nothing being made. The switch reads from `victory-settings.txt` like every other switch (`settings()` names it), and `VICTORY_DROP_NOTES` sits among `KEPT` (the env vars a start keeps), so a direct launch with the env set works too. The gate says so once per run: `drop notes on (VICTORY_DROP_NOTES=1)`. Off by default; no dxil change, so the flag is deliberately not in the shader cache's key list. #800 works toward the same naming in diagnostics builds — this one names the reasons in a release build, across the preparation and binding sites, with the per-frame line. ## Checks - `cargo check --workspace` clean; `cargo test -p victory-gpu --locked` green, including `a_dropped_draw_is_counted_by_reason_without_the_diagnostics_feature`, which proves the un-gated chain end to end. - clippy: today's main carries four clippy findings (#1160 fixes them); this branch shows the same base findings and adds none.
The frame line counts the draws and dispatches dropped without a host
pipeline but not why. With VICTORY_DROP_NOTES=1 they are counted by
reason and a line a frame names the spread; without the flag, counters
only, and the old lines as they were.

The reasons: a pipeline being made; one the host refused, by its own
name (root signature, compute, mesh, graphics, or what `refuse` logs
once); a shader that does not translate, by stage; a stage of the
ray-tracing structure builder, which is off; left-out pipelines with
their own why; and the preparation giving up on this thread (a root
view or a descriptor table without a slot or heap, an index buffer or
rectangle vertices outside their memory, another kind of pipeline,
the mesh dispatch switches, a draw skipped by VICTORY_SKIP_PIPELINES).
Each reason is named where it comes up and taken where the drop is
counted (`note_drop_reason`): `make::drop_reason` reads the pipeline
without starting or waiting for it, as `missing` does but without
hashes, and `HostPipeline::new` leaves a refusal on the thread that
built for `make` to take.

The flag moves counters and adds one line; it changes no translation
and no pipeline, so it is no part of the shader cache's keys.
A game log could not tell why the reasons line stayed away: the gate
was read once and silently. `drop_notes` now holds its once-read
answer in a cell, says "drop notes on (VICTORY_DROP_NOTES=1)" once
when the run carries the notes - without that line, the flag died in
the start's clearing or the exe is older than the counter - and a test
sets the gate itself (spending the one read of the environment) to
prove the chain the counting sites use, flag on and flag off.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 16:15:29 +00:00
github-bot closed this pull request 2026-11-28 19:25:02 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-28 19:23 UTC · original

Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.

**@⁠trustno1-coder** on GitHub · 2026-11-28 19:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1238#issuecomment-7244502465) Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1238
No description provided.