GPU: name the switch when a removal has no device-removed data #537

Open
coderanonymus wants to merge 1 commit from upstream-pr/537 into main
coderanonymus commented 2026-11-24 04:39:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by coderanonymus on 2026-11-24T04:39:21Z.


Two points from #468, neither covered by an open PR.

What

The removal report names the switch instead of an "unsupported" error. Without VICTORY_D3D12_DRED, removal_data still queried the device-removed data. The breadcrumb query then fails with DXGI_ERROR_UNSUPPORTED, and the report read:

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

As #468 notes, that reads like a missing GPU feature. It is only missing DRED data. When device-removed data is off, the report now says how to get it, the same way fail already gives the debug-layer hint:

host GPU device removed after a submission of 32 lists; a diagnostics build with VICTORY_D3D12_DRED=1 records where the GPU stopped; device removed: ...

The removal reason (GetDeviceRemovedReason) is still appended by fail, as before.

README: the GPU timeout. On slower GPUs a world frame can outlast Windows' default 2 s GPU timeout. Windows then removes the device as hung (slow host submission ms=5773 just before it in #468). The reporter found that raising TdrDelay and TdrDdiDelay stops that reset. The README warning now says so, in one sentence.

Verification

  • cargo clippy -p victory-gpu --target x86_64-pc-windows-msvc, with and without --features diagnostics: no new warnings.
  • rustfmt: no diffs in the changed lines.
  • Not run on a GPU. The change only affects the text of a failure report.

No game data used.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6574741618 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/537). Originally posted by [coderanonymus](https://github.com/coderanonymus) on 2026-11-24T04:39:21Z. --- Two points from #468, neither covered by an open PR. ## What **The removal report names the switch instead of an "unsupported" error.** Without `VICTORY_D3D12_DRED`, `removal_data` still queried the device-removed data. The breadcrumb query then fails with `DXGI_ERROR_UNSUPPORTED`, and the report read: ``` host GPU device removed after a submission of 32 lists; no breadcrumbs (The specified device interface or feature level is not supported on this system. (0x887A0004)) ``` As #468 notes, that reads like a missing GPU feature. It is only missing DRED data. When device-removed data is off, the report now says how to get it, the same way `fail` already gives the debug-layer hint: ``` host GPU device removed after a submission of 32 lists; a diagnostics build with VICTORY_D3D12_DRED=1 records where the GPU stopped; device removed: ... ``` The removal reason (`GetDeviceRemovedReason`) is still appended by `fail`, as before. **README: the GPU timeout.** On slower GPUs a world frame can outlast Windows' default 2 s GPU timeout. Windows then removes the device as hung (`slow host submission ms=5773` just before it in #468). The reporter found that raising `TdrDelay` and `TdrDdiDelay` stops that reset. The README warning now says so, in one sentence. ## Verification - `cargo clippy -p victory-gpu --target x86_64-pc-windows-msvc`, with and without `--features diagnostics`: no new warnings. - `rustfmt`: no diffs in the changed lines. - Not run on a GPU. The change only affects the text of a failure report. No game data used. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
mercuryVM commented 2026-11-24 07:07:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T07:04:11Z.

Review: APPROVED


Tested 2021e0f on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (264 passed, 0 failed).

  • dred_on() is cfg!(diagnostics) && VICTORY_D3D12_DRED set. Returning the hint before the breadcrumb queries means a run without DRED no longer reports DXGI_ERROR_UNSUPPORTED, which read like a missing GPU feature. The removal reason is still appended by the caller, as your example shows.
  • README: raising TdrDelay/TdrDdiDelay is a known workaround for long submissions. It is a system-wide change, and with it a truly hung GPU takes up to 60 s to recover for every app, not just VIctory. One sentence saying so, and saying to remove the values afterwards, would make the advice safer.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:review:6035011225 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/537#pullrequestreview-6035011225). Originally posted by [mercuryVM](https://github.com/mercuryVM) on 2026-11-24T07:04:11Z. **Review:** APPROVED --- Tested 2021e0f on Windows 11, RTX 5070, MSVC: `cargo test --workspace --no-fail-fast` passes (264 passed, 0 failed). - `dred_on()` is `cfg!(diagnostics) && VICTORY_D3D12_DRED set`. Returning the hint before the breadcrumb queries means a run without DRED no longer reports `DXGI_ERROR_UNSUPPORTED`, which read like a missing GPU feature. The removal reason is still appended by the caller, as your example shows. - README: raising `TdrDelay`/`TdrDdiDelay` is a known workaround for long submissions. It is a system-wide change, and with it a truly hung GPU takes up to 60 s to recover for every app, not just VIctory. One sentence saying so, and saying to remove the values afterwards, would make the advice safer. AI-assisted (Claude Code).
Yorivel commented 2026-11-24 10:03:48 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Yorivel on 2026-11-24T09:38:44Z.


Checked on current main (8e79c80): the branch merges without conflicts, and cargo clippy -p victory-gpu --all-targets -- -D warnings is clean with and without --features diagnostics; rustfmt reports no diffs in the changed lines (Windows 11 26300, MSVC, Rust 1.98.1).

On the code: in a release build dred_on() is always false, so on main every removal report carries the no breadcrumbs (… 0x887A0004) text, and the closing hint only names VICTORY_D3D12_DEBUG, which doesn't give the breadcrumbs. The early return here replaces that with the switch that does. Not run against a removed device.

Written with Claude Code.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7127694451 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/537#issuecomment-7127694451). Originally posted by [Yorivel](https://github.com/Yorivel) on 2026-11-24T09:38:44Z. --- Checked on current `main` (`8e79c80`): the branch merges without conflicts, and `cargo clippy -p victory-gpu --all-targets -- -D warnings` is clean with and without `--features diagnostics`; rustfmt reports no diffs in the changed lines (Windows 11 26300, MSVC, Rust 1.98.1). On the code: in a release build `dred_on()` is always false, so on `main` every removal report carries the `no breadcrumbs (… 0x887A0004)` text, and the closing hint only names `VICTORY_D3D12_DEBUG`, which doesn't give the breadcrumbs. The early return here replaces that with the switch that does. Not run against a removed device. Written with Claude Code.
sennecools commented 2026-11-24 11:04:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by sennecools on 2026-11-24T10:29:17Z.


Checked against a real device removal on an RX 9070 XT (RDNA 4), Windows 11 Pro 26300. The build was a diag build of main 8e79c80 + this PR at 2021e0f. It also included #493 and #427, which do not touch removal_data.

  • Without VICTORY_D3D12_DRED: one offline run. The device was removed (DXGI_ERROR_DEVICE_HUNG) after 245 s. The report gives the new hint, and there is no "not supported" error in it.
  • With VICTORY_D3D12_DRED=1: six offline runs. Every report still has its breadcrumbs, and none of them contains the hint.

On the README sentence: the bounded root SRV runs on this card also ended as hung, after submissions of up to 2.6 s. That fits the timeout case it describes.

No game data is in this comment.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7128846788 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/537#issuecomment-7128846788). Originally posted by [sennecools](https://github.com/sennecools) on 2026-11-24T10:29:17Z. --- Checked against a real device removal on an RX 9070 XT (RDNA 4), Windows 11 Pro 26300. The build was a diag build of `main` 8e79c80 + this PR at 2021e0f. It also included #493 and #427, which do not touch `removal_data`. - **Without `VICTORY_D3D12_DRED`:** one offline run. The device was removed (`DXGI_ERROR_DEVICE_HUNG`) after 245 s. The report gives the new hint, and there is no "not supported" error in it. - **With `VICTORY_D3D12_DRED=1`:** six offline runs. Every report still has its breadcrumbs, and none of them contains the hint. On the README sentence: the bounded root SRV runs on this card also ended as hung, after submissions of up to 2.6 s. That fits the timeout case it describes. No game data is in this comment. AI-assisted (Claude Code).
Marvisak commented 2026-11-25 01:07:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:24:22Z.


Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: README.md.

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


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148475596 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/537#issuecomment-7148475596). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:24:22Z. --- <!-- victory-triage v1 head=2021e0f26970a164dbb58db0a266423057f58564 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`. 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 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/537:upstream-pr/537'
git switch 'upstream-pr/537'

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/537'
git switch 'upstream-pr/537'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/537'
git switch 'upstream-pr/537'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/537'
git switch 'main'
git merge --squash 'upstream-pr/537'
git switch 'main'
git merge --ff-only 'upstream-pr/537'
git switch 'main'
git merge 'upstream-pr/537'
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!537
No description provided.