Repository navigation
d3d12: a refused recorded call is logged once per call site, so a failing Close names its cause - #9612
d3d12: a refused recorded call is logged once per call site, so a failing Close names its cause#9612madaraXor wants to merge 2 commits into
Conversation
…ling Close names its cause A recorded call the layer refuses only set the list's invalid flag: Close returned E_INVALIDARG and ExecuteCommandLists refused the list with nothing in the log. On a retail boot every Close failed, and finding the cause (ClearRenderTargetView given an untranslated console CPU handle, cleared since by ItsNotRexed#7880) took a rebuild with per-line logging. check() now takes a std::source_location default argument, so none of its 127 call sites change, and the first refusal at each site prints one [rt] line with the method and the line. A per-line bit keeps the refusals a title repeats every frame to one atomic OR after the first. d3d12_refused_call_log_test records ClearRenderTargetView with a null view and RSSetViewports with one viewport too many three times: every Close returns E_INVALIDARG and stderr names each method once; a valid list closes with S_OK and logs nothing. docs/boot.md's triage step points at the line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent Windows check of d52e2c49. RTX 3080 Ti, NVIDIA 621.35, MSVC 19.44.35230, Vulkan SDK 1.4.363.0.
One wording suggestion for the boot guide: “If a recorded call caused Synthetic inputs only. AI-assisted. |
|
Tested
Not run: the full AI-assisted (Claude Code). |
|
Tested
One thing from reading the code (non-blocking): when the refusing
AI-assisted (Claude Code) review and test run. |
…called it check() logged its own call site, so a refusal inside a private helper named the helper: "ID3D12GraphicsCommandList::atomic_copy" for an AtomicCopyBufferUINT call (found in review on ProjectLeonida#9612). The helpers that check (atomic_copy, clear_unordered_access, bind_root, parameter, constants, address, defer, verify_bundle_descriptor_heaps, record_dispatch, record_draw) now take a defaulted std::source_location and pass it on, so the logged line is the public method's call. A bundle's deferred call runs in a lambda, which MSVC names "Method::<lambda_N>::operator ()": method_of takes the identifier before "::<lambda". d3d12_refused_call_log_test adds Dispatch with no compute pipeline, refused in record_dispatch: the line names Dispatch and never record_dispatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@Henergyque thanks, good catch: done in The test adds @ThomasSAMP thanks for the RDNA4 run. AI-assisted (Claude Code). |
|
Tested on AMD Radeon RX 7700 XT (RDNA3), AMD Windows driver 32.0.32029.2010, Windows 11, MSVC 14.51 Release, at d52e2c4. Full No regression. The only failures are the same 5 as on AI-assisted (Claude Code). |
|
@madaraXor thanks. Re-tested
AI-assisted (Claude Code) test run. |
Claimed in the coordination issue as: #9522 (comment) (new D3D item)
What and why
When the layer refuses a recorded call,
check()inruntime/shims/d3d12_com.cpponly sets the list's invalid flag.Closethen returnsE_INVALIDARGandExecuteCommandListsrefuses the list, with nothing in the log. On a retail boot everyClosefailed (171,277 in 240 s on an RX 6700 XT) and nothing said why. Finding the cause took a rebuild with per-line logging:ClearRenderTargetViewhad been given an untranslated console CPU handle, which #7880 now translates (measured in #8851).check()takes astd::source_locationdefault argument, so none of its 127 call sites change. The first refusal at each call site prints one line with the method and the line:[rt] d3d12: ID3D12GraphicsCommandList::ClearRenderTargetView refused a recorded call (d3d12_com.cpp:736); the list is invalid, so its Close returns E_INVALIDARG (logged once per call site)source_location::function_name(): the identifier before the parameter list, which handles MSVC's full signature and a bare name. 67 of the 127 sites are in methods that record nothing in the D3D12 trace before their check (RSSetViewports,OMSetRenderTargets, the UAV clears, …), so the name can't come from the trace.atomic_copy,clear_unordered_access,bind_root,parameter,constants,address,defer,verify_bundle_descriptor_heaps,record_dispatch,record_draw) take the same defaultedstd::source_locationand pass it on, so a refusal inside one names the D3D12 method that called it (e.g.AtomicCopyBufferUINT, notatomic_copy; found in review). A bundle's deferred call runs in a lambda, which MSVC namesMethod::<lambda_N>::operator (), somethod_oftakes the identifier before::<lambda.Closereturns.docs/boot.md's triage step 6 points at the line.Tested
Windows 10 22H2 (19045), AMD Radeon RX 6700 XT (gfx1031), AMD driver 32.0.21045.29003, MSVC 14.42 (VS 2022 Build Tools) RelWithDebInfo, Vulkan SDK 1.4.363.0, on
main5d74c2723.d3d12_refused_call_log: pass (headdbb13b047). It recordsClearRenderTargetViewwith a null view,RSSetViewportswith 17 viewports andDispatchwith no compute pipeline (refused insiderecord_dispatch) three times on a direct list: everyClosereturnsE_INVALIDARG, and stderr names each of the three methods exactly once (Dispatch, neverrecord_dispatch). A valid list closes withS_OKand logs nothing.main'sd3d12_com.cppthe new test fails at its first log check (line 113).ctest -j6at both heads (d52e2c49a,dbb13b047): the same 9 failures with and without this change, all onmainon this card (root_signature_oracle,d3d12_vulkan_device,d3d12_texture_tiles,d3d12_close_parity,d3d12_execute_indirect_validation,d3d12_depth_resolve,d3d12_pso_validation,d3d12_mesh,d3d12_set_descriptor_heaps).vk_queue_query_syncfails intermittently here either way (1, 1, 0, 1, 1 over five runs); it doesn't linkgta6rt_d3d12_com.python -I tests/test_docs_*.py: unchanged. The four that fail (cli_flags,design_rows,env_vars,links) fail the same way onmainwithout this change.scripts/check_no_game_data.pyon the changed files andgit diff --check: clean.AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code