GPU: a removal report names the call that removed the device #3260
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3260
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3260"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@potatoe0100 on GitHub · 2026-11-26 14:51 UTC · original
potatoe0100:removal-names-its-trigger→main· +159 −6 · 1 files · 1 commits · openWhat
With the D3D12 debug layer on,
failputs the debug layer's first error of the submission in the crash report. When the layer removed the device (RemoveDevice, ids 232/233), the report now leads with the errors of the call just before the removal, and keeps the first error after it when that was a different call. Without a removal message the text is the same as before.Why
The first error is often not what removed the device. A small D3D12 program on an RTX 4060 (driver 621.14, Windows 11, with and without the debug layer) shows:
GetResourceAllocationInfo,B5G5R5A1_UNORM+ unordered accessUINT64_MAX, error 599CreateCommittedResource,B5G5R5A1_UNORM+ unordered accessE_INVALIDARGCreateCommittedResource,B4G4R4A4_UNORMrender target + clear valueE_INVALIDARGCreateUnorderedAccessView, typedB5G5R5A1_UNORM/B4G4R4A4_UNORM0x887A0001, also without the debug layerCreateRenderTargetView,B4G4R4A4_UNORM0x887A0001, also without the debug layerSo in #3237 the 8 reports naming
GetResourceAllocationInfo(599) orCreateCommittedResource3(817) name a refused texture, which is only a failed call. The removal came from a view made later in the same submission (all of them predate #2462). With this change the report names that view.How
log_messagescollects the messages it logs and returnsremoval_cause(&seen).removal_causeis a plain function, so the choice is unit tested without removing the shared test device: 4 tests inhost::removal_cause_tests.Tested (RTX 4060 8 GB, driver 621.14, Windows 11 26300)
cargo test -p victory-gpu --lib --locked -- --test-threads=1: 233 passed, 2 failed, 1 ignored. The 2 failures are the known NVIDIA heap-cap ones (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views, #747), the same as onmain63bcca4.cargo clippy -p victory-gpu --all-targets -- -D warnings, with and without--features diagnostics: clean.cargo run -p xtask -- policy --staged: ok. rustfmt: no diffs in the changed lines.This touches
log_messagesonly; #2559 (theno breadcrumbswording) editsremoval_datain the same file. Each merges ontomainon its own.AI-assisted (Claude)
@Bj0rnis on GitHub · 2026-11-26 14:58 UTC · original
Verified head
bc19bdaeon Windows 11 (x64, Rust 1.98.1, NVIDIA GeForce RTX 5070 Ti + WARP):origin/main(63bcca43): cleancargo test -p victory-gpu --lib --features diagnostics): 248 passed, 2 failed, 1 ignored (2.95s) — the 2 failures are the pre-existing #1744 NVIDIA 1M view-heap cap failures onmain(descriptor::host::tests::dynamic_slots_are_held_until_released,memory::tests::lists_share_a_table_and_copies_keep_their_views); no regressions and all 4 new tests pass on hardwareVICTORY_D3D12_WARP=1): 250 passed, 0 failed, 1 ignored (1.94s)-p victory-gpu --lib --tests --features diagnostics -- -D warnings): clean (0 warnings)cargo xtask policy: 191 files okNot tested: live title workload / real device-removal fault under gameplay.
AI-assisted test run and summary.
@Dukestar69 on GitHub · 2026-11-26 15:11 UTC · original · approved these changes
Reviewed the diff and verified locally on Windows 11 x64:
removal_causecleanly surfaces the error(s) from the D3D12 call immediately precedingD3D12_MESSAGE_ID_DEVICE_REMOVAL_PROCESS_{AT_FAULT,POSSIBLY_AT_FAULT}while preserving the first error for context when it came from an earlier call.cargo test -p victory-gpu --lib host::removal_cause_tests:: -- --test-threads=1: 4 passed, 0 failed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.