D3D12.X: bypass title hooks for own_work ExecuteCommandLists #2703
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!2703
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2703"
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?
@Saksukella on GitHub · 2026-11-26 07:21 UTC · original
Saksukella:fix/own-work-execute-deadlock→main· +76 −1 · 1 files · 1 commits · openWhat is in it
crates/xcl/src/hle/d3d12x/real.rs(q_execute_command_lists): forward internal XCL submissions running insidetitle_textures::own_work()directly to PCExecuteCommandLists(plusstop_if_device_removed()), bypassing title-only hooks (title_textures::refresh, console/split list translation,present::note_execute->late_release::drain_known->vram::recycle_ready).vram::PAGESduringvram::before_execute->flush_zero_tilesonamd-dev, orsparse::STATE/title_texturesuploads), and keeps internal queues out ofpresent::QUEUES.hle::d3d12x::real::queue_tests::own_work_execute_command_lists_bypasses_note_execute_and_drain.Tested
32.0.32029.2010), 24-thread x86_64 CPU, 32 GB RAM, Windows;rustc 1.100.0 (0ef1bc386 2026-11-09); debug (tests) and release (xcl.exe).cargo test -p xcl --lib own_work_execute_command_lists_bypasses_note_execute_and_drain: 1 passed, 0 failed (0.00s).cargo test --workspace -- --test-threads=4(aftercargo build --workspace): 1434 passed, 2 failed (pre-existing AMD RDNA 4gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3, unrelated tod3d12x::real), 47 ignored (SKIPPED GPU tests: 6lower_dxil#1426f16/f32 refusals, 1pso_measurement_compiles_an_exact_synthetic_recorddue to Developer Mode off, 1heap_window_out_of_memory_falls_back_to_the_switch_formno heap windows). All 4/4tests/e2e.rspassed.amd-dev(b5c0275f) wherevram::flush_zero_tilespreviously deadlocked deterministically att=36sonPAGES.lock(); with this fixxcl-activityandPresentXran cleanly pastt=224sand into 3D dispatches with zero lockups.Regression run
Not tested
0x887A002D).AI use
PAGES.lock()deadlock, editingq_execute_command_lists, authoring thequeue_testsunit test, and running local test and smoke suites. All diffs and results were reviewed and verified locally on hardware.@fromthemoonx on GitHub · 2026-11-26 08:09 UTC · original
NVIDIA run (listed under Not tested): passes, the new test fails without the
is_own_work()bypass, and the e2e title's D3D12 debug-layer messages are the same asmain's.Tested:
9e518da(its base is currentmainb49be18, so head = merged). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, Graphics Tools (D3D12 debug layer) installed.cargo test --workspace --no-fail-fast -- --test-threads=4SKIPPEDlines (no wave64, refused per-lane forms)own_work_execute_command_lists_bypasses_note_execute_and_drainalone, 40 runshle::d3d12x::real::+hle::d3d12x::title_textures::(80 tests),--test-threads=8, 30 runs|| super::title_textures::is_own_work()taken out of the early-return conditionreal.rs:8013e2etest_title_draws_with_a_root_signature_under_the_debug_layer, PR vsmainNot tested: a title run (the deadlock this avoids was seen on
amd-dev), Intel, a release build.AI use: Claude Code (Claude Opus 5.5) ran the suite, the repeats, the scratch change and the debug-layer comparison, and wrote this report.
@sage-sage on GitHub · 2026-11-26 08:48 UTC · original
Test report: passes on NVIDIA. Exact head
9e518da4(its base is currentmainb49be18, so head = merged).Tested
cargo test --workspace -- --test-threads=4: 1436 passed, 0 failed, 47 ignored;own_work_execute_command_lists_bypasses_note_execute_and_drainpassesmainon this machine (wave64, debug layer, Developer Mode, heap windows)Not tested
Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
@Decodere on GitHub · 2026-11-26 09:05 UTC · original
Independent RTX 4060 (8 GB) verification of PR #2703 at
9e518da4f65f91af3ba3c48cdb232ca0edb541bb(exact parentorigin/mainb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Measurements and targeted test results only; not a full source review.Setup
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)title: 29640639viascripts/smoke.ps1 -Seconds 60(XCL_NETWORK=0 XCL_ACTIVITY=1, default flags, no input)Targeted RTX 4060 release unit tests (
9e518da4)cargo test --release -p xcl --lib hle::d3d12x::real::queue_tests::own_work_execute_command_lists_bypasses_note_execute_and_drain -- --nocapture: 1 passed, 0 failed, 0 ignored (0.00 s, exit0).cargo test --release -p xcl --lib hle::d3d12x::real:: -- --test-threads=4(3 consecutive parallel runs): 61 passed, 0 failed, 0 ignored × 3 (0.66 s,0.66 s,0.84 s,0skipped, exit0).cargo test --release -p xcl --lib hle::d3d12x::title_textures:: -- --test-threads=4: 19 passed, 0 failed, 0 ignored (0.85 s,0skipped, exit0).cargo test --release -p xcl --lib hle::d3d12x::sparse:: -- --test-threads=4: 17 passed, 0 failed, 1 ignored (0.40 s,early_commit_timingignored, exit0).Observations
q_execute_command_listsbypassingpresent::note_execute/late_release::drain_knownundertitle_textures::is_own_work()passed its new regression test and all 97 targetedreal::,title_textures::, andsparse::tests cleanly on this RTX 4060 host, including 3 consecutive parallel--test-threads=4runs ofhle::d3d12x::real::with no flake.own_work_execute_command_lists_bypasses_note_execute_and_drainalready asserts!present::known_queues().contains(&(obj_ptr as usize)), and also checkspresent::known_queues().len() == queues_before.len(). The.len()equality check passed 3/3 times in parallel here, though relying on.contains()alone avoids any future flake if another test running concurrently in the same binary registers a queue inpresent::QUEUES.exit: 0x0,60 60 60steady-state presents per 2 s,0device removals,0crashes) with peak commit (14004 MB) and frame count (1513) in line with parentb49be183(14018 MB,1518frames).Paired 60 s RTX 4060 smoke (
b49be183vs9e518da4)Parent
origin/main(b49be183):PR #2703 head (
9e518da4):Limits of coverage
9e518da4(only targetedhle::d3d12x::real::,title_textures::, andsparse::release tests plus paired quiet 60 s smoke).sparse::STATEorvram::PAGESlock contention deadlock in the retail title (that re-entry guard is covered by the new unit test).RTX 4060) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host.AI use
Ran the targeted release unit tests and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts and smoke blocks were taken directly from
cargo testandscripts/smoke.ps1outputs.@bobosneefdev on GitHub · 2026-11-26 09:44 UTC · original
Test report: AMD RDNA2 (RX 6800), retail title, on
amd-dev. The hang this PR describes happens here on unmodifiedamd-dev; with the PR applied it did not happen in 4 runs.Tested
amd-devb5c0275fwith this PR's diff at head9e518da4applied (gh pr diff 2703 | git apply --3way -, no conflicts, no other changes)xcl run <folder>withXCL_NETWORK=0 XCL_ACTIVITY=1 XCL_DRED=1 XCL_THREAD_DUMP_AT=200,260,330,420, compute pipelines precompiled first (xcl shaders shaders.rpf --precompile --only cs --pipelines --used-only: 691 pipelines, 0 errors), Enter at the start screen, nothing else pressedWithout the PR (
amd-devb5c0275f, clean tree), 5 runs: 2 hung about 150 s in (no activity line for 60 s, window stops presenting), 3 ended in the device removal of #2619. One of the hangs was dumped withXCL_THREAD_DUMP_ATand symbolized. It is the chain the description names:xcl-activity(vram::page_bytes) and aplace_on_pagescaller were queued behind it. (That run also hadXCL_D3D12_DEBUG=1set; the debug layer is not installed on this machine, so it had no effect.)With the PR, 4 runs: 0 hangs, 0 threads waiting on
PAGESin any dump, 0 access violations in the game. All four got through the intro load to the first frames of the world (7,000–7,800 draws per 2 s) and then ended in #2619 (0x887a0006, DRED page fault, "0 of 8 operations done") at 161 / 187 / 185 / 177 s, the same end as the non-hanging runs without the PR. Commit 26.6–28.9 GB and video memory 11.2–13.2 GB at the end.Not tested
cargo test --workspaceand the PR's new test on this GPU, andscripts/smoke.ps1blocksmain: the one cold run ofmainI have on this card stalls in the intro load before the point where the hang showsAI use
@emirduran707 on GitHub · 2026-11-26 10:18 UTC · original
Independent AMD RDNA4 (native wave64) verification of exact PR head
9e518da4f65f91af3ba3c48cdb232ca0edb541bbon Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC1.9.2602.17).Tested
cargo build --workspace(debug): passed (0errors).cargo test --workspace --no-fail-fast -- --test-threads=4:1434 passed, 2 failed, 47 ignored(8 SKIPPED: 6 per-lane DXIL forms refused by host adapter/driver, 1heap_window_out_of_memory_falls_back_to_the_switch_formno heap windows, 1pso_measurement_compiles_an_exact_synthetic_recordWindows Developer Mode off).hle::d3d12x::real::queue_tests::own_work_execute_command_lists_bypasses_note_execute_and_drainpassed.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3) are pre-existing on unmodifiedmainon this RX 9060 XT / driver32.0.31044.16.cargo build --release -p xcl+ 60 s retail-title smoke test (scripts/smoke.ps1, offline):(Compare against
mainb49be183on this machine:1603 frames, 18576 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@Gevroska on GitHub · 2026-11-26 11:11 UTC · original
I compared stock
b49be183with PR head9e518da4on WARP. I submitted one internal XCL buffer copy and one ordinary title-style copy, waited for each completion fence, and read back the expected bytes on both revisions.On stock, both submissions were registered and the title submission counter advanced twice. On the PR head, the internal copy completed without registering or advancing the counter. The ordinary copy still registered and advanced it once. An independent repeat reproduced both outcomes.
This verifies the accounting change on a working D3D12 queue. My GTA VI loading logs don’t identify an affected internal submission, so I can’t connect this result to the loading stall.
I used Codex GPT-6.2 Sol for the test and a separate GPT-6.2 Sol agent for independent verification. Codex GPT-6.2 Astra wrote this comment.
I reviewed and approved this comment before posting.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.