GPU diagnostics: a black frame's trace keeps the draws that end the frame #1254

Open
github-bot wants to merge 2 commits from github-bot/gh-1254 into main AGit
Owner

@⁠EduAzevedo on GitHub · 2026-11-24 16:49 UTC · original
EduAzevedo:diag/black-frame-tail → main · +181 −18 · 2 files · 2 commits · open

Closes #954 (the branch was posted there while PR creation was limited to collaborators).

Two commits on ffe310e: 2e2f167 (this change) and 83a8ec3 by @⁠andrewpozdnakov7-jpg, which marks the draw that actually failed instead of the latest trace entry (found by @⁠DrDarkDK in #954).

Why

The black-frame trace (VICTORY_LOG=info,victory_gpu::draw=debug) kept a frame's first 256 draws. A world frame runs thousands, so the trace stopped in the geometry passes and never reached the lighting, composite and full-screen draws that end the frame, which is what a black picture (#850, #293) is about. In a run on integration/testers every black frame in the world was cut at 256 lines, all of them G-buffer mesh draws.

What

  • The trace keeps the first and the last half of the limit, with one line in between: ... N draws not kept here (VICTORY_BLACK_FRAME_DRAWS raises the limit).
  • VICTORY_BLACK_FRAME_DRAWS=<n> sets the limit (default 256, as before; at least 2). Documented in the README's diagnostics table.
  • Diagnostics builds only; release builds are unchanged.

Tested

  • cargo test -p victory-gpu --lib: 55 passed, 0 failed, 1 ignored with both commits, including the new frame_trace_tests (a short frame is kept whole; a long frame keeps both ends and counts what was left out; an interleaved failure marks the draw that failed). No GPU needed.
  • cargo clippy -p victory-gpu --all-targets -- -D warnings, with and without --features diagnostics: clean. cargo xtask policy: 154 files ok.
  • In the title: RTX 2070 SUPER (driver 610.88), Windows 11 26200, diag build of ffe310e + #493 + #189 + #206 with this commit, VICTORY_SHADER_LOOP_LIMIT=32. Two black frames in the first world minutes now read ... 106 draws not kept here and ... 1,108 draws not kept here, followed by the frame's last 128 draws (shadow and 2560x1440 passes and their drops), which the old trace never showed.

No game data in this PR. AI-assisted.

**@⁠EduAzevedo** on GitHub · 2026-11-24 16:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/1254) `EduAzevedo:diag/black-frame-tail` → `main` · +181 −18 · 2 files · 2 commits · open Closes #954 (the branch was posted there while PR creation was limited to collaborators). Two commits on `ffe310e`: `2e2f167` (this change) and `83a8ec3` by @⁠andrewpozdnakov7-jpg, which marks the draw that actually failed instead of the latest trace entry (found by @⁠DrDarkDK in #954). ### Why The black-frame trace (`VICTORY_LOG=info,victory_gpu::draw=debug`) kept a frame's **first 256 draws**. A world frame runs thousands, so the trace stopped in the geometry passes and never reached the lighting, composite and full-screen draws that end the frame, which is what a black picture (#850, #293) is about. In a run on `integration/testers` every black frame in the world was cut at 256 lines, all of them G-buffer mesh draws. ### What - The trace keeps the **first and the last half** of the limit, with one line in between: `... N draws not kept here (VICTORY_BLACK_FRAME_DRAWS raises the limit)`. - `VICTORY_BLACK_FRAME_DRAWS=<n>` sets the limit (default 256, as before; at least 2). Documented in the README's diagnostics table. - Diagnostics builds only; release builds are unchanged. ### Tested - `cargo test -p victory-gpu --lib`: 55 passed, 0 failed, 1 ignored with both commits, including the new `frame_trace_tests` (a short frame is kept whole; a long frame keeps both ends and counts what was left out; an interleaved failure marks the draw that failed). No GPU needed. - `cargo clippy -p victory-gpu --all-targets -- -D warnings`, with and without `--features diagnostics`: clean. `cargo xtask policy`: 154 files ok. - In the title: RTX 2070 SUPER (driver 610.88), Windows 11 26200, diag build of `ffe310e` + #493 + #189 + #206 with this commit, `VICTORY_SHADER_LOOP_LIMIT=32`. Two black frames in the first world minutes now read `... 106 draws not kept here` and `... 1,108 draws not kept here`, followed by the frame's last 128 draws (shadow and 2560x1440 passes and their drops), which the old trace never showed. No game data in this PR. AI-assisted.
The black-frame trace kept a frame's first 256 draws. A world frame runs thousands, so the trace stopped in the geometry passes and never showed the lighting, composite and full-screen draws that end the frame, which is what a black picture is about.

It now keeps the first and the last half of the limit and says how many draws in between were left out. VICTORY_BLACK_FRAME_DRAWS sets the limit (default 256, as before). The drop mark still goes on the draw traced last when it was kept. Diagnostics builds only.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:25:11 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:19 UTC · original

Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: crates/victory-gpu/src/draw.rs). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/1254#issuecomment-7149438395) <!-- victory-triage v1 head=83a8ec3d081c54f86153387c9e3b5e6cc7b3220f verdict=needs-rebase at=2026-11-25T01:19:55Z --> Automated triage for the maintainers. **Needs rebase.** This pull request conflicts with `main` (conflicting: `crates/victory-gpu/src/draw.rs`). It will be reviewed once it is rebased onto the current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 07:10 UTC · original

I verified that this PR contains both 2e2f167 and 83a8ec3 with their original authors. I reproduced the conflict in draw.rs against 940d32f69b.

Rebased branch keeps two separate commits on that exact main, 8d4bd0a by EduAzevedo and 7ee2387 by andrewpozdnakov7-jpg. The rebase keeps the current draw failure reasons, command-list notes and GPU tests. Compute failures without a trace entry still get their command-list note.

All five frame-trace tests passed, including the interleaved failure and the late or evicted entries. The full GPU suite on WARP passed 151 tests with two ignored. Strict GPU Clippy passed with and without diagnostics, and asset policy passed. This branch is ready to use for the head update.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 07:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/1254#issuecomment-7155560466) I verified that this PR contains both 2e2f167 and 83a8ec3 with their original authors. I reproduced the conflict in draw.rs against 940d32f69b22265690a0b5a15d6ded572ba33baf. [Rebased branch](https://github.com/andrewpozdnakov7-jpg/VIctory/tree/rebase/1254-black-frame-trace) keeps two separate commits on that exact main, [8d4bd0a](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/8d4bd0aa2d97cc022d367008b96bd8cf7cfd562c) by EduAzevedo and [7ee2387](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/7ee2387cf6d6d2e528cce9cac55ee75e17829569) by andrewpozdnakov7-jpg. The rebase keeps the current draw failure reasons, command-list notes and GPU tests. Compute failures without a trace entry still get their command-list note. All five frame-trace tests passed, including the interleaved failure and the late or evicted entries. The full GPU suite on WARP passed 151 tests with two ignored. Strict GPU Clippy passed with and without diagnostics, and asset policy passed. This branch is ready to use for the head update.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-25 17:32 UTC · original

I moved both commits to current main 13f91caee2. ae4af79 retains EduAzevedo as Git author. d1f4e1a retains andrewpozdnakov7-jpg. Fork branch · ae4af79 · d1f4e1a

The five trace tests pass. The ten-draw fixture keeps draws 0, 1, 8 and 9 with a six-draw omission line. With the old last-entry rule the interleaved test marks the second draw. The updated code marks the first draw that actually failed. The late failure case keeps the next frame's trace intact. Serial GPU suite on WARP passed with 203 passed and 1 ignored with both debug flag settings. Strict GPU Clippy and repository policy passed.

If you fold the attribution fix or its test into another commit, please preserve the Git author or add this trailer.

Co-authored-by: andrewpozdnakov7-jpg [email protected]

AI-assisted. Synthetic tests only.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-25 17:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/1254#issuecomment-7169646176) I moved both commits to current main 13f91caee25f2fdf2c062be5f7a27f058e51cbca. ae4af79 retains EduAzevedo as Git author. d1f4e1a retains andrewpozdnakov7-jpg. [Fork branch](https://github.com/andrewpozdnakov7-jpg/VIctory/tree/rebase/1254-black-frame-trace-13f91ca) · [ae4af79](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/ae4af79a077cd62c4839e431e1481faf8000fa2a) · [d1f4e1a](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/d1f4e1af8893bbad1e75627899e4399c89c84071) The five trace tests pass. The ten-draw fixture keeps draws 0, 1, 8 and 9 with a six-draw omission line. With the old last-entry rule the interleaved test marks the second draw. The updated code marks the first draw that actually failed. The late failure case keeps the next frame's trace intact. Serial GPU suite on WARP passed with 203 passed and 1 ignored with both debug flag settings. Strict GPU Clippy and repository policy passed. If you fold the attribution fix or its test into another commit, please preserve the Git author or add this trailer. Co-authored-by: andrewpozdnakov7-jpg <[email protected]> AI-assisted. Synthetic tests only.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-26 01:28 UTC · original

I refreshed the two commits onto main 63bcca43c6a00a758510398fa43096ce7e4f7df0. The only conflict was the README diagnostics table. The rebase retains the current VICTORY_SKIP_PIPELINES wording and adds the draw trace setting.

In six paired runs of the same synthetic interleaving test, restoring the old last-entry rule marked the second draw. The rebased code marked the first draw, which is the one that failed. All five frame-trace tests and the full Windows/WARP GPU suite passed (251 passed, 1 ignored). Strict GPU Clippy passed with and without diagnostics. I also checked that the rebased branch composes cleanly with #2666 at 13a2b92.

If you carry over the second commit, please preserve its Git author. If you fold it into another commit, please add:

Co-authored-by: andrewpozdnakov7-jpg [email protected]

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-26 01:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/1254#issuecomment-7179804709) I refreshed the two commits onto main `63bcca43c6a00a758510398fa43096ce7e4f7df0`. The only conflict was the README diagnostics table. The rebase retains the current `VICTORY_SKIP_PIPELINES` wording and adds the draw trace setting. - [`1dff808` — trace retention, EduAzevedo](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/1dff808817563f6133f7fd9544d1389ad980758d) - [`6401ede` — mark the draw that failed, andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/6401ede7ac6f79064713ebc5a423ab730745d37b) In six paired runs of the same synthetic interleaving test, restoring the old last-entry rule marked the second draw. The rebased code marked the first draw, which is the one that failed. All five frame-trace tests and the full Windows/WARP GPU suite passed (251 passed, 1 ignored). Strict GPU Clippy passed with and without diagnostics. I also checked that the rebased branch composes cleanly with #2666 at `13a2b92`. If you carry over the second commit, please preserve its Git author. If you fold it into another commit, please add: Co-authored-by: andrewpozdnakov7-jpg <[email protected]>
This pull request has changes conflicting with the target branch.
  • README.md
  • crates/victory-gpu/src/draw.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1254/head:github-bot/gh-1254'
git switch 'github-bot/gh-1254'

Merge

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