GPU: dropped draws say whether their pipeline was refused or is still being made #3168

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

@⁠pablogonz12 on GitHub · 2026-11-26 10:50 UTC · original
pablogonz12:out/dropped-draws-why → main · +162 −26 · 4 files · 1 commits · open

What

draw::State drops a draw or dispatch that has no host pipeline, and the frame line said only how many of them: dropped 4440 without a host pipeline (4 being made). One number reads the same for two very different states: a pipeline whose shaders do not translate, whose draws are lost every frame to the end of the run, and one still being made, which costs its draws one frame. The per-reason lines that tell them apart (dropped N/frame without a host pipeline: <reason>) are printed only by a diagnostics build, so a plain run cannot say why it is dropping.

pipeline::note_drop now counts in every build, on one of two sides, from what the pending pipeline actually holds: refused (a shader did not translate, the host driver declined to make it, or no pipeline is set at all) and waiting (still being made). take_dropped_split() returns [refused, waiting], and the frame line prints both:

dropped 4440 without a host pipeline (4393 refused, 47 waiting for one, 4 being made) and ...

The drop sites in draw.rs count in every build now (the DROPPED trace marker stays inside diagnostics), which is what feeds the counters.

Counters and log text only: no behaviour change, so no off switch — a run that wants the old text reads the first number, which is unchanged.

Test

a_refused_pipeline_counts_its_drops_apart_from_one_still_being_made (crates/victory-gpu/src/pipeline.rs): a pipeline hand-built from junk shader words (no game data, no card involved) is counted as waiting while it is unmade, made on the spot (Pending::now) it is refused on the junk container and counted as refused, and a draw with no pipeline set at all counts as refused too — take_dropped_split() gives [0,1] and then [2,0].

Numbers

  • cargo xwin clippy -p victory-gpu --all-targets --target x86_64-pc-windows-msvc -- -D warnings: clean, and the same with --features victory-gpu/diagnostics.
  • victory-gpu tests under Wine (GE-Proton11-14, --test-threads=1): 232 passed, 0 failed, 1 ignored.
  • Not run in a title on this machine for this change; it is a counter and a log line, and the counters were only read from the test above.

Other hardware

Counting and one log line: no shader translation, no heap layout and no GPU object changes, so every adapter takes exactly the path it took before. The counters are plain relaxed atomics, as the diagnostics counters already were, and the split is read once per report. Not tested on NVIDIA hardware; nothing in the diff reads an adapter, vendor or driver, but a log line from a Windows/NVIDIA run of the new frame line would confirm the text there.

**@⁠pablogonz12** on GitHub · 2026-11-26 10:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/3168) `pablogonz12:out/dropped-draws-why` → `main` · +162 −26 · 4 files · 1 commits · open ## What `draw::State` drops a draw or dispatch that has no host pipeline, and the frame line said only how many of them: `dropped 4440 without a host pipeline (4 being made)`. One number reads the same for two very different states: a pipeline whose shaders do not translate, whose draws are lost every frame to the end of the run, and one still being made, which costs its draws one frame. The per-reason lines that tell them apart (`dropped N/frame without a host pipeline: <reason>`) are printed only by a `diagnostics` build, so a plain run cannot say why it is dropping. `pipeline::note_drop` now counts in every build, on one of two sides, from what the pending pipeline actually holds: **refused** (a shader did not translate, the host driver declined to make it, or no pipeline is set at all) and **waiting** (still being made). `take_dropped_split()` returns `[refused, waiting]`, and the frame line prints both: ``` dropped 4440 without a host pipeline (4393 refused, 47 waiting for one, 4 being made) and ... ``` The drop sites in `draw.rs` count in every build now (the `DROPPED` trace marker stays inside `diagnostics`), which is what feeds the counters. Counters and log text only: no behaviour change, so no off switch — a run that wants the old text reads the first number, which is unchanged. ## Test `a_refused_pipeline_counts_its_drops_apart_from_one_still_being_made` (`crates/victory-gpu/src/pipeline.rs`): a pipeline hand-built from junk shader words (no game data, no card involved) is counted as **waiting** while it is unmade, made on the spot (`Pending::now`) it is refused on the junk container and counted as **refused**, and a draw with no pipeline set at all counts as refused too — `take_dropped_split()` gives `[0,1]` and then `[2,0]`. ## Numbers - `cargo xwin clippy -p victory-gpu --all-targets --target x86_64-pc-windows-msvc -- -D warnings`: clean, and the same with `--features victory-gpu/diagnostics`. - victory-gpu tests under Wine (GE-Proton11-14, `--test-threads=1`): **232 passed, 0 failed, 1 ignored**. - Not run in a title on this machine for this change; it is a counter and a log line, and the counters were only read from the test above. ## Other hardware Counting and one log line: no shader translation, no heap layout and no GPU object changes, so every adapter takes exactly the path it took before. The counters are plain relaxed atomics, as the `diagnostics` counters already were, and the split is read once per report. Not tested on NVIDIA hardware; nothing in the diff reads an adapter, vendor or driver, but a log line from a Windows/NVIDIA run of the new frame line would confirm the text there.
The frame line printed one number for draws and dispatches that had no host
pipeline: "dropped N without a host pipeline (M being made)". It read the
same for a pipeline whose shaders do not translate, which costs its draws
every frame to the end of the run, and one that arrives next frame. The
per-reason lines that tell them apart exist only in the diagnostics build.

pipeline::note_drop now runs in every build and counts the drop on one of
two sides from what the pending pipeline holds: refused (a shader did not
translate, the host driver declined, or no pipeline is set at all) and
waiting (still being made). take_dropped_split() returns [refused, waiting]
and the frame line prints both. The drop sites in draw.rs count in every
build now; the DROPPED trace marker stays diagnostics-only.

Counters and log text only: no behaviour change.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:09:23 +00:00
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 11:08 UTC · original · approved these changes

Verified on RTX 5090 against origin/main (63bcca4):

  • cargo test -p victory-gpu --lib pipeline:: -- --test-threads=1: 24/24 passed (including a_refused_pipeline_counts_its_drops_apart_from_one_still_being_made).
  • cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

Cleanly distinguishes refused pipelines from still-compiling pipelines in dropped-draw reporting.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-11-26 11:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/3168#pullrequestreview-6073074396) · **approved these changes** Verified on RTX 5090 against `origin/main` (`63bcca4`): - `cargo test -p victory-gpu --lib pipeline:: -- --test-threads=1`: 24/24 passed (including `a_refused_pipeline_counts_its_drops_apart_from_one_still_being_made`). - `cargo clippy -p victory-gpu --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Cleanly distinguishes refused pipelines from still-compiling pipelines in dropped-draw reporting. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
This pull request can be merged automatically.
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/3168/head:github-bot/gh-3168'
git switch 'github-bot/gh-3168'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3168'
git switch 'github-bot/gh-3168'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3168'
git switch 'github-bot/gh-3168'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3168'
git switch 'main'
git merge --squash 'github-bot/gh-3168'
git switch 'main'
git merge --ff-only 'github-bot/gh-3168'
git switch 'main'
git merge 'github-bot/gh-3168'
git push origin 'main'
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/Marvisak--VIctory!3168
No description provided.