GPU: add opt-in D3D12 pipeline validation diagnostics #59
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/DexNom--VIctory!59
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-59"
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?
@RoachxD on GitHub · 2026-11-26 00:20 UTC · original
RoachxD:feat/d3d12-pso-diagnostics→main· +277 −10 · 5 files · 1 commits · openSummary
Microsoft documents that callbacks can run on a different thread and must not call D3D APIs from the callback (https://devblogs.microsoft.com/directx/d3d12-debug-layer-message-callback/). This implementation has no D3D API calls in the callback, uses process-lifetime state with no borrowed context, and catches unwinds. The device belongs to a process-lifetime singleton; explicit unregister would be required if this lifetime changes. Logging is synchronous and opt-in; attribution is temporal, not causal. Unassigned messages have a separate bounded quota. The legacy queue remains available for device-removed diagnostics.
Validation
An earlier version was exercised on native NVIDIA hardware and distinguished ID 622 during pipeline creation from ID 971 during pipeline-library load. The revised standalone contribution passed Windows-target test compilation checks with and without the diagnostics feature, and the native Windows bounded_counter_and_nested_scope test (one passed, 209 filtered out). Asset-policy and diff checks passed. The identical five-file revised implementation was subsequently exercised in a native Windows startup on an RTX 3060 Laptop GPU, combined with PR #40 solely for validation. InfoQueue1 callback registration succeeded. Four targeted compute PSOs each missed the pipeline library; two were created successfully and two failed with message 622 (requested wave64 on a wave32-only device). The process exited normally. The 64-message unassigned quota was exhausted, including 62 cache misses; targeted diagnostics remained functional. Separating unassigned cache misses is a possible follow-up. Repository-wide rustfmt checks report existing deviations and six new or modified formatting hunks; the reviewed, native-tested tree is retained. PR #40 is excluded from this contribution. No rendering correctness or performance claim. No game-specific filters, shader extraction or compatibility workaround included (the optional hash selector only limits diagnostic logging).
AI assistance was used to develop and review this contribution. The author is responsible for the changes.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.