GPU: find a list in the DRED breadcrumbs by its name, not only its pointer #669
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/669"
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?
Imported from Marvisak/VIctory. Originally posted by iurysf on 2026-11-24T06:30:39Z.
With
VICTORY_D3D12_DRED=1, every list in the device-removed report shows asNone.removal_datacomparesas_raw()of the host list with the node'spCommandList, and on an RTX 4070 (driver 32.0.16.2101, maind2a4bae) no pointer ever matches, with or without the debug layer:"2/2 None", "24/24 None", ...on every node.victory host list <n>when it is made. A node is matched by the name the runtime copied (pCommandListDebugNameWor...A) as well as by pointer.victory host list <n> (debug layer indirect). So the name is matched exactly or followed by(, never as the prefix of another number (...1580does not match...158).IUnknown,ID3D12Object,ID3D12DeviceChild,ID3D12CommandList). The node's pointer is never dereferenced, because a node can name a list that is long released.On the GPU (RTX 4070, main
d2a4bae+ this PR, no other fixes, so the device still goes):DEBUG=1+DRED=1Some(0)…Some(22))144/926 Some(21)DRED=1only0/25 Some(12)None)The stalled node now names the list that hung and how far it got.
The branch has three commits: the name match, a position-based fallback, and the commit that replaces that fallback with the debug-layer suffix match. The net diff is +221/−11 in
host.rs, about half of it tests, so a squash merge reads best.Tests (WARP,
--test-threads=1): the new unit tests cover pointer and name matching, the debug-layer suffix, and the negative cases (...1580,...7(). Without the suffix branch they fail.cargo test -p victory-gpu: 46 passed, 1 ignored (48 with diagnostics);cargo test -p victory-shader: 69 passed. Clippy shows no new warnings;cargo xtask policyis ok.One run of each configuration, with the host CPU busy. No game data used. AI-assisted.
Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T06:38:39Z.
Review: APPROVED
LGTM! Tested on Windows 11 with MSVC Rust 1.98.1. All 46 tests in ictory-gpu passed cleanly, including the three new tests (_breadcrumb_node_is_found_by_pointer_or_by_name, _list_knows_every_pointer_it_answers_with, and is_node_reads_the_name_the_runtime_copied). Matching DRED breadcrumb command lists by both name and interface pointers resolves the None issue caused by debug layer wrapping and interface polymorphism.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T06:56:24Z.
Review: COMMENTED
Static review only (victory-gpu is Windows/D3D12; the tests need a D3D12 device, which I don't have on macOS):
node_is_list/list_namelogic, COM identity pointers viaQueryInterfaceon a WARP device, and a hand-builtD3D12_AUTO_BREADCRUMB_NODE. The name-fallback matching (name matches even when the pointer is another object) is intentional per the doc comment and covered bya_list_knows_every_pointer_it_answers_with.identities()only queries live objects and compares node pointers by value — correct call given device-removed nodes can name released lists.victory host list Nonly when DRED is enabled keeps normal runs unchanged.Can't execute the WARP tests here; the logic reads sound.
Imported from Marvisak/VIctory. Originally posted by iurysf on 2026-11-24T08:01:20Z.
Update: the debug-layer case is fixed now. With
VICTORY_D3D12_DEBUG=1, the runtime records our list name with a(debug layer indirect)suffix, so the name now matches exactly or followed by(. On the RTX 4070 withDEBUG=1+DRED=1, the stalled node is144/926 Some(21), and list 21 (130 commands) is the 5,524 ms slow list in the log. The description has the table. Thanks @LAKSHYA-cmd-tech and @catminou4 for the reviews; the new commit52d528badds the suffix match and its negative tests.Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T10:44:48Z.
Review: APPROVED
Tested
52d528bon Windows 11, RTX 5070, MSVC:cargo test -p victory-gpu -- --test-threads=146 passed, and with--features diagnostics48 passed.cargo check -p victory-gpu --features diagnostics --testsis clean. I didn't trigger a device removal here, so I haven't reproduced the "None on every node" report myself.pCommandListDebugNameW, thenpCommandListDebugNameA, as a fallback when no pointer matches is the right order. The tests cover a missing wide name and a longer name with the same prefix (victory host list 1vs… 10).identitiescollecting every interface pointer the list answers with is a sensible guess at why the raw pointer never matched (the runtime keeps the pointer of a different interface).AI-assisted (Claude Code).