D3D12.X: the GPU wait watchdog lists the waits XCL put on queues itself #1983
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1983
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1983/head"
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?
@treybertram06 on GitHub · 2026-11-25 00:22 UTC · original
treybertram06:d3d12x-internal-wait-log→main· +83 −3 · 3 files · 1 commits · merged 2026-11-25 01:15 UTCWhen a bridged
Wait64BitValueXtimes out, the GPU wait watchdog logs the waiter, the producer queue and the pending title fences. It does not log thequeue.Waits that XCL adds on its own, for texture page mappings, sparse uploads and tile mappings, and sparse readbacks. Those are not inSYNC_GRAPH. A producer queue that stands behind one of them therefore looks like a queue with no tracked wait, which is what #1452 reported. This PR lists the unmet ones at every watchdog round, and makes the watchdog's 5 s timeout configurable for diagnostics. Logging only, no behaviour change. Context: #505What is in it
crates/xcl/src/hle/d3d12x/list_x.rs:note_internal_waitrecords each XCL-issued wait per queue, and drops the ones already met.internal_waits_summarylists the unmet ones. The watchdog logs them afterpending title ID3D12Fences.XCL_GPU_WAIT_TIMEOUT_MSoverridesGPU_WAIT_WATCHDOG_TIMEOUTthe same wayXCL_WAIT_TIMEOUT_MSoverrides the CPU timeout. Plus the unit testan_internal_wait_is_listed_until_its_fence_reaches_the_value.crates/xcl/src/hle/d3d12x/vram.rs(before_execute) andcrates/xcl/src/hle/d3d12x/sparse.rs(upload wait, readback wait): onenote_internal_waitcall after each existingqueue.Wait.Example line, from a local build with this change on a retail title. In that run the producer queue
q3andq2were waiting for the page-mapping fence:Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4onc4396e2: 994 passed, 0 failed, 45 ignored.validator 1.7 < 1.8 (validation step only); 19no wave64(32-lane hardware); 3 per-lane-form refusals inlower_dxil::tests::f16_programs_on_the_gpu/f32_programs_on_the_gpu(V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32: "its #1426 semantics differ from the console's"); 1heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows.mainc4d37be+ #1478 and local caps, with the same logging. There it showed every timeout's producer queue behind the page-mapping fence. Skipping that one wait, as a local experiment only, took the CPU releases from 4 to 0–1 per run.Regression run
Not tested
AI use
🤖 Generated with Claude Code
https://claude.ai/code/session_015JSG96tVb4ZSAZ5WH4v95v
@futurepro62 on GitHub · 2026-11-25 00:57 UTC · original · edited 2026-11-25 01:08 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
c4396e2(on its base80f4819).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 983 passed, 0 failed, 43 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.an_internal_wait_is_listed_until_its_fence_reaches_the_value.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 993 passed, 0 failed, 45 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on main7994cd1too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests andconst_and_null_mask_operands_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
@raylitebull on GitHub · 2026-11-25 01:12 UTC · original
Code review on
c4396e2:CIworkflow approved (currently running).Remaining before merge:
Build and test (Windows, no GPU)finishing green plus an AMD verification pass onc4396e2.@DavidM1911 on GitHub · 2026-11-25 03:31 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!