Release builds keep the faulting address of a lost device; VICTORY_D3D12_DRED=light gives them the breadcrumbs #3701
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3701
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3701"
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?
@Lyrnc on GitHub · 2026-11-30 04:21 UTC · original
Lyrnc:fix/release-dred→main· +330 −133 · 5 files · 1 commits · closed without mergingProblem
A release build cannot say where a lost device stopped. Every
VICTORY_D3D12_DREDswitch (dred_on,dred_light,dred_faultsinhost.rs) wascfg!(feature = "diagnostics") && ..., so a release build never asked the runtime for device-removed data. When a submission then found the device removed,removal_datagotDXGI_ERROR_UNSUPPORTEDfromGetAutoBreadcrumbsOutputand printedno breadcrumbs (0x887A0004). That line is in many device-loss reports (#2644, #2980, #3230 and others). The diagnostics build, the only way to get the data, has often not compiled (#2908, and main's own41adb551).The settings are the runtime's own (
D3D12GetDebugInterfaceforID3D12DeviceRemovedExtendedDataSettings) and need no debug layer, so a release build can have them.Fix
VICTORY_D3D12_DREDis read once into aDredmode (dred_of, by build):faults0faultslight1)light(a release build has no texts)=1didfaultsis the release default. It has no breadcrumbs, no markers and no texts. The code already called it "costs next to nothing, can stay on while the title is played", andscripts/play.ps1runs with it. With it,host::namegives our objects their names in a release build too, so the report can name the allocation that was hit.lightworks in release builds. What the report needs for it is no longer diagnostics-only: the lists' notes for a report made on another thread (LIST_NOTES, now a structListNotesand alist_notedhelper), the record of each list's indirect executions (host::indirects), the last user data bound (draw::State::user, kept only while breadcrumbs are on),describe_slot(s)andindirects_around. Marker texts stay diagnostics-only.removal_report(device, runs, mode)(split out ofremoval_data, andbreadcrumbs()out of that) saysno device-removed data (VICTORY_D3D12_DRED=0)(in a diagnostics build, that it keeps it with=faults,lightor1),no page-fault data (<error>), or withfaultsand no fault,no page fault (VICTORY_D3D12_DRED=light names the command a list stopped at), instead ofno breadcrumbs (0x887A0004).docs/README-fxceless.md: the switch's row gives the three values and the release default.Verification
Windows 11, rustc 1.98.1 (the pinned toolchain), Ryzen 7 9800X3D. On
c65cbb6d(rebased onto41adb551), target directoryC:\gt-dred, every build log showingvictory-gpubuilt fromC:\g-dred\crates\victory-gpu:cargo check -p victory-gpu --locked -j 6: passes.cargo check -p victory-gpu --features diagnostics --locked -j 6: passes. Both have the same 18 victory-gpu warnings as main, none in the lines this touches.cargo test -p victory-gpu --lib --locked -j 6 -- host::: 220 passed, 0 failed, 27 ignored (main41adb551with the same filter: 215 passed, 26 ignored). The first run of this filter had 2 failures in tests this does not touch,host::card_steps::tests::places_written_after_sending_are_learnedandhost::menu::tests::a_change_is_saved_at_once_however_the_game_was_started(global state shared between tests; #3618 is about the menu one). They passed alone and in the second run of the whole filter.--features diagnostics: 227 passed, 0 failed, 27 ignored.device_removed_data_by_the_switch_and_the_build: the table above, value by value, for both builds.breadcrumbs_name_where_a_list_stopped: two nodes linked as the runtime links them. The one that finished is counted, not named. The one that stopped at an indirect execution is named with its commands between barriers, what that execution ran (found throughLIST_NOTESby the list's name, as for a report from another thread) and its pipelines.a_list_is_found_by_the_number_in_its_name: now in release builds too.a_removed_device_has_the_runtimes_breadcrumbs(ignored by default: it removes the process's WARP device). Run alone,cargo test -p victory-gpu --lib removed_device -- --ignored --test-threads=1: 1 passed, in the release build and in the diagnostics build. It asks for the settings with no debug layer, makes a WARP device, runs a list, removes the device (ID3D12Device5::RemoveDevice), and checks thatlightgives the runtime's breadcrumbs,faultssays "no page fault ...", and0says it kept none.cargo clippy -p victory-gpu --all-targets --locked -j 6, and the same with--features diagnostics: finish with warnings only. None is on a line this adds (checked againstgit diff -U0 41adb551 c65cbb6d), and in the four files it touches the warnings are the same, kind by kind, as main's.NOT tested
faults) is not measured. Two things are new in a release build by default: the runtime's page-fault tracking (it records allocations as they are made and freed), and aSetName(a formatted name and anHSTRING) on each objecthost::nameis called for: about 50 places (35 outsidehost.rs) that make textures, buffers, title-memory copies and pipelines. The triage note asked for an fps A/B withfaultsand withlightbefore proposing a default: not done. If the A/B shows a cost, release can default to none (one line indred_of).lightin a release build is not measured either. The 37 ms of card time a frame (RTX 2080 Ti) is the existing figure for breadcrumbs, fromscripts/play.ps1.Overlap
gh pr list --state open --search: "DRED", "breadcrumbs", "device removed", "0x887A0004", "page fault", "D3D12_DRED". No open PR makes device-removed data work in release builds.fix/indirect-null-slot, open): touches the same code (ran_indirect,describe_slots,host::indirects, the user data indraw.rs). It adds atablesargument and auser_tablesfield, still under#[cfg(feature = "diagnostics")].git merge-treeof the two: conflicts in 5 hunks in 4 files (descriptor/host.rs1,draw.rs3,host.rs1,host/indirects.rs1). All are the same kind: this branch removes acfg(diagnostics)where #3686 changes the signature. Whichever lands second takes the other's signature, drops the cfg, and un-gatesuser_tablesandtable_words(and usesdred_breadcrumbs()where #3686 hasdred_on() || dred_light()).host.rs: merges cleanly.41adb551.AI use
Claude Code (Claude Opus 5.5) wrote the change and its tests, ran the checks listed above, and wrote this note. Nothing was run in game.
🤖 Generated with Claude Code
c65cbb6deato450a847844450a847844to8270c5fc1e@trustno1-coder on GitHub · 2026-12-01 18:49 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed