GPU: find a list in the DRED breadcrumbs by its name, not only its pointer #669
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!669
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/669/head"
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?
@iurysf on GitHub · 2026-11-24 06:30 UTC · original
iurysf:dred-breadcrumb-identity→main· +221 −11 · 1 files · 3 commits · merged 2026-11-25 00:16 UTCWith
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.
The device-removed report matched a breadcrumb node to a submitted list by comparing `as_raw()` of the list with the node's `pCommandList`. On an RTX 4070 no node ever matched, even without the debug layer: every list was reported as `None`. With device-removed data on, each host list is now named ("victory host list <n>") when it is made, and a node is also matched by the name the runtime copied (`pCommandListDebugNameW`). The pointer is still compared first, against every interface pointer our live list answers with (its own, IUnknown, ID3D12Object, ID3D12DeviceChild, ID3D12CommandList). The node's pointer is only compared, never dereferenced: a node may name a list that is long released. With the debug layer on (`VICTORY_D3D12_DEBUG=1`) the nodes still do not match; that case is left open. Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>A run on an RTX 4070 with the debug layer on showed why a list's name did not match a node: the runtime appends its own note to the name we gave, as in "victory host list 158 (debug layer indirect)". The name now matches exactly or followed by " (", and never as the start of another number ("victory host list 1580"). Both name fields of the node are read, as before. That makes the sentinel list and the matching by position of the previous commit unnecessary, so they are removed, together with the extra private data keys it set: lists are named with SetName again. The warning that logs the last node's pointer and names when no node matches a list stays. Tests: the name with the note matches in the wide and the ANSI field, a longer number and a name without the " (" do not; with the match for the exact name disabled or loosened to a prefix, the tests fail. Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>@iurysf on GitHub · 2026-11-24 08:01 UTC · original
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.