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

Open
EduAzevedo wants to merge 2 commits from upstream-pr/1254 into main
EduAzevedo commented 2026-11-24 16:49:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by EduAzevedo on 2026-11-24T16:49:25Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6586901296 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1254). Originally posted by [EduAzevedo](https://github.com/EduAzevedo) on 2026-11-24T16:49:25Z. --- 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.
copilot-pull-request-reviewer[bot commented 2026-11-24 17:04:06 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-24T16:49:46Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

<!-- greyfinch-sync:Marvisak/VIctory:review:6043585464 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1254#pullrequestreview-6043585464). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/copilot-pull-request-reviewer%5Bbot%5D) on 2026-11-24T16:49:46Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Marvisak commented 2026-11-25 02:05:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:19:57Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149438395 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1254#issuecomment-7149438395). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:19:57Z. --- <!-- 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)_
andrewpozdnakov7-jpg commented 2026-11-25 08:06:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T07:10:00Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7155560466 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1254#issuecomment-7155560466). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-25T07:10:00Z. --- 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.
andrewpozdnakov7-jpg commented 2026-11-25 18:02:45 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T17:32:18Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7169646176 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1254#issuecomment-7169646176). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-25T17:32:18Z. --- 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.
andrewpozdnakov7-jpg commented 2026-11-26 02:07:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T01:28:18Z.


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]

<!-- greyfinch-sync:Marvisak/VIctory:comment:7179804709 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1254#issuecomment-7179804709). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-26T01:28:18Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1254:upstream-pr/1254'
git switch 'upstream-pr/1254'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1254'
git switch 'upstream-pr/1254'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1254'
git switch 'upstream-pr/1254'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1254'
git switch 'main'
git merge --squash 'upstream-pr/1254'
git switch 'main'
git merge --ff-only 'upstream-pr/1254'
git switch 'main'
git merge 'upstream-pr/1254'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1254
No description provided.