GPU: a removal report without DRED names the switch, not "unsupported" #2559

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

@⁠Ingenioeren on GitHub · 2026-11-25 15:46 UTC · original
Ingenioeren:gpu-removal-without-dred → main · +43 −1 · 1 files · 1 commits · open

What

When the host device is removed and VICTORY_D3D12_DRED is not set, the report no longer passes on the runtime's DXGI_ERROR_UNSUPPORTED from GetAutoBreadcrumbsOutput. Instead it says that device-removed data is off and names the switch (VICTORY_D3D12_DRED=1 in a diagnostics build). With DRED on, the text is unchanged.

Why

removal_data runs on every removal, but DRED is only enabled with the switch. With DRED off, the report read:

host GPU device removed after a submission of N lists; no breadcrumbs (The specified device interface or feature level is not supported on this system. (0x887A0004)); device removed: ... (0x887A0005)

The 0x887A0004 there only means "breadcrumbs were not recorded", but it reads like the cause of the removal (an unsupported feature). That misled me while I was reading a local test run (WARP, diagnostics build without DRED). The real removal reason is the device removed: part that follows.

How

  • A small helper no_breadcrumbs(dred, &e) in crates/victory-gpu/src/host.rs, called where the inline format! was.
  • Regression test host::removal_report::breadcrumbs_off_names_the_switch_not_the_runtime_error. With DRED off, the text names the switch and has no 0x887A0004. With DRED on, it keeps the runtime error. The old inline text always contained the runtime error, so the first assertion pins the change.

Tested

  • cargo test -p victory-gpu: 196 passed, 1 ignored (Windows 11, RX 6750 XT)
  • cargo clippy -p victory-gpu --all-targets --all-features -- -D warnings: clean
  • cargo run -p xtask -- policy --staged: ok

Not tested: an actual device removal with this build. The tests share one device, so a removal can't be forced safely there. The change only touches the report string.

AI assistance: prepared with Claude Code, reviewed by Ingenioeren.

🤖 Generated with Claude Code

**@⁠Ingenioeren** on GitHub · 2026-11-25 15:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/2559) `Ingenioeren:gpu-removal-without-dred` → `main` · +43 −1 · 1 files · 1 commits · open ## What When the host device is removed and `VICTORY_D3D12_DRED` is not set, the report no longer passes on the runtime's `DXGI_ERROR_UNSUPPORTED` from `GetAutoBreadcrumbsOutput`. Instead it says that device-removed data is off and names the switch (`VICTORY_D3D12_DRED=1` in a diagnostics build). With DRED on, the text is unchanged. ## Why `removal_data` runs on every removal, but DRED is only enabled with the switch. With DRED off, the report read: ``` host GPU device removed after a submission of N lists; no breadcrumbs (The specified device interface or feature level is not supported on this system. (0x887A0004)); device removed: ... (0x887A0005) ``` The `0x887A0004` there only means "breadcrumbs were not recorded", but it reads like the cause of the removal (an unsupported feature). That misled me while I was reading a local test run (WARP, diagnostics build without DRED). The real removal reason is the `device removed:` part that follows. ## How - A small helper `no_breadcrumbs(dred, &e)` in `crates/victory-gpu/src/host.rs`, called where the inline `format!` was. - Regression test `host::removal_report::breadcrumbs_off_names_the_switch_not_the_runtime_error`. With DRED off, the text names the switch and has no `0x887A0004`. With DRED on, it keeps the runtime error. The old inline text always contained the runtime error, so the first assertion pins the change. ## Tested - `cargo test -p victory-gpu`: 196 passed, 1 ignored (Windows 11, RX 6750 XT) - `cargo clippy -p victory-gpu --all-targets --all-features -- -D warnings`: clean - `cargo run -p xtask -- policy --staged`: ok Not tested: an actual device removal with this build. The tests share one device, so a removal can't be forced safely there. The change only touches the report string. AI assistance: prepared with Claude Code, reviewed by Ingenioeren. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With VICTORY_D3D12_DRED unset, GetAutoBreadcrumbsOutput answers
DXGI_ERROR_UNSUPPORTED, and the removal report passed that on as
"no breadcrumbs (The specified device interface or feature level is not
supported on this system. (0x887A0004))", which reads like the cause of
the removal. Without device-removed data the report now says it is off
and names the switch; with it on, the runtime's error stays as before.

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

@⁠oni-swr on GitHub · 2026-11-25 16:12 UTC · original

Independent verification (software WARP only)

  • PR head: fb93084c31cf8d5e5b4f916fe49fc3def0191843 (checked out detached)
  • origin/main: 67e8ae1401df112248aed36d0024483181b718b7; read-only git merge-tree --write-tree origin/main <head> merges cleanly (exit 0); GitHub reports MERGEABLE.
  • Environment: Windows 11 Pro 10.0.26200, rustc 1.98.1, VICTORY_D3D12_WARP=1 with VICTORY_DXIL pointing at the Windows SDK 10.0.26100 dxil.dll. Default features, no extra test flags.
  • Not tested: hardware GPU, the title (no game files used).

Commands and results

  • cargo test --locked -p victory-gpu
  • focused: cargo test --locked -p victory-gpu --lib breadcrumbs_off_names
  • victory-gpu lib: 196 passed, 0 failed, 1 ignored; focused test: 1 passed.
  • Note: this head's merge base is one commit behind current main; the merge with main is still clean.

Review: Looks correct. Only the report text changes: with DRED off the unsupported-answer is replaced by a line naming VICTORY_D3D12_DRED=1; with DRED on the text is unchanged. The test pins both branches. A real device removal was not exercised (as the description also says).

Review and verification by Claude Code (Claude Sonnet 5.5), AI-assisted; no game files, dumps, shader names or hashes involved.

**@⁠oni-swr** on GitHub · 2026-11-25 16:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/2559#issuecomment-7167683133) **Independent verification (software WARP only)** - **PR head:** `fb93084c31cf8d5e5b4f916fe49fc3def0191843` (checked out detached) - **origin/main:** `67e8ae1401df112248aed36d0024483181b718b7`; read-only `git merge-tree --write-tree origin/main <head>` merges cleanly (exit 0); GitHub reports MERGEABLE. - **Environment:** Windows 11 Pro 10.0.26200, rustc 1.98.1, `VICTORY_D3D12_WARP=1` with `VICTORY_DXIL` pointing at the Windows SDK 10.0.26100 `dxil.dll`. Default features, no extra test flags. - **Not tested:** hardware GPU, the title (no game files used). **Commands and results** - `cargo test --locked -p victory-gpu` - focused: `cargo test --locked -p victory-gpu --lib breadcrumbs_off_names` - victory-gpu lib: 196 passed, 0 failed, 1 ignored; focused test: 1 passed. - Note: this head's merge base is one commit behind current main; the merge with main is still clean. **Review:** Looks correct. Only the report text changes: with DRED off the unsupported-answer is replaced by a line naming `VICTORY_D3D12_DRED=1`; with DRED on the text is unchanged. The test pins both branches. A real device removal was not exercised (as the description also says). Review and verification by Claude Code (Claude Sonnet 5.5), AI-assisted; no game files, dumps, shader names or hashes involved.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 18:39 UTC · original · edited 2026-11-25 20:22 UTC

Automated triage for the maintainers.

Merge candidate. In crates/victory-gpu/src/host.rs, the removal report now goes through a new no_breadcrumbs. When dred_on() is false and GetAutoBreadcrumbsOutput fails with DXGI_ERROR_UNSUPPORTED, the report says device-removed data is off and names VICTORY_D3D12_DRED=1, instead of passing on a "not supported" message that reads like the cause of the removal. Every other error, and every error with DRED on, is reported as before. I checked that dred_on() on main is gated on the diagnostics feature plus that switch, which matches the new wording. Two small tests pin both branches.

Reply to the author: thanks. Both points are addressed: only DXGI_ERROR_UNSUPPORTED is replaced now, and the rebased head passes CI.

CI: check passed (Windows).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 18:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/2559#issuecomment-7171207131) · edited 2026-11-25 20:22 UTC <!-- victory-triage v1 head=5209719faaec015c573d405b5c5083d281625088 verdict=merge-candidate at=2026-11-25T20:18:54Z --> Automated triage for the maintainers. **Merge candidate.** In `crates/victory-gpu/src/host.rs`, the removal report now goes through a new `no_breadcrumbs`. When `dred_on()` is false and `GetAutoBreadcrumbsOutput` fails with `DXGI_ERROR_UNSUPPORTED`, the report says device-removed data is off and names `VICTORY_D3D12_DRED=1`, instead of passing on a "not supported" message that reads like the cause of the removal. Every other error, and every error with DRED on, is reported as before. I checked that `dred_on()` on `main` is gated on the diagnostics feature plus that switch, which matches the new wording. Two small tests pin both branches. **Reply to the author:** thanks. Both points are addressed: only `DXGI_ERROR_UNSUPPORTED` is replaced now, and the rebased head passes CI. CI: `check` passed (Windows). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Ingenioeren on GitHub · 2026-11-25 19:02 UTC · original

Thanks for the triage. Both points are addressed in 5209719, which is rebased on current main (13f91ca):

  • With DRED off, only DXGI_ERROR_UNSUPPORTED is replaced now. Any other error from GetAutoBreadcrumbsOutput is reported as before. A new test, breadcrumbs_off_keeps_other_errors, checks that DXGI_ERROR_INVALID_CALL keeps its code.
  • The failed CI run had nothing to do with this change. The failing test was emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index in victory-shader, which is the heap_direct failure from #2571. This PR only touches crates/victory-gpu/src/host.rs. The push starts a new CI run.

Local results: cargo test --locked --offline -p victory-gpu passed (197 passed, 1 ignored), cargo clippy -p victory-gpu --all-targets gave no warnings, and cargo run -p xtask -- policy --staged passed.

**@⁠Ingenioeren** on GitHub · 2026-11-25 19:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/2559#issuecomment-7171733116) Thanks for the triage. Both points are addressed in 5209719, which is rebased on current `main` (13f91ca): - With DRED off, only `DXGI_ERROR_UNSUPPORTED` is replaced now. Any other error from `GetAutoBreadcrumbsOutput` is reported as before. A new test, `breadcrumbs_off_keeps_other_errors`, checks that `DXGI_ERROR_INVALID_CALL` keeps its code. - The failed CI run had nothing to do with this change. The failing test was `emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index` in victory-shader, which is the heap_direct failure from #2571. This PR only touches `crates/victory-gpu/src/host.rs`. The push starts a new CI run. Local results: `cargo test --locked --offline -p victory-gpu` passed (197 passed, 1 ignored), `cargo clippy -p victory-gpu --all-targets` gave no warnings, and `cargo run -p xtask -- policy --staged` passed.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 19:59 UTC · original · approved these changes

Verified locally merged onto origin/main (63bcca43) at PR head 5209719f (Windows 11 x64, NVIDIA RTX 5090 + Microsoft WARP, VICTORY_D3D12_DEBUG=1):

  • crates/victory-gpu/src/host.rs (removal_data lines 1470-1476, no_breadcrumbs lines 3327-3334): replaces DXGI_ERROR_UNSUPPORTED (0x887A0004) with the VICTORY_D3D12_DRED=1 in a diagnostics build hint only when !dred_on(), while preserving all other HRESULTs (e.g. DXGI_ERROR_INVALID_CALL) and all errors when DRED is enabled. Checked that dred_on() matches the diagnostics-feature gating described in the message across both default and diagnostics builds.
  • cargo xtask policy: 191 files ok.
  • cargo clippy --locked -p victory-gpu --all-targets -- -D warnings (default and --all-features): 0 warnings.
  • cargo test --locked -p victory-gpu --lib host::removal_report:: and --features diagnostics: 2/2 passed in both configurations on RTX 5090 and WARP (breadcrumbs_off_names_the_switch_not_the_runtime_error, breadcrumbs_off_keeps_other_errors).
  • Also verified a clean co-merge with #2273 (both touch host.rs) with clippy and GPU tests passing.

Synthetic tests only; looks ready to merge.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 19:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/2559#pullrequestreview-6079893458) · **approved these changes** Verified locally merged onto `origin/main` (`63bcca43`) at PR head `5209719f` (Windows 11 x64, NVIDIA RTX 5090 + Microsoft WARP, `VICTORY_D3D12_DEBUG=1`): - `crates/victory-gpu/src/host.rs` (`removal_data` lines 1470-1476, `no_breadcrumbs` lines 3327-3334): replaces `DXGI_ERROR_UNSUPPORTED` (`0x887A0004`) with the `VICTORY_D3D12_DRED=1 in a diagnostics build` hint only when `!dred_on()`, while preserving all other HRESULTs (e.g. `DXGI_ERROR_INVALID_CALL`) and all errors when DRED is enabled. Checked that `dred_on()` matches the diagnostics-feature gating described in the message across both default and diagnostics builds. - `cargo xtask policy`: 191 files ok. - `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings` (default and `--all-features`): 0 warnings. - `cargo test --locked -p victory-gpu --lib host::removal_report::` and `--features diagnostics`: 2/2 passed in both configurations on RTX 5090 and WARP (`breadcrumbs_off_names_the_switch_not_the_runtime_error`, `breadcrumbs_off_keeps_other_errors`). - Also verified a clean co-merge with `#2273` (both touch `host.rs`) with clippy and GPU tests passing. Synthetic tests only; looks ready to merge.
Author
Owner

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

LGTM — verified on Windows against origin/main (63bcca4).

  • Replacing DXGI_ERROR_UNSUPPORTED with an actionable hint pointing to VICTORY_D3D12_DRED=1 when DRED is off (while preserving all other errors and DRED-on errors verbatim) makes GPU removal reports much clearer.
  • cargo test -p victory-gpu --lib host::removal_report:: -- --test-threads=1: 2 passed, 0 failed.
  • cargo clippy -p victory-gpu --all-targets -- -D warnings (default + --features diagnostics): clean.
  • cargo xtask policy: 191 files ok.

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

**@⁠Dukestar69** on GitHub · 2026-11-26 20:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/2559#pullrequestreview-6080040207) · **approved these changes** LGTM — verified on Windows against `origin/main` (`63bcca4`). - Replacing `DXGI_ERROR_UNSUPPORTED` with an actionable hint pointing to `VICTORY_D3D12_DRED=1` when DRED is off (while preserving all other errors and DRED-on errors verbatim) makes GPU removal reports much clearer. - `cargo test -p victory-gpu --lib host::removal_report:: -- --test-threads=1`: 2 passed, 0 failed. - `cargo clippy -p victory-gpu --all-targets -- -D warnings` (default + `--features diagnostics`): clean. - `cargo xtask policy`: 191 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/2559/head:github-bot/gh-2559'
git switch 'github-bot/gh-2559'

Merge

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