Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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.