d3d12_xs: name the group counts of each Dispatch in the TOMBOX_DRED=2 report #273
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!273
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/273/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?
@GDAgent on GitHub · 2026-11-23 10:39 UTC · original
GDAgent:fix/d3d12-dred-dispatch-groups→main· +69 −6 · 2 files · 1 commits · closed without mergingLibrary / area:
d3d12_xs(dred_marks.rs, two log strings indred.rs)Exports changed (exports.txt rows): none
Why: with
TOMBOX_DRED=2, a device-removal report names the PSO (the Xbox shader hashes) of every op around the first unfinished one, but not the size of a dispatch. When a compute shader hangs the GPU, the group count is the first thing needed to tell a runaway loop from a dispatch that is simply too large. This came up while chasing aDXGI_ERROR_DEVICE_HUNGin a Niagara compute shader in The Matrix Awakens, where the report showed which dispatch hung but not how big it was.Changes:
TOMBOX_DRED=2),Dispatch(Xbox slot 14) andDispatchX(slot 78) also write aSetMarkertbdispatch XxYxZbefore forwarding to the previous slot entry. They chain like the other hooks on those slots (for exampleTOMBOX_PASSCAP).groups=XxYxZto aDISPATCHop when the latest dispatch marker before it has no other draw or dispatch in between. Dispatch markers are not shown as title markers and do not count as PSO markers.TOMBOX_DREDlog lines say that mode 2 also adds Dispatch markers.TOMBOX_DRED=2nothing changes: no hook is installed.Tests:
dred_marks::tests::dispatch_markers_give_the_group_counts_of_the_dispatch_they_precede: done, first-unfinished and queued dispatches get their own counts; a dispatch with no marker since the previous work op gets none; a draw never does; marker text format.cargo test -p d3d12_xs --lib -- --test-threads=1(withTOMBOX_REMOVED_EXIT_MS=off): 660 passed, 4 failed, 71 ignored; the same 4 fail onmainhere (alias::tests::msaa_depth_with_a_larger_pc_layout_never_overlaps_the_next_title_placement,placed_offset::tests::uneven_views_get_exact_helpers_and_msaa_shares_the_alias_heap,title_shadow::tests::buffer_then_texture_migrates_to_one_local_heap_and_keeps_bytes,xs_exports::console_fixed_tests::fixed_result_dxgix_exports_match_every_console_d3d12_xs).Not verified in a title: the markers were added on a test branch for the Matrix hang above, but no removal has been captured with them yet, so a real report with
groups=has not been seen.missingwith a note@omonkeyz on GitHub · 2026-11-23 13:45 UTC · original
Applied locally on main with your authorship kept (cherry-picked,
89d07c1); tests pass in a sandbox. It ships in the next release; this PR will be closed when that is pushed. Thanks.@omonkeyz on GitHub · 2026-11-25 13:09 UTC · original
Applied on main in
89d07c1(cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.Pull request closed