D3D12.X: bypass title hooks for own_work ExecuteCommandLists #2703

Open
github-bot wants to merge 1 commit from github-bot/gh-2703 into main AGit
Owner

@⁠Saksukella on GitHub · 2026-11-26 07:21 UTC · original
Saksukella:fix/own-work-execute-deadlock → main · +76 −1 · 1 files · 1 commits · open

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs (q_execute_command_lists): forward internal XCL submissions running inside title_textures::own_work() directly to PC ExecuteCommandLists (plus stop_if_device_removed()), bypassing title-only hooks (title_textures::refresh, console/split list translation, present::note_execute -> late_release::drain_known -> vram::recycle_ready).
  • Prevents re-entrant self-deadlocks when internal XCL work submits command lists while holding internal mutexes (such as vram::PAGES during vram::before_execute -> flush_zero_tiles on amd-dev, or sparse::STATE / title_textures uploads), and keeps internal queues out of present::QUEUES.
  • Adds regression unit test hle::d3d12x::real::queue_tests::own_work_execute_command_lists_bypasses_note_execute_and_drain.

Tested

  • Hardware: AMD Radeon RX 9070 XT (driver 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 (after cargo build --workspace): 1434 passed, 2 failed (pre-existing AMD RDNA 4 gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 and fuzz_validate_and_gpu_3, unrelated to d3d12x::real), 47 ignored (SKIPPED GPU tests: 6 lower_dxil #1426 f16/f32 refusals, 1 pso_measurement_compiles_an_exact_synthetic_record due to Developer Mode off, 1 heap_window_out_of_memory_falls_back_to_the_switch_form no heap windows). All 4/4 tests/e2e.rs passed.
  • Also live-tested on amd-dev (b5c0275f) where vram::flush_zero_tiles previously deadlocked deterministically at t=36s on PAGES.lock(); with this fix xcl-activity and PresentX ran cleanly past t=224s and into 3D dispatches with zero lockups.

Regression run

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: AMD Radeon RX 9070 XT
title: b8db18c2
seconds: 60
exit: 0x0
frames shown: 1624 (PresentX 1624)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 19700 MB
xcl-smoke v1
commit: 9e518da4f65f91af3ba3c48cdb232ca0edb541bb
gpu: AMD Radeon RX 9070 XT
title: b8db18c2
seconds: 60
exit: 0x0
frames shown: 1673 (PresentX 1673)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17967 MB

Not tested

  • NVIDIA and Intel GPU adapters (tested on AMD Radeon RX 9070 XT only).
  • Windows Developer Mode cache-disabled PSO measurement test (0x887A002D).

AI use

  • Antigravity (Google Gemini frontier model): assisted with thread-dump symbolization of the re-entrant PAGES.lock() deadlock, editing q_execute_command_lists, authoring the queue_tests unit test, and running local test and smoke suites. All diffs and results were reviewed and verified locally on hardware.
**@⁠Saksukella** on GitHub · 2026-11-26 07:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/2703) `Saksukella:fix/own-work-execute-deadlock` → `main` · +76 −1 · 1 files · 1 commits · open **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs` (`q_execute_command_lists`): forward internal XCL submissions running inside `title_textures::own_work()` directly to PC `ExecuteCommandLists` (plus `stop_if_device_removed()`), bypassing title-only hooks (`title_textures::refresh`, console/split list translation, `present::note_execute` -> `late_release::drain_known` -> `vram::recycle_ready`). - Prevents re-entrant self-deadlocks when internal XCL work submits command lists while holding internal mutexes (such as `vram::PAGES` during `vram::before_execute` -> `flush_zero_tiles` on `amd-dev`, or `sparse::STATE` / `title_textures` uploads), and keeps internal queues out of `present::QUEUES`. - Adds regression unit test `hle::d3d12x::real::queue_tests::own_work_execute_command_lists_bypasses_note_execute_and_drain`. **Tested** - Hardware: AMD Radeon RX 9070 XT (driver `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` (after `cargo build --workspace`): 1434 passed, 2 failed (pre-existing AMD RDNA 4 `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` and `fuzz_validate_and_gpu_3`, unrelated to `d3d12x::real`), 47 ignored (SKIPPED GPU tests: 6 `lower_dxil` `#1426` f16/f32 refusals, 1 `pso_measurement_compiles_an_exact_synthetic_record` due to Developer Mode off, 1 `heap_window_out_of_memory_falls_back_to_the_switch_form` no heap windows). All 4/4 `tests/e2e.rs` passed. - Also live-tested on `amd-dev` (`b5c0275f`) where `vram::flush_zero_tiles` previously deadlocked deterministically at `t=36s` on `PAGES.lock()`; with this fix `xcl-activity` and `PresentX` ran cleanly past `t=224s` and into 3D dispatches with zero lockups. **Regression run** ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: AMD Radeon RX 9070 XT title: b8db18c2 seconds: 60 exit: 0x0 frames shown: 1624 (PresentX 1624) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 19700 MB ``` ``` xcl-smoke v1 commit: 9e518da4f65f91af3ba3c48cdb232ca0edb541bb gpu: AMD Radeon RX 9070 XT title: b8db18c2 seconds: 60 exit: 0x0 frames shown: 1673 (PresentX 1673) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17967 MB ``` **Not tested** - NVIDIA and Intel GPU adapters (tested on AMD Radeon RX 9070 XT only). - Windows Developer Mode cache-disabled PSO measurement test (`0x887A002D`). **AI use** - Antigravity (Google Gemini frontier model): assisted with thread-dump symbolization of the re-entrant `PAGES.lock()` deadlock, editing `q_execute_command_lists`, authoring the `queue_tests` unit test, and running local test and smoke suites. All diffs and results were reviewed and verified locally on hardware.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 07:30:02 +00:00
Author
Owner

@⁠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 as main's.

Tested: 9e518da (its base is current main b49be18, 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.

result
cargo test --workspace --no-fail-fast -- --test-threads=4 1436 passed, 0 failed, 47 ignored; 25 SKIPPED lines (no wave64, refused per-lane forms)
own_work_execute_command_lists_bypasses_note_execute_and_drain alone, 40 runs 40 of 40
hle::d3d12x::real:: + hle::d3d12x::title_textures:: (80 tests), --test-threads=8, 30 runs 30 of 30
scratch: || super::title_textures::is_own_work() taken out of the early-return condition the new test fails at real.rs:8013
e2e test_title_draws_with_a_root_signature_under_the_debug_layer, PR vs main the same messages on both: 3× error id 93, 1× error id 1046, 1× warning id 820, 8× id 0 at exit

Not 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.

**@⁠fromthemoonx** on GitHub · 2026-11-26 08:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/2703#issuecomment-7186249811) **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 as `main`'s.** **Tested:** `9e518da` (its base is current `main` `b49be18`, 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. | | result | |---|---| | `cargo test --workspace --no-fail-fast -- --test-threads=4` | 1436 passed, 0 failed, 47 ignored; 25 `SKIPPED` lines (`no wave64`, refused per-lane forms) | | `own_work_execute_command_lists_bypasses_note_execute_and_drain` alone, 40 runs | 40 of 40 | | `hle::d3d12x::real::` + `hle::d3d12x::title_textures::` (80 tests), `--test-threads=8`, 30 runs | 30 of 30 | | scratch: `\|\| super::title_textures::is_own_work()` taken out of the early-return condition | the new test fails at `real.rs:8013` | | `e2e` `test_title_draws_with_a_root_signature_under_the_debug_layer`, PR vs `main` | the same messages on both: 3× error id 93, 1× error id 1046, 1× warning id 820, 8× id 0 at exit | **Not 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.
Author
Owner

@⁠sage-sage on GitHub · 2026-11-26 08:48 UTC · original

Test report: passes on NVIDIA. Exact head 9e518da4 (its base is current main b49be18, so head = merged).

Tested

  • RTX 4080 SUPER (driver 621.40), Ryzen 5 7600X, Windows 11 26H2 build 26300.10075, rustc 1.100.0 MSVC, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug build
  • cargo test --workspace -- --test-threads=4: 1436 passed, 0 failed, 47 ignored; own_work_execute_command_lists_bypasses_note_execute_and_drain passes
  • SKIPPED: 29 lines, the same as on main on this machine (wave64, debug layer, Developer Mode, heap windows)

Not tested

  • No game, so not XCL's own submissions on a title.

Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

**@⁠sage-sage** on GitHub · 2026-11-26 08:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/2703#issuecomment-7187051288) **Test report: passes on NVIDIA.** Exact head `9e518da4` (its base is current `main` `b49be18`, so head = merged). **Tested** - RTX 4080 SUPER (driver 621.40), Ryzen 5 7600X, Windows 11 26H2 build 26300.10075, rustc 1.100.0 MSVC, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug build - `cargo test --workspace -- --test-threads=4`: 1436 passed, 0 failed, 47 ignored; `own_work_execute_command_lists_bypasses_note_execute_and_drain` passes - SKIPPED: 29 lines, the same as on `main` on this machine (wave64, debug layer, Developer Mode, heap windows) **Not tested** - No game, so not XCL's own submissions on a title. Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
Author
Owner

@⁠Decodere on GitHub · 2026-11-26 09:05 UTC · original

Independent RTX 4060 (8 GB) verification of PR #2703 at 9e518da4f65f91af3ba3c48cdb232ca0edb541bb (exact parent origin/main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Measurements and targeted test results only; not a full source review.

Setup

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200
  • Toolchain / caches: rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)
  • Workload: Retail workload title: 29640639 via scripts/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, exit 0).
  • 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, 0 skipped, exit 0).
  • cargo test --release -p xcl --lib hle::d3d12x::title_textures:: -- --test-threads=4: 19 passed, 0 failed, 0 ignored (0.85 s, 0 skipped, exit 0).
  • cargo test --release -p xcl --lib hle::d3d12x::sparse:: -- --test-threads=4: 17 passed, 0 failed, 1 ignored (0.40 s, early_commit_timing ignored, exit 0).

Observations

  • q_execute_command_lists bypassing present::note_execute / late_release::drain_known under title_textures::is_own_work() passed its new regression test and all 97 targeted real::, title_textures::, and sparse:: tests cleanly on this RTX 4060 host, including 3 consecutive parallel --test-threads=4 runs of hle::d3d12x::real:: with no flake.
  • Minor test-isolation note: own_work_execute_command_lists_bypasses_note_execute_and_drain already asserts !present::known_queues().contains(&(obj_ptr as usize)), and also checks present::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 in present::QUEUES.
  • Quiet 60 s retail smoke ran cleanly (exit: 0x0, 60 60 60 steady-state presents per 2 s, 0 device removals, 0 crashes) with peak commit (14004 MB) and frame count (1513) in line with parent b49be183 (14018 MB, 1518 frames).

Paired 60 s RTX 4060 smoke (b49be183 vs 9e518da4)

Parent origin/main (b49be183):

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1518 (PresentX 1518)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14018 MB

PR #2703 head (9e518da4):

xcl-smoke v1
commit: 9e518da4f65f91af3ba3c48cdb232ca0edb541bb
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1513 (PresentX 1513)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14004 MB

Limits of coverage

  • Full workspace test suite was not re-run on 9e518da4 (only targeted hle::d3d12x::real::, title_textures::, and sparse:: release tests plus paired quiet 60 s smoke).
  • The quiet 60 s no-input menu/intro smoke verifies no runtime regression on the normal path; it does not deliberately provoke a sparse::STATE or vram::PAGES lock contention deadlock in the retail title (that re-entry guard is covered by the new unit test).
  • Single discrete NVIDIA 8 GB GPU (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 test and scripts/smoke.ps1 outputs.

**@⁠Decodere** on GitHub · 2026-11-26 09:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/2703#issuecomment-7187400934) **Independent RTX 4060 (8 GB) verification of PR #2703 at `9e518da4f65f91af3ba3c48cdb232ca0edb541bb`** (exact parent `origin/main` `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`). Measurements and targeted test results only; not a full source review. ### Setup - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` - **Toolchain / caches:** `rustc 1.100.0 (0ef1bc386 2026-11-09)`, DXC `1.9.2609.5`, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs) - **Workload:** Retail workload `title: 29640639` via `scripts/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`, exit `0`). - `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`, `0` skipped, exit `0`). - `cargo test --release -p xcl --lib hle::d3d12x::title_textures:: -- --test-threads=4`: **19 passed, 0 failed, 0 ignored** (`0.85 s`, `0` skipped, exit `0`). - `cargo test --release -p xcl --lib hle::d3d12x::sparse:: -- --test-threads=4`: **17 passed, 0 failed, 1 ignored** (`0.40 s`, `early_commit_timing` ignored, exit `0`). ### Observations - `q_execute_command_lists` bypassing `present::note_execute` / `late_release::drain_known` under `title_textures::is_own_work()` passed its new regression test and all 97 targeted `real::`, `title_textures::`, and `sparse::` tests cleanly on this RTX 4060 host, including 3 consecutive parallel `--test-threads=4` runs of `hle::d3d12x::real::` with no flake. - Minor test-isolation note: `own_work_execute_command_lists_bypasses_note_execute_and_drain` already asserts `!present::known_queues().contains(&(obj_ptr as usize))`, and also checks `present::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 in `present::QUEUES`. - Quiet 60 s retail smoke ran cleanly (`exit: 0x0`, `60 60 60` steady-state presents per 2 s, `0` device removals, `0` crashes) with peak commit (`14004 MB`) and frame count (`1513`) in line with parent `b49be183` (`14018 MB`, `1518` frames). ### Paired 60 s RTX 4060 smoke (`b49be183` vs `9e518da4`) Parent `origin/main` (`b49be183`): ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1518 (PresentX 1518) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14018 MB ``` PR #2703 head (`9e518da4`): ``` xcl-smoke v1 commit: 9e518da4f65f91af3ba3c48cdb232ca0edb541bb gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1513 (PresentX 1513) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14004 MB ``` ### Limits of coverage - Full workspace test suite was not re-run on `9e518da4` (only targeted `hle::d3d12x::real::`, `title_textures::`, and `sparse::` release tests plus paired quiet 60 s smoke). - The quiet 60 s no-input menu/intro smoke verifies no runtime regression on the normal path; it does not deliberately provoke a `sparse::STATE` or `vram::PAGES` lock contention deadlock in the retail title (that re-entry guard is covered by the new unit test). - Single discrete NVIDIA 8 GB GPU (`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 test` and `scripts/smoke.ps1` outputs.
Author
Owner

@⁠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 unmodified amd-dev; with the PR applied it did not happen in 4 runs.

Tested

  • RX 6800 16 GB (driver 32.0.21045.29003), Ryzen 5 5600X3D, 64 GB, Windows 11 Pro 26200, Rust 1.98.1 MSVC, release
  • Tree: amd-dev b5c0275f with this PR's diff at head 9e518da4 applied (gh pr diff 2703 | git apply --3way -, no conflicts, no other changes)
  • Title: GTA6.Xbox.v1.0.2.1, xcl run <folder> with XCL_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 pressed

Without the PR (amd-dev b5c0275f, 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 with XCL_THREAD_DUMP_AT and symbolized. It is the chain the description names:

q_execute_command_lists -> title_textures::refresh -> refresh_once -> vram::before_execute (holds PAGES)
  -> Pages::flush_zero_tiles -> own_work(..) -> ExecuteCommandLists (XCL's own)
  -> q_execute_command_lists -> present::note_execute -> late_release::drain_known(false)
  -> vram::recycle_ready -> PAGES.lock()   <- same thread, never returns

xcl-activity (vram::page_bytes) and a place_on_pages caller were queued behind it. (That run also had XCL_D3D12_DEBUG=1 set; 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 PAGES in 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 --workspace and the PR's new test on this GPU, and scripts/smoke.ps1 blocks
  • The PR on main: the one cold run of main I have on this card stalls in the intro load before the point where the hang shows
  • 4 runs against a hang seen in 2 of 5 is a small sample (about 13 % to see none by chance at that rate)
  • NVIDIA, RDNA3/4

AI use

  • Claude Code (Claude Fable 5.2) ran the builds and the runs, read the logs and dumps and wrote this report.
**@⁠bobosneefdev** on GitHub · 2026-11-26 09:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/2703#issuecomment-7188404794) **Test report: AMD RDNA2 (RX 6800), retail title, on `amd-dev`.** The hang this PR describes happens here on unmodified `amd-dev`; with the PR applied it did not happen in 4 runs. **Tested** - RX 6800 16 GB (driver 32.0.21045.29003), Ryzen 5 5600X3D, 64 GB, Windows 11 Pro 26200, Rust 1.98.1 MSVC, release - Tree: `amd-dev` `b5c0275f` with this PR's diff at head `9e518da4` applied (`gh pr diff 2703 | git apply --3way -`, no conflicts, no other changes) - Title: GTA6.Xbox.v1.0.2.1, `xcl run <folder>` with `XCL_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 pressed Without the PR (`amd-dev` `b5c0275f`, 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 with `XCL_THREAD_DUMP_AT` and symbolized. It is the chain the description names: ``` q_execute_command_lists -> title_textures::refresh -> refresh_once -> vram::before_execute (holds PAGES) -> Pages::flush_zero_tiles -> own_work(..) -> ExecuteCommandLists (XCL's own) -> q_execute_command_lists -> present::note_execute -> late_release::drain_known(false) -> vram::recycle_ready -> PAGES.lock() <- same thread, never returns ``` `xcl-activity` (`vram::page_bytes`) and a `place_on_pages` caller were queued behind it. (That run also had `XCL_D3D12_DEBUG=1` set; 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 `PAGES` in 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 --workspace` and the PR's new test on this GPU, and `scripts/smoke.ps1` blocks - The PR on `main`: the one cold run of `main` I have on this card stalls in the intro load before the point where the hang shows - 4 runs against a hang seen in 2 of 5 is a small sample (about 13 % to see none by chance at that rate) - NVIDIA, RDNA3/4 **AI use** - Claude Code (Claude Fable 5.2) ran the builds and the runs, read the logs and dumps and wrote this report.
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-26 10:18 UTC · original

Independent AMD RDNA4 (native wave64) verification of exact PR head 9e518da4f65f91af3ba3c48cdb232ca0edb541bb on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver 32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC 1.9.2602.17).

Tested

  • cargo build --workspace (debug): passed (0 errors).
  • 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, 1 heap_window_out_of_memory_falls_back_to_the_switch_form no heap windows, 1 pso_measurement_compiles_an_exact_synthetic_record Windows Developer Mode off).
    • The new test hle::d3d12x::real::queue_tests::own_work_execute_command_lists_bypasses_note_execute_and_drain passed.
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 and fuzz_validate_and_gpu_3) are pre-existing on unmodified main on this RX 9060 XT / driver 32.0.31044.16.
  • cargo build --release -p xcl + 60 s retail-title smoke test (scripts/smoke.ps1, offline):
xcl-smoke v1
commit: 9e518da4f65f91af3ba3c48cdb232ca0edb541bb
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1615 (PresentX 1615)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 18665 MB

(Compare against main b49be183 on this machine: 1603 frames, 18576 MB peak, 0 device removals, 0 crashes.)

Not tested

  • NVIDIA / Intel GPUs, Linux / Wine.

AI use

  • Verification run and report prepared with Antigravity (Gemini 4 Neon); all build, test, and smoke results are from live runs on this machine.
**@⁠emirduran707** on GitHub · 2026-11-26 10:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/2703#issuecomment-7189198816) Independent AMD RDNA4 (native wave64) verification of exact PR head `9e518da4f65f91af3ba3c48cdb232ca0edb541bb` on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver `32.0.31044.16`, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC `1.9.2602.17`). **Tested** - `cargo build --workspace` (debug): passed (`0` errors). - `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, 1 `heap_window_out_of_memory_falls_back_to_the_switch_form` no heap windows, 1 `pso_measurement_compiles_an_exact_synthetic_record` Windows Developer Mode off). - The new test `hle::d3d12x::real::queue_tests::own_work_execute_command_lists_bypasses_note_execute_and_drain` passed. - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` and `fuzz_validate_and_gpu_3`) are pre-existing on unmodified `main` on this RX 9060 XT / driver `32.0.31044.16`. - `cargo build --release -p xcl` + 60 s retail-title smoke test (`scripts/smoke.ps1`, offline): ``` xcl-smoke v1 commit: 9e518da4f65f91af3ba3c48cdb232ca0edb541bb gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1615 (PresentX 1615) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 18665 MB ``` (Compare against `main` `b49be183` on this machine: `1603 frames, 18576 MB peak, 0 device removals, 0 crashes`.) **Not tested** - NVIDIA / Intel GPUs, Linux / Wine. **AI use** - Verification run and report prepared with Antigravity (Gemini 4 Neon); all build, test, and smoke results are from live runs on this machine.
Author
Owner

@⁠Gevroska on GitHub · 2026-11-26 11:11 UTC · original

I compared stock b49be183 with PR head 9e518da4 on 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.

**@⁠Gevroska** on GitHub · 2026-11-26 11:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/2703#issuecomment-7190386918) I compared stock `b49be183` with PR head `9e518da4` on 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.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2703/head:github-bot/gh-2703'
git switch 'github-bot/gh-2703'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2703'
git switch 'github-bot/gh-2703'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2703'
git switch 'github-bot/gh-2703'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2703'
git switch 'main'
git merge --squash 'github-bot/gh-2703'
git switch 'main'
git merge --ff-only 'github-bot/gh-2703'
git switch 'main'
git merge 'github-bot/gh-2703'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.