GPU: name the commands at a DRED stop, and dump translated shaders #279

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

@⁠ALFREDOHDEZ on GitHub · 2026-11-24 02:01 UTC · original
ALFREDOHDEZ:gpu/dred-stop-point-and-shader-dump → main · +42 −3 · 3 files · 1 commits · open

What

Two diagnostics changes that came out of looking at the NVIDIA world hang (#71, #97). Neither changes what a release build does.

  • DRED report names the commands at the stop. in_flight() listed the first 12 commands after the barrier before the stop. In a long run between two barriers, that can miss the commands at the stop. It now names up to 40 commands, starting a few before the stop. (Work between barriers overlaps, so the first commands may still be running too; they are no longer listed when the run is long.)
  • VICTORY_SHADER_DUMP=<dir> (diagnostics builds only). When a shader is translated, it writes the container as <hash>.bin and, if translation succeeds, its DXIL as <hash>.dxil, keyed by the same 16-digit hash the DRED and VICTORY_GPU_TIMING lines print, so it can go to dxc -dumpbin. Documented in the README's debugging table.

Tested

Windows 11, RTX 4070, main at d2a4bae.

  • New unit test in_flight_names_the_commands_at_the_stop: 100 marked dispatches between two barriers, stop at dispatch 80. The report names dispatches 79 and 80 and not dispatch 0. It passes with and without --features diagnostics.
  • On the title (diag build, VICTORY_D3D12_DRED=1): for a list stopped at command 203 of 518 (op 6), in a run 20..348, the report starts at command 199.
  • VICTORY_SHADER_DUMP wrote 2,059 .bin and 1,698 .dxil files in one run; dxc -dumpbin read the ones I tried.
  • cargo xtask policy --staged: 3 files ok. I did not run cargo test --workspace.

Edited: an earlier version of this description gave a wrong dump count and a wrong before/after example.

🤖 Generated with Claude Code

**@⁠ALFREDOHDEZ** on GitHub · 2026-11-24 02:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/279) `ALFREDOHDEZ:gpu/dred-stop-point-and-shader-dump` → `main` · +42 −3 · 3 files · 1 commits · open ## What Two diagnostics changes that came out of looking at the NVIDIA world hang (#71, #97). Neither changes what a release build does. - **DRED report names the commands at the stop.** `in_flight()` listed the first 12 commands after the barrier before the stop. In a long run between two barriers, that can miss the commands at the stop. It now names up to 40 commands, starting a few before the stop. (Work between barriers overlaps, so the first commands may still be running too; they are no longer listed when the run is long.) - **`VICTORY_SHADER_DUMP=<dir>`** (diagnostics builds only). When a shader is translated, it writes the container as `<hash>.bin` and, if translation succeeds, its DXIL as `<hash>.dxil`, keyed by the same 16-digit hash the DRED and `VICTORY_GPU_TIMING` lines print, so it can go to `dxc -dumpbin`. Documented in the README's debugging table. ## Tested Windows 11, RTX 4070, `main` at `d2a4bae`. - New unit test `in_flight_names_the_commands_at_the_stop`: 100 marked dispatches between two barriers, stop at dispatch 80. The report names dispatches 79 and 80 and not dispatch 0. It passes with and without `--features diagnostics`. - On the title (diag build, `VICTORY_D3D12_DRED=1`): for `a list stopped at command 203 of 518 (op 6)`, in a run `20..348`, the report starts at command 199. - `VICTORY_SHADER_DUMP` wrote 2,059 `.bin` and 1,698 `.dxil` files in one run; `dxc -dumpbin` read the ones I tried. - `cargo xtask policy --staged`: 3 files ok. I did not run `cargo test --workspace`. Edited: an earlier version of this description gave a wrong dump count and a wrong before/after example. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
When a list stops deep in a long run of commands between two barriers,
the device-removed report listed the first 12 commands after the barrier.
Those have usually finished; the ones still running come after the stop.
It now names up to 40 commands from a few before the stop on (test
added).

VICTORY_SHADER_DUMP=<dir> (diagnostics builds) writes each shader
container and its DXIL as <hash>.bin / <hash>.dxil when it is translated,
so a hash from a DRED or timing line can be disassembled with
`dxc -dumpbin`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:57:44 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-24 04:12 UTC · original · edited 2026-11-24 04:14 UTC

Tested PR #279 at head 02f0e29f8031d7b97353e9b90f6bbab5495b6b10 (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at 02f0e29f8031d7b97353e9b90f6bbab5495b6b10.

  • cargo test --locked -p victory-gpu --features diagnostics in_flight_names_the_commands_at_the_stop — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 46 filtered out; finished in 0.00s ); cases: host::tests::in_flight_names_the_commands_at_the_stop.

Behavior covered: Checks diagnostic output names commands in flight at a stop, with the diagnostics feature enabled.
Code: crates/victory-gpu/src/host.rs, crates/victory-gpu/src/pipeline.rs

**@⁠jeremygold02** on GitHub · 2026-11-24 04:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/279#issuecomment-7121806298) · edited 2026-11-24 04:14 UTC Tested PR #279 at head `02f0e29f8031d7b97353e9b90f6bbab5495b6b10` (state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at `02f0e29f8031d7b97353e9b90f6bbab5495b6b10`. - `cargo test --locked -p victory-gpu --features diagnostics in_flight_names_the_commands_at_the_stop` — passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 46 filtered out; finished in 0.00s ); cases: host::tests::in_flight_names_the_commands_at_the_stop. Behavior covered: Checks diagnostic output names commands in flight at a stop, with the diagnostics feature enabled. Code: [crates/victory-gpu/src/host.rs](https://github.com/Marvisak/VIctory/blob/02f0e29f8031d7b97353e9b90f6bbab5495b6b10/crates/victory-gpu/src/host.rs), [crates/victory-gpu/src/pipeline.rs](https://github.com/Marvisak/VIctory/blob/02f0e29f8031d7b97353e9b90f6bbab5495b6b10/crates/victory-gpu/src/pipeline.rs)
Author
Owner

@⁠ghost on GitHub · 2026-11-24 05:51 UTC · original

Review note on head 02f0e29: the VICTORY_SHADER_DUMP writer (crates/victory-gpu/src/pipeline.rs:114) writes the title's shader containers and their DXIL with create_dir_all / fs::write. It doesn't call victory_core::ensure_outside_repo first.

docs/asset-policy.md ("Enforcement", point 3) asks every writer of derived data to call it, so that a dump directory pointed inside a checkout is refused. One call before create_dir_all would cover it.

Read-only review, nothing built. AI-assisted (Claude Code); the claim above was checked against this head and main at d2a4bae. Context: the triage in #366.

**@⁠ghost** on GitHub · 2026-11-24 05:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/279#issuecomment-7123333107) Review note on head `02f0e29`: the `VICTORY_SHADER_DUMP` writer (`crates/victory-gpu/src/pipeline.rs:114`) writes the title's shader containers and their DXIL with `create_dir_all` / `fs::write`. It doesn't call `victory_core::ensure_outside_repo` first. `docs/asset-policy.md` ("Enforcement", point 3) asks every writer of derived data to call it, so that a dump directory pointed inside a checkout is refused. One call before `create_dir_all` would cover it. _Read-only review, nothing built. AI-assisted (Claude Code); the claim above was checked against this head and `main` at `d2a4bae`. Context: the triage in #366._
Author
Owner

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

Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: README.md, crates/victory-gpu/src/pipeline.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 00:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/279#issuecomment-7148500514) <!-- victory-triage v1 head=02f0e29f8031d7b97353e9b90f6bbab5495b6b10 verdict=needs-rebase at=2026-11-25T00:13:20Z --> Automated triage for the maintainers. **Needs rebase.** This PR does not merge cleanly into current `main` (ac2525d). Conflicting files: `README.md`, `crates/victory-gpu/src/pipeline.rs`. The content has not been reviewed yet; it will be once the branch is rebased onto `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • README.md
  • crates/victory-gpu/src/host.rs
  • crates/victory-gpu/src/pipeline.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/279/head:github-bot/gh-279'
git switch 'github-bot/gh-279'

Merge

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