Repository navigation
D3D12.X: report debug layer messages by id, and gate new ids in smoke - #2039
brandostrong wants to merge 2 commits into
Conversation
|
Code review on
Remaining before merge: Addressing |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
The debug layer's messages reach XCL's log but only the first 8 of each id are printed, so a run that hit one 5 151 times looked like eight hits in the report. The per-id counts already existed in the callback; they were a local static nothing could read. Hoist them to a module static, count every message, keep the first text of each id and expose them in report.json as d3d12.debug_layer, sorted by id. Measured on a 150 s debug-layer run of a retail title: 13 273 messages in the report against 57 lines in the log – 5 307 GetGPUVirtualAddress-on-non-buffer warnings (XCL's own address probes), 5 151 resource-state errors, 1 618 simultaneous-access hazards across queues and 9 render targets created CREATE_NOT_ZEROED and never initialized before use. The log caps are unchanged: printing still stops at 8 per id and 3 000 in all. Co-Authored-By: Claude Code <noreply@anthropic.com>
…ssage ids A run that picked up new validation errors looked clean in the block: frames and peak commit say nothing about them, and the log's per-id cap hides how often each one fired. smoke.ps1 prints `debug layer messages: 538x5151 745x5307` from report.json (n/a when the layer was off, none when there were none) and pr_check.py refuses a PR whose run shows ids main's run did not; ids main's run showed and the PR's no longer shows are a fix, not a problem. -DebugLayer turns the layer on for the run so the line has ids in it. It is a switch and not the default: with the layer requested and no Graphics Tools device creation can fail outright (xcl-dev#1444), so forcing it would break smoke runs there. Both runs of a pair get it; blocks without the line still pass. Co-Authored-By: Claude Code <noreply@anthropic.com>
60f8fc5 to
1039318
Compare
|
Both notes are addressed at the current head
Tested on the current head: AI use: Claude Code (Claude Opus 5.5) wrote this reply. |
|
Tested on I ran On the PR head, each failed start with In both shells, Not tested — An actual debug-layer or game launch, the Rust workspace, or a caller with a native present-but-empty variable. OpenAI Codex (GPT-6) wrote and ran the fixtures, implemented the fix, and prepared this report. |
The debug layer's messages reach XCL's log, but only the first 8 of each message id are printed: a run that hit one 5 151 times looked like eight hits.
report.jsonnow carriesd3d12.debug_layer– every message counted, by id, with the first text of each id –smoke.ps1 -DebugLayerprintsdebug layer messages: 538x5151 745x5307from it, andpr_check.pyrefuses a PR whose run shows ids main's run did not: new validation errors, which frames and peak commit say nothing about. Ids main's run showed and the PR's no longer shows are a fix, not a problem.Part of the validation line claimed on #1269.
What is in it
crates/xcl/src/hle/d3d12x/real.rs: the per-id counts, already in the callback but a local static nothing could read, become a module static; every message is counted, the first text of each id is kept, and both reachreport.jsonasd3d12.debug_layer.debug_layer_counts_fromturns a map into the report form, so the report test works on its own map and never touches the global one. Two unit tests (counted past the cap, ids in order with the first text cut to 200 characters).scripts/smoke.ps1: a-DebugLayerswitch and thedebug layer messages:line –n/awhen the layer was off,nonewhen there were none. The caller's ownXCL_D3D12_DEBUGis restored after the run, not deleted.scripts/pr_check.py:smoke_idsand the new-id comparison, only between blocks that both report them.scripts/test_pr_check.py: new ids fail; same, fewer,n/aand no line all pass.Tested
1039318:cargo build --workspacethencargo test --workspace -- --test-threads=4: 1156 passed, 0 failed, 46 ignored; 24 GPU tests skipped (20no wave64, 1no heap windows, 3 refused on the gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics)python scripts/test_pr_check.py: OK, 15 tests;pwsh scripts/smoke-title.tests.ps1:smoke-title: okxcl,XCL_D3D12_DEBUGis set only when-DebugLayeris passed and does not leak after the run; the line renders from a fixturereport.jsonas538x5151,n/aandnonereport.jsonhas the counts and not the texts): 13 273 messages counted against 57 lines in the log – 538×5 151 resource-state errors, 745×5 307GetGPUVirtualAddresson non-buffer resources, 1047×1 618 simultaneous-access hazards across queues, 677×491, 679×252, 680×45, 1422×9. 745 is XCL's own address probe inres_gpu_va_x(it asks the PC method, gets 0, substitutes the title's address), so it is expected in any debug-layer run, on both sides of a pair.Regression run
Both runs have the debug layer on – main's through
XCL_D3D12_DEBUG=1in the environment, because the-DebugLayerswitch is this PR's – so the two sides pay the same cost. Main's block has nodebug layer messages:line, so the new-id comparison is skipped for this pair.maincbc296a:this PR's head
1039318(-DebugLayer):Not tested
n/a, which is why-DebugLayeris a switch and not the default (D3D12.X: say why no GPU made a device with the debug layer on #1444 is about device creation failing in exactly that case)ID3D12InfoQueuepath for Windows 10 does not feed this counter yet: it needs the samenote_debug_messagecall when that PR lands, or Windows 10 runs will log messages the report does not count-DebugLayerswitch, so this pair exercises only the head side (the tests cover same / fewer /n/a/ no line)AI use
debug_layer_counts_from, restoring the caller'sXCL_D3D12_DEBUG), the rebase ontocbc296a, the suite rerun and both regression runs.🤖 Generated with Claude Code