Repository navigation
D3D12.X: DRED's VA 0 output follows the device state it comes with - #3119
Raul-Paiva wants to merge 1 commit into
Conversation
bf39c45 to
284d140
Compare
|
Source review of
Our small reporting correction labels UNKNOWN, logs page-fault query errors and removes the empty-breadcrumb inference. It does not implement your VA-zero or disabled-breadcrumb changes. No new diagnostic settings are enabled. This is source review only; no tests or native reproduction were run for these points. AI use: OpenAI Codex (GPT-6) inspected the exact diff and Microsoft references and prepared this follow-up. Optional contributor/test coordination: https://discord.gg/gK3y7WRRY |
|
Tested Independently reran the pinned standalone CPU test for Ran All 12 processes exited 0 (12 passed, 0 failed, 0 ignored, 0 skipped). Each case asserted the raw environment value, synthetic OnceLock state, and predicate result. Only Not tested Runtime DRED initialization, GPU or D3D12 operation, device removal, page-fault or breadcrumb output, title smoke, and the workspace suite. AI use T3 Code through Codex ( |
284d140 to
07dd787
Compare
|
Thanks for the review. All four points are in, folded into the single commit; the PR is rebased onto
The full suite was run against Written with Claude Code (Claude Opus 5.5). |
07dd787 to
e7211ea
Compare
e7211ea to
1c89197
Compare
|
No open or merged PR makes the same change. No problems found in the diff. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
|
merge-check AI-written and posted by Foniass without a human check of each point. |
When the device is removed, DRED's page-fault output can be VA 0 with no allocations named. The log said "DRED page fault at GPU VA 0x0; allocations there: []", which reads as a real fault at VA 0. DRED gives that when it recorded no fault, but the allocation lists may be empty for a real fault too. The device state read just before tells the two apart: - state 7 (PAGEFAULT): a page fault happened; it is logged as a fault at VA 0x0, as before (the null-address faults of xcl-dev#2920); - another known state (3 hung, 6 fault): "no page fault: the device state is another removal"; - state 0 (UNKNOWN) or no state: "no fault recorded, or a fault DRED could not place". An address other than 0, or any allocation named, is logged as before. Here, removals with device state 0 and that output were not GPU page faults. DRED device state 0 is UNKNOWN, not "the GPU's work did not fault": it is now logged as "0 (unknown)" and the comment no longer infers it. A failed GetPageFaultAllocationOutput was silent. Its HRESULT is now logged when XCL switched the page-fault output on; without XCL_DRED the log says it is not switched on (agility::dred_switched_on). With XCL_DRED=pagefault the breadcrumbs are never switched on, yet the log said "no list was in flight". It now says they are not switched on; with them on and no node returned, it says "empty output" instead of inferring that no list was in flight. Review by Prime1997 (device state 0 as unknown, the page-fault query error, VA 0 kept ambiguous, "empty output") and Foniass (the device state decides VA 0, the output not switched on, tests of the wording). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1c89197 to
efb8790
Compare
|
Thanks for the review. Head is now efb8790 (rebased onto
Tested on an RTX 3070 Laptop (driver 621.40): the modules this PR touches ( The new lines have not been seen in a real removal yet: no removal happened in my runs. Claude Code (Claude Opus 5.5) helped with the fixes and this reply; I checked each point. |
|
merge-check
|
|
Follow-up review (head efb8790, since 1c89197, diff read, not a merge-check):
New: none. Open #2131 rewrites the same Fine: only log lines change, only after a device removal; breadcrumbs are on only with AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
On a device removal,
log_device_removedlogged DRED's page-fault output as a fault unconditionally. When the output is VA 0 with no allocation named, the log saidDRED page fault at GPU VA 0x0; allocations there: []; recently freed: [], which reads as a real fault at VA 0; logs of this shape were discussed as VA 0 faults in #2920 and #3052. DRED gives that output when it recorded no fault, but the allocation lists can be empty for a real fault too. The DRED device state read just before tells the two apart, so the log now follows it. WithXCL_DRED=pagefaultthe breadcrumbs are never switched on, yet the log saidno breadcrumbs (no list was in flight).Log changes (wording only, no behaviour change):
DRED page-fault output: VA 0x0, no allocations named (no page fault: the device state is another removal);DRED page-fault output: VA 0x0, no allocations named (no fault recorded, or a fault DRED could not place).Any other address, or a fault that names an allocation, is logged as before.
UNKNOWNand is logged asDRED device state: 0 (unknown); nothing infers from it whether the GPU's work faulted.GetPageFaultAllocationOutputlogs its HRESULT when XCL switched the page-fault output on:DRED page-fault output not available (<hr>). WithoutXCL_DRED:DRED: no page-fault output (not switched on; XCL_DRED=1 or XCL_DRED=pagefault does).DRED: no breadcrumbs (not switched on; XCL_DRED=1 does). Switched on and no node returned:DRED: no breadcrumbs (empty output).Review points from Prime1997 (state 0 unknown, the query's error, VA 0 kept ambiguous, "empty output") and Foniass (the device state decides VA 0, the output not switched on, tests of the wording) are in the single commit.
What is in it
crates/xcl/src/hle/d3d12x/real.rs:dred_unplaced_page_fault(the line for VA 0 with no allocation named, by device state),dred_page_fault_missinganddred_breadcrumbs_missing(the lines for an output DRED did not give, switched on or not), pure helpers; their testsdred_output_at_va_0_with_no_allocations_follows_the_device_stateandmissing_dred_output_says_whether_it_was_switched_onindred_tests; the log lines inlog_device_removed.crates/xcl/src/gpu/agility.rs:dred_switched_on, whatenable_dred_onceswitched on (nothing, the page faults, or the breadcrumbs too); its testdred_outputs_are_on_only_when_the_settings_took.Tested
main5b0d5fa (same commands, same machine). The head pushed here is this change, with the review fixes of 12-01, rebased ontomainb2b1f10 without conflicts;main's newer commits also changereal.rs, which the rebase merged. The full-suite counts below were measured before those fixes and that rebase.mainb2b1f10), the lib tests of the modules this PR touches (gpu::agility,hle::d3d12x::real), release, serial, with the 20 skips: 185 passed, 0 failed, 0 ignored, the three new tests among them.cargo test --release --workspace --no-fail-fast -- --test-threads=4: the lib test binary ends early onmaintoo (exit 0x80004005 aftersparse upload preparation still failed after bounded retries), so the lib was also run alone, serially (--test-threads=1), with--skipfor the 20 tests that end the binary onmain(6list_x, 12sparse, 1texture_upload, 1uma_driver; each passes alone).main5b0d5fa):main: the same.main: 2604 passed, 13 failed, 29 ignored.dred_output_at_va_0_with_no_allocations_is_ambiguous(now..._follows_the_device_state), passes. The 13 failures ofmainfail here too (12title_textures, 1vram::d32s8_targets_take_their_own_size_of_video_memory).alloc_pool::tests::a_reset_that_puts_the_allocator_aside_keeps_what_the_gpu_still_readsandvram::tests::superseded_texture_waits_for_every_title_queue, pass alone 3/3 on this head and onmain, and their whole modules pass serially 2/2 here; they wait on GPU fences and fail only late in the long run. They do not reach the code this PR changes.main): the wave64 forms (no wave64), three f16/f32 per-lane forms refused by the recompiler, and the heap-window tests (no heap windows).Regression run
scripts/smoke.ps1 -Seconds 120 -Title 'retail title A', release builds of clean trees, one after the other on the machine in Tested, withXCL_DEVICE_TYPE=lockhart XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WATCH_HOT=0 XCL_DRED=1 XCL_GPU_WAIT_TIMEOUT_MS=60000. The title is left on its own, with no input; the shader cache was warmed by two runs ofmainbefore.main:This PR:
Not tested
AI use
🤖 Generated with Claude Code