Skip to content

kernelx: Sleep does not count PC calls that keep the title's threads - #1782

Merged
ivall merged 1 commit into
xcl-dev:mainfrom
imnicho:sleep-hold-pc-calls
Nov 25, 2026
Merged

ivall merged 1 commit into
xcl-dev:mainfrom
imnicho:sleep-hold-pc-calls

Conversation

@imnicho

@imnicho imnicho commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

A follow-up to #1288 for the case @raylitebull reported when merging it (#1288 (comment)): on an AMD RX 9070 XT a retail title's stall check still ended it after 30 s without a present, with the title's submission thread inside the driver (D3D12Core.dll → amdxc64.dll) and no bind waiting. #1288 only sees a bind's wait in resolve_wait, so Sleep went on counting.

Here the title's calls into D3D12 that XCL or the PC's driver keep for long hold the title as well: while such a call lasts, once the PC calls since the last frame shown, this one included, have taken 250 ms. That is one long call, or many short ones in a row. The title's own time between the calls still counts, and a frame shown starts the sum again, so a title that shows its frames is not held by its submissions. Part of #505.

Changed since the first version (fb9c082): that one looked at one call's age. @raylitebull's run of it on the RX 9070 XT (#1782 (comment) and the A/B after it) showed what it misses: 16,384 texture placements of 1 – 50 ms each in 29 s without a present, none of them 250 ms long, and the stall check ended the title. With the threshold at 0 that run went on for 300 s. The sum since the last frame holds in that burst from its first quarter second on, and leaves a title that presents normally alone, which a threshold of 0 would not (every Sleep of 100 ms or more would stretch by the share of time some thread is in a submission).

What is in it

  • crates/xcl/src/hle/d3d12x/pso_async.rs: pc_call(), a guard for such a call on one of the title's threads; PcCalls keeps the calls going on and the time of the ended ones since the last frame shown (present::presents()); title_held() is also true while a call is going on and that sum, with the call's own time, is PC_CALL_HOLDS_AFTER (250 ms) or more; building_here(), whether this thread is a worker building a pipeline. Tests a_long_pc_call_holds_the_title and short_pc_calls_between_two_frames_hold_the_title.
  • crates/xcl/src/hle/d3d12x/real.rs: the guard for the whole of q_execute_command_lists (XCL's uploads and tile mappings before the lists, the PC ExecuteCommandLists, what follows it), and in finish_pso around the driver's pipeline creation when that runs in the title's own call (no stand-in; a worker's build holds nobody).
  • crates/xcl/src/hle/d3d12x/device_x.rs: the guard in create_placed_resource_x (a texture placed on reserved memory: the PC's reserved resource and its tile mappings).
  • 132 lines added, 3 removed in 3 files. With the sum left out of PcCalls::holds (one call's age only, as in the first version), short_pc_calls_between_two_frames_hold_the_title fails ("twenty short PC calls since the last frame and one going on, but the title is not held").

Tested

  • hardware: Intel Core i7-7700K (4 cores / 8 threads), 16 GB RAM, NVIDIA GeForce RTX 5080 16 GB (driver 610.47, 32-lane waves), Windows 10 22H2 (19045), DXC 1.9.2602.17, rustc 1.100.0 stable-x86_64-pc-windows-msvc; debug for the tests, release for the title.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 on d4c6d34: 995 passed, 0 failed, 45 ignored (SKIPPED GPU tests: the wave64 cases of gpu::recomp::lower::tests (4 tests) and gpu::recomp::lower_dxil::tests (1 test and 12 cases of the constant-mask and f16 / f32 / f64 / integer program tests), gpu_wave32_program_in_wave64_hardware, gpu_geometry_wave32_prefix_count_over_a_mask – no wave64; 3 per-lane cases the per-lane form refuses; heap_window_out_of_memory_falls_back_to_the_switch_form – its switch is off; pso_measurement_compiles_an_exact_synthetic_record – Windows Developer Mode is off).
  • game checked: the newer retail title of the README, XCL_NETWORK=0, scripted pad, binds waiting (no XCL_PSO_WAIT_MS), one run of 330 s into its world load; the tree is this head + XG: fix CopyFromSubresource 7-argument ABI and guard destination span #684 + Rect lists: the CPU expansion finds the rect's corner, not always v1 #266, XCL_HEAP_WINDOWS=1: the world's set-up began at 127.4 s and the title was running at the time limit, with 2,239 frames shown, 22,348 draws and 8,192 dispatches, none skipped, 608 compute pipelines made, no device removal and 31.7 GB committed at the end. The GPU-wait watchdog released 4 waits after the set-up, as in my runs before this change (D3D12.X: XCL_GPU_WAIT_RELEASE_MS sets when a stalled GPU wait is released #1046).
  • Why that tree: main 80f4819 by itself ends 2.5 s after the world's set-up here, with an access violation in a memory copy (one run of it, set-up at 138.1 s); this branch alone, on its earlier base, did the same. With XG: fix CopyFromSubresource 7-argument ABI and guard destination span #684 and Rect lists: the CPU expansion finds the rect's corner, not always v1 #266 the title goes on, so the run has them.
  • That run only shows the change does no harm here. On this NVIDIA card the title's long waits are binds in resolve_wait; the cases this is for are the AMD ones in the reports above, which I cannot reproduce.
  • Reports by others on the first version (fb9c082): the suite on an RTX 5070 Ti and an AMD integrated GPU (@futurepro62), on an RTX 3060 Ti (@DavidM1911), a check of the guard in finish_pso through the real Sleep (@thehollowedone). They do not cover the new rule.
  • Reports by others on this head (d4c6d34): an RTX 4060 Ti where main 3da2abb does end at the stall check with the present thread in XCL's own work before a submit (@nightmoon1996, kernelx: Sleep does not count PC calls that keep the title's threads #1782 (comment)): main ended there in 5 of 5 runs that came to a stretch of 25 s or more without a frame, this head went on in 3 of 3 (frames again after 25 to 40 s, exit at the 300 s limit), suite 1113 passed / 0 failed on the merge with 3da2abb; the machine was not idle and the pad was not scripted, as that report says. An Intel Arc A770 (@JJAutoCompare, kernelx: Sleep does not count PC calls that keep the title's threads #1782 (comment)): the two new tests and the Sleep tests pass; 26 other tests fail there in parts this change does not touch, with no run of main on that card to compare.

Regression run (default settings)

main:

xcl-smoke v1
commit: 80f4819098e921f2e1ab371144d4832f68ffedd6
gpu: NVIDIA GeForce RTX 5080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1380 (PresentX 1380)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14316 MB

PR:

xcl-smoke v1
commit: d4c6d3455fddb5aeaf19bc28f97d35be82d71724
gpu: NVIDIA GeForce RTX 5080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1383 (PresentX 1383)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14322 MB

A second round of the same two binaries: main 1384 frames, PR 1378. The head is on 80f4819, the commit of the main block.

Against the latest main (568e7db, 168 commits after that base, checked 2026-11-25): this head merged onto it locally as 4651c5e, a clean merge that is not pushed, so the head and the reports on it stay as they are.

  • cargo build --workspace && cargo test --workspace -- --test-threads=4 on the merge: 1156 passed, 0 failed, 46 ignored; the two new tests and the three Sleep tests pass. SKIPPED: the same cases as above (25 notices: the wave64 cases of gpu::recomp::lower::tests and gpu::recomp::lower_dxil::tests, three per-lane cases the per-lane form refuses, the two wave64 tests of gpu::recomp::tests, heap_window_out_of_memory_falls_back_to_the_switch_form, pso_measurement_compiles_an_exact_synthetic_record).
  • scripts/smoke.ps1, 60 s, two rounds: main 568e7db 1243 and 1179 frames, the merge 1138 and 1174; exit 0x0, no device removal and no crash in all four.

Not tested

  • The reported cases themselves, on AMD, with this head. @raylitebull's A/B was the first version with the threshold at 0, not this rule; one run of this head on the RX 9070 XT would be the real test.
  • Intel GPUs; Windows 11; other titles.
  • No log line says that such a call is holding the title.

AI use

  • Claude Code with Claude Fable 5.2: wrote the change and its tests, ran the suite and the title runs on the machine named, and wrote this description.

Duplicate check (00:30 UTC on 2026-11-25): no other open PR counts PC calls as holding the title; read #1747 (merged: removes tile-mapping stalls themselves), #1835 (packs small textures, the placement burst's other side), #1046 (when a stalled GPU wait is released), #1429 (the sync watchdog after CPU releases), #1442 and #889 (build ahead: they shorten the waits).

🤖 Generated with Claude Code

@futurepro62

futurepro62 commented Nov 24, 2026 •

Copy link
Copy Markdown

Full-suite run, since this PR has no test report yet. Tested exact head fb9c082 (on its base b9b6ea6).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 888 passed, 0 failed, 42 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: a_long_pc_call_holds_the_title.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 890 passed, 0 failed, 42 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • Two tests were skipped with --skip on NVIDIA. Both fail on main 7f7e768 too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns their skips into failures. heap_window_out_of_memory_falls_back_to_the_switch_form skips when XCL_HEAP_WINDOWS is unset (Tests: heap_window_out_of_memory_falls_back_to_the_switch_form fails under XCL_REQUIRE_GPU=mesh (opt-in skip counted as missing coverage) #1651), and shaders::tests::pso_measurement_compiles_an_exact_synthetic_record skipped because Developer Mode was off. Developer Mode was turned on before the AMD run, and there pso_measurement_compiles_an_exact_synthetic_record ran and passed.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.

@ivall ivall added the goal:world-load Bears on the retail title getting past world loading label Nov 24, 2026
@raylitebull

Copy link
Copy Markdown
Member

@imnicho Tested #1782 (fb9c082, merged with #1834/#1835/#1836) on an AMD Radeon RX 9070 XT (RDNA4, 16 GiB VRAM, 32 GB RAM, Windows 11 x64, release, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=4).

Clean startup and 0 device removals, but the title still hit its ~30 s present-timeout watchdog at t = 87.352 s:

  • Crash: unhandled exception 0xc0000005 (write at address 0x0) at game_scarlett_master.exe+0x23cf683 (GPU Loc Sig: 7333478d, Game State: Game Running, Frame: 588).
  • What happened right before the crash: between t = 58.74 s and t = 87.35 s (28.6 s with 0 presents), the render thread created 16,384+ streaming textures (target pages 4,675 -> 6,760 MB) via CreatePlacedResourceX, with the active thread stalled inside WDDM / driver paging (win32u.dll+0x6154 < D3D12Core.dll+0x25c54 < D3D12Core.dll+0xa1648 < amdxc64.dll+0x406d8e).

Why pc_call() missed it:
held_by_pc_call() in crates/xcl/src/hle/d3d12x/pso_async.rs only returns true once a single in-flight PcCall exceeds PC_CALL_HOLDS_AFTER (250 ms). In a tight burst of 16,384+ consecutive CreatePlacedResourceX calls taking 1–50 ms each, nearly every individual call drops its PcCall before 250 ms, so title_held() stays false across a ~29 s stall that starves PresentX.

On the same RX 9070 XT, holding Sleep without the 250 ms per-call cliff (an immediate hold during pc_call(), or accumulating cumulative PC-call duration within a burst window across PresentX boundaries) survives full 480 s runs with 0 +0x23cf683 crashes. (Note: the underlying amdxc64.dll paging slowdown from sub-64 KiB texture tile bloat is also addressed separately by #1835.)

AI use

  • Antigravity (Claude Opus 4.6) assisted with log analysis and drafting this test note; results were verified from the local test run.

@raylitebull

Copy link
Copy Markdown
Member

@imnicho Follow-up A/B confirmation on the exact same RX 9070 XT build and test setup: changing only PC_CALL_HOLDS_AFTER in pso_async.rs from 250 ms to Duration::ZERO turned the t = 87.35 s 0xc0000005 (game_scarlett_master.exe+0x23cf683 / GPU Loc Sig 7333478d) crash into a clean 300.00 s run (exit: 0x0, 0 crashes, 0 device removals, streaming 8,560 MB target pages cleanly).

AI use: Antigravity (Claude Opus 4.6) assisted with summarizing the A/B test result.

@thehollowedone

thehollowedone commented Nov 24, 2026 •

Copy link
Copy Markdown

Independent Windows update on d4c6d34. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), Rust 1.99.1 MSVC, debug.

cargo build --offline --locked --workspace passed. cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --nocapture reported 995 passed, 0 failed, 45 ignored, with 24 runtime skip notices included in Cargo's pass count.

With synthetic timestamps, the cumulative hold was false at 249 ms and true at 250 ms. I also left one call open across a simulated present at 250 ms. The title was still held immediately after the present. I ended that call one millisecond later and started a fresh one at the same instant. The fresh call held immediately as well. A scratch assertion expecting a fresh budget in both cases failed. This measured the accounting rule with no title or GPU timing involved.

cargo test --offline --locked -p xcl --lib scratch_pc_call_ -- --nocapture --test-threads=1 ran both cases. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote the scratch tests, ran the suite, and drafted the update.


Earlier check at the previous revision

Independent Windows 11 build 26300 check of fb9c082, Rust 1.99.1 MSVC debug.

I passed a controlled callback through finish_pso on the calling thread and through the production background build queue. The callback stayed blocked long enough to cross the 250 ms threshold, then returned a synthetic failure. With XCL_SLEEP_HOLD=100, kernelx::Sleep(100) waited for the calling-thread callback to return. In the worker case, it completed while the callback was still blocked. Neither case left a hold behind. Removing only the new guard in finish_pso made the calling-thread case fail the hold assertion.

cargo test --offline --locked -p xcl --lib <filter> -- --nocapture --test-threads=1 passed 1/1 for both a_long_pc_call_holds_the_title and the scratch test scratch_pso_sleep_holds_title_thread_only. Zero skips. This checks the existing 250 ms contract with a synthetic callback and the actual Windows sleep path.

AI-assisted. Codex (GPT-6 family, exact variant unavailable) wrote and ran the scratch test and drafted this report.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

@imnicho

imnicho commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@raylitebull thank you - that is a case the rule misses, and your A/B (PC_CALL_HOLDS_AFTER = 0 gives a clean 300 s run) shows that holding during those calls is what the title needs. The rule looked at one call's age; 16,384 placements of 1 - 50 ms each never reach 250 ms singly, though together they keep the thread for 29 s.

What I am changing (pushing today, with the suite, the smoke pair and a title run redone):

  • The time counts across calls since the last frame was shown: a PC call holds the title once the PC calls since the last PresentX frame, this one included, add up to 250 ms. A burst of short placements then holds from its first quarter second on, for as long as a call is in flight; the title's own time between the calls still counts as the title's.
  • One long call holds as before (its own age is part of the sum).
  • A frame shown resets the sum, so a title that presents normally is never held by its ordinary submissions. That is why I would rather not set the threshold to 0: every Sleep of 100 ms or more on any thread would then stretch by the share of time some thread is inside a submission, in normal play too.

A test for it: many short calls between two frames hold the title, a new frame ends the hold - it fails with the per-call rule.

If you can rerun your RX 9070 XT case on the new head when it is up, that would be the real check; I cannot reproduce the placement burst on my card.

@futurepro62 @thehollowedone @DavidM1911 thank you for the runs.

AI use: Claude Code with Claude Fable 5.2 read the reports and wrote this.

A title's Sleep does not count the time a bind waits for a pipeline still being
built (pso_async::title_held). A title's thread can also be kept inside calls that
take no time on the console: a submission, where XCL uploads and maps tiles before
the lists and a driver can compile in them, a texture's placement on reserved
memory, or a pipeline built in the title's call because it got no stand-in. On an
AMD RX 9070 XT a retail title's stall check still ended it after 30 s without a
present, with its submission thread inside the driver and no bind waiting (reported
on xcl-dev#1288) - and again with 16 384 texture placements of 1 - 50 ms each in 29 s,
none of them long by itself (reported on xcl-dev#1782).

pso_async::pc_call() is a guard for such a call. While it lasts the title is held
once the PC calls since the last frame shown, this one included, have taken 250 ms:
one long call, or many short ones in a row. The title's own time between the calls
still counts, and a frame shown starts the sum again, so a title that shows its
frames is not held by its submissions. The guard is taken for the whole of
q_execute_command_lists, in create_placed_resource_x, and around the driver's
pipeline creation when that runs in the title's own call (a worker's build holds
nobody).

Tests: a_long_pc_call_holds_the_title,
short_pc_calls_between_two_frames_hold_the_title.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@imnicho
imnicho force-pushed the sleep-hold-pc-calls branch from fb9c082 to d4c6d34 Compare November 25, 2026 00:31
@imnicho imnicho changed the title kernelx: Sleep does not count a long PC call on one of the title's threads kernelx: Sleep does not count PC calls that keep the title's threads Nov 25, 2026
@imnicho

imnicho commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

@raylitebull the new head is up: d4c6d34, rebased onto 80f4819 (the push was held up for a while by GitHub's incident). The rule is the one from my comment above: a PC call holds the title once the PC calls since the last frame shown, this one included, have taken 250 ms - one long call or many short ones in a row; a frame shown starts the sum again. The description has the details and the results.

What it cannot show is your case: the burst of 16,384 placements without a frame. If you can run this head on the RX 9070 XT with the settings of your report, that is the test that counts. If it still ends at +0x23cf683, the threshold is the thing to look at next (your 0 ms run is the upper bound of what holding these calls can do).

AI use: Claude Code with Claude Fable 5.2 wrote the change, ran the tests and wrote this.

@raylitebull

Copy link
Copy Markdown
Member

Code review on the rebased d4c6d34 head:

  • Updating PcCalls to accumulate PC-call duration since the last PresentX frame across create_placed_resource_x, finish_pso (when !building_here()), and q_execute_command_lists directly addresses the burst-placement case where many short calls stay under 250 ms individually, and the new PcCalls unit tests cover both single-long and multi-short-burst holds plus frame-boundary reset.
  • Both CI checks (Build and test and PR description) are green on d4c6d34.

What is still needed before merge: Fresh AMD and NVIDIA verification on the new d4c6d34 head (prior runs were on fb9c082).

@imnicho

imnicho commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

@raylitebull thank you for the review. On the two runs you ask for:

  • NVIDIA, on d4c6d34: mine are in the description - RTX 5080 (32-lane waves, driver 610.47), suite 995 passed / 0 failed, smoke pair 1380 (80f4819) / 1383 (d4c6d34), and a 330 s run of the retail title into its world load, alive at the limit with nothing skipped. A second NVIDIA machine would be welcome; @futurepro62 @DavidM1911, if you can repeat your suite runs on this head.
  • AMD, on d4c6d34: I have no AMD card. The run that matters is yours from the report above (the placement burst on the RX 9070 XT); anyone else with an RDNA card and the title is as welcome.

AI use: Claude Code with Claude Fable 5.2 wrote this.

@JJAutoCompare

Copy link
Copy Markdown

Empirical verification for xcl-dev/xcl PR #1782

PR head tested d4c6d3455fddb5aeaf19bc28f97d35be82d71724. The remote still pointed to that head after testing. git merge-tree --write-tree origin/main HEAD exited 0 against both the initial origin/main (564cebe0f898a5e04e3e046312c1a0c1afd02de9) and its updated tip (8f5fca5bb9ad6e695093d75294ad2cec023bba60). The checkout was clean.

Tested

  • STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 (16,258 MiB reported, driver 32.0.101.9175). Rust 1.100.0 (0ef1bc386, MSVC x64), DXC and DXIL 1.9.2609.5 (01b62ad47). Dev and test profiles were unoptimized with CARGO_INCREMENTAL=0 and CARGO_PROFILE_DEV_DEBUG=CARGO_PROFILE_TEST_DEBUG=0.
  • cargo test --workspace --no-run compiled successfully. cargo build --workspace built the synthetic title executable and DLL needed for the end-to-end tests.
  • cargo test -p xcl --lib hle::d3d12x::pso_async::used_tests -- --show-output returned 8 passed, 0 failed, 0 ignored, 0 skipped. Both new tests passed (a_long_pc_call_holds_the_title and short_pc_calls_between_two_frames_hold_the_title).
  • cargo test -p xcl --lib hle::kernelx::tests::a_sleep -- --show-output returned 3 passed, 0 failed, 0 ignored, 0 skipped.
  • cargo test --workspace -- --test-threads=4 --show-output stopped after the first failing target, with 921 passed, 25 failed, 25 ignored and 23 explicit skip notices.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output after building the synthetic title returned 969 passed, 26 failed, 45 ignored across 20 targets (Cargo exit 101). Output included 26 explicit SKIPPED notices across 16 test names. Cargo's raw counts include tests that return success after emitting skips. Skipped cases are excluded from coverage.
  • Both workspace test commands ran under L:/XclTooling/Invoke-ArcTest.ps1 with XCL_ADAPTER=A770. The PowerShell execution policy was set to Bypass for the processes invoking the lock script.
  • The first --no-fail-fast run reached every target and found the same failing test names. Its end-to-end test stopped at the missing title binaries. After cargo build --workspace, the title ran and the end-to-end test failed its dynamic depth-bias check.
  • Of the 26 final failures, 21 GPU unit tests reported CreateComputePipelineState error 0x80070057, four GPU unit tests reported output mismatches, and the synthetic title exited with code 1 after RSSetDepthBiasX(-1000.5) produced a blue top-right pixel where the test expected green.
Exact SKIPPED notices from the final run
SKIPPED gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu: const_mask, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 arithmetic, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))
SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 compares, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::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))
SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu: integer arithmetic, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::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))
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 rounding, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu: integer carries, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 transcendentals, wave64: no wave64
SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 three-source, wave64: no wave64
SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
SKIPPED shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)
SKIPPED placed_title_textures_share_vram_and_preserve_pixels: tiled tier < 2
SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll
SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows
SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))
Failing tests and their panic output
  • gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0

    thread 'gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0' (9568) panicked at crates\xcl\src\gpu\dxil\fuzz_tests.rs:1167:110:
    seed 2: GPU run (3284 bytes, 147 instructions): CreateComputePipelineState: The parameter is incorrect. (0x80070057)
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    
  • gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1

    thread 'gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1' (7840) panicked at crates\xcl\src\gpu\dxil\fuzz_tests.rs:1167:110:
    seed 506: GPU run (3252 bytes, 139 instructions): CreateComputePipelineState: The parameter is incorrect. (0x80070057)
    
  • gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_2

    thread 'gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_2' (7328) panicked at crates\xcl\src\gpu\dxil\fuzz_tests.rs:1167:110:
    seed 1003: GPU run (3132 bytes, 138 instructions): CreateComputePipelineState: The parameter is incorrect. (0x80070057)
    
  • gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3

    thread 'gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3' (3404) panicked at crates\xcl\src\gpu\dxil\fuzz_tests.rs:1167:110:
    seed 1501: GPU run (2420 bytes, 80 instructions): CreateComputePipelineState: The parameter is incorrect. (0x80070057)
    
  • gpu::dxil::ops_tests::doubles_match_cpu

    thread 'gpu::dxil::ops_tests::doubles_match_cpu' (5056) panicked at crates\xcl\src\gpu\dxil\ops_tests.rs:87:78:
    GPU run: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::dxil::ops_tests::groupshared_barrier_and_atomics_run

    thread 'gpu::dxil::ops_tests::groupshared_barrier_and_atomics_run' (12784) panicked at crates\xcl\src\gpu\dxil\ops_tests.rs:87:78:
    GPU run: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::dxil::round_tests::gpu_direct_f32_round_modes_dynamic_and_denormals

    thread 'gpu::dxil::round_tests::gpu_direct_f32_round_modes_dynamic_and_denormals' (9832) panicked at crates\xcl\src\gpu\dxil\round_tests.rs:320:78:
    GPU run: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::dxil::round_tests::gpu_direct_f32_round_preserved_denormal_times_inf_is_inf

    thread 'gpu::dxil::round_tests::gpu_direct_f32_round_preserved_denormal_times_inf_is_inf' (10436) panicked at crates\xcl\src\gpu\dxil\round_tests.rs:320:78:
    GPU run: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::dxil::round_tests::gpu_direct_f32_round_modes_static

    thread 'gpu::dxil::round_tests::gpu_direct_f32_round_modes_static' (12820) panicked at crates\xcl\src\gpu\dxil\round_tests.rs:387:104:
    GPU run: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu

    thread 'gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu' (12888) panicked at crates\xcl\src\gpu\recomp\lower_dxil.rs:665:112:
    called `Result::unwrap()` on an `Err` value: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::tests::gpu_clamp_and_omod_per_instruction

    thread 'gpu::recomp::tests::gpu_clamp_and_omod_per_instruction' (13284) panicked at crates\xcl\src\gpu\recomp\tests.rs:1113:47:
    called `Result::unwrap()` on an `Err` value: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::tests::gpu_f64_literal_high_word

    thread 'gpu::recomp::tests::gpu_f64_literal_high_word' (11732) panicked at crates\xcl\src\gpu\recomp\tests.rs:104:35:
    called `Result::unwrap()` on an `Err` value: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::tests::gpu_f64_compares_with_nan

    thread 'gpu::recomp::tests::gpu_f64_compares_with_nan' (8392) panicked at crates\xcl\src\gpu\recomp\tests.rs:104:35:
    called `Result::unwrap()` on an `Err` value: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::tests::gpu_f64_class_compare

    thread 'gpu::recomp::tests::gpu_f64_class_compare' (10168) panicked at crates\xcl\src\gpu\recomp\tests.rs:560:47:
    called `Result::unwrap()` on an `Err` value: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::tests::gpu_f64_roots

    thread 'gpu::recomp::tests::gpu_f64_roots' (8564) panicked at crates\xcl\src\gpu\recomp\tests.rs:104:35:
    called `Result::unwrap()` on an `Err` value: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::tests::gpu_f64_math_random

    thread 'gpu::recomp::tests::gpu_f64_math_random' (7120) panicked at crates\xcl\src\gpu\recomp\tests.rs:6540:47:
    called `Result::unwrap()` on an `Err` value: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::tests::gpu_f64_rounding_and_conversions

    thread 'gpu::recomp::tests::gpu_f64_rounding_and_conversions' (3876) panicked at crates\xcl\src\gpu\recomp\tests.rs:104:35:
    called `Result::unwrap()` on an `Err` value: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::tests::gpu_frexp_f64_exp_and_mant

    thread 'gpu::recomp::tests::gpu_frexp_f64_exp_and_mant' (6020) panicked at crates\xcl\src\gpu\recomp\tests.rs:795:47:
    called `Result::unwrap()` on an `Err` value: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::tests::gpu_ldexp_f64

    thread 'gpu::recomp::tests::gpu_ldexp_f64' (6520) panicked at crates\xcl\src\gpu\recomp\tests.rs:104:35:
    called `Result::unwrap()` on an `Err` value: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::tests::gpu_float_compares_random

    thread 'gpu::recomp::tests::gpu_float_compares_random' (4640) panicked at crates\xcl\src\gpu\recomp\tests.rs:6652:51:
    called `Result::unwrap()` on an `Err` value: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction

    thread 'gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction' (10804) panicked at crates\xcl\src\gpu\recomp\tests.rs:6857:5:
    assertion `left == right` failed: v_fma_f32 overflow control should stay fused
      left: 2139095040
     right: 1946157055
    
  • gpu::recomp::tests::gpu_ps_image_sample_offset_implicit_lod_between_mips

    thread 'gpu::recomp::tests::gpu_ps_image_sample_offset_implicit_lod_between_mips' (12892) panicked at crates\xcl\src\gpu\recomp\tests.rs:2112:13:
    pixel (0,0) = 25.609375, expected 26
    
  • gpu::recomp::tests::gpu_rndne_f64

    thread 'gpu::recomp::tests::gpu_rndne_f64' (11240) panicked at crates\xcl\src\gpu\recomp\tests.rs:735:47:
    called `Result::unwrap()` on an `Err` value: "CreateComputePipelineState: The parameter is incorrect. (0x80070057)"
    
  • gpu::recomp::tests::gpu_valu_16_and_64_bit

    thread 'gpu::recomp::tests::gpu_valu_16_and_64_bit' (6708) panicked at crates\xcl\src\gpu\recomp\tests.rs:2760:9:
    assertion `left == right` failed: lane 0 v_add_f16 keeps the high half
      left: 0
     right: 3203351424
    
  • gpu::recomp::tests::gpu_wave64_ps_whole_wave_reductions

    thread 'gpu::recomp::tests::gpu_wave64_ps_whole_wave_reductions' (11104) panicked at crates\xcl\src\gpu\recomp\tests.rs:2217:13:
    assertion `left == right` failed: pixel 0 (lane 0, wave of pixel 0): min / sum over the odd pixels, waterfall read
      left: [2, 217, 2]
     right: [2, 216, 2]
    
  • test_title_runs_and_game_folder_is_untouched

    thread 'test_title_runs_and_game_folder_is_untouched' (5116) panicked at crates\xcl\tests\e2e.rs:132:5:
    failed checks in the test title:
    [FAIL] D3D12.X: dynamic depth bias via RSSetDepthBiasX (#94): top-right [0, 0, 255, 255] (expected green: RSSetDepthBiasX(-1000.5) passes depth test)
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    

Not tested

  • Retail-world loading and scripts/smoke.ps1 on main and the PR head. No XCL_SAMPLE_* inputs were configured.
  • The workspace suite on origin/main or the merged tree. This run cannot establish which failures are regressions.
  • AMD and NVIDIA GPUs, native wave64 hardware, and successful native FP64 execution. Skip notices also identify unavailable D3D12 debug-layer coverage. Audio-device and system XGameRuntime probes reported unavailable host components.

AI use

  • T3 Code / Codex (gpt-6.2-sol, high reasoning effort) fetched and checked the commits, ran the build and tests, parsed the recorded output, and assembled this report.

Verified against suite-after-build.log and published by Coordinator #2 (T3 Code / Antigravity, gemini-4-neon).

@imnicho

imnicho commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

@JJAutoCompare thank you - an Intel run was in my "Not tested". For the reviewer, how I read it:

  • The two new tests and the Sleep tests pass on the Arc A770 (used_tests 8 / 8, a_sleep* 3 / 3).
  • The 26 failures are in other parts: 21 GPU unit tests where the Arc driver refuses a compute pipeline (0x80070057, gpu::dxil fuzz / ops tests among them), four output mismatches, and the synthetic title's depth-bias check. This PR changes pso_async.rs, two guards in real.rs and one in device_x.rs, none of which those tests run through. I have not seen a run of main on an Arc to set beside it, so that they fail there too is my expectation, not something measured; if you can run main 80f4819 (this head's base) the same way, the two lists would settle it.

AI use: Claude Code with Claude Fable 5.2 wrote this.

@nightmoon1996

Copy link
Copy Markdown

Runs of this head on an NVIDIA machine where main does end at the stall check, with the title's present thread kept in XCL's own work before a submit and no bind waiting. The conditions were not controlled (see Not tested), so read it as a data point.

Tested

  • NVIDIA GeForce RTX 4060 Ti 16 GB (driver 32.0.16.2101, 32-lane waves), Ryzen 5 5600, 64 GB RAM, Windows 11 Pro 26300, rustc 1.100.0 MSVC, DXC 1.9.2609.5.
  • Trees: main 3da2abb, and d4c6d34 merged onto 3da2abb locally (94382b5, a clean merge, not pushed anywhere).
  • Suite on 94382b5, debug, cargo build --workspace then cargo test --workspace -- --test-threads=4: 1113 passed, 0 failed, 46 ignored (on 3da2abb: 1111 passed, 0 failed, 46 ignored). a_long_pc_call_holds_the_title and short_pc_calls_between_two_frames_hold_the_title ran and passed. SKIPPED: 20 cases "no wave64", heap_window_out_of_memory_falls_back_to_the_switch_form ("no heap windows"), 3 per-lane f16 cases the per-lane form refuses.
  • Title: retail 1.0.2.1, release builds, XCL_NETWORK=0 XCL_ACTIVITY=1, XCL_THREAD_DUMP_AT every 4 to 10 s, warm DXIL and driver-blob caches, runs of up to 300 s, A pressed on a pad. Runs of the two builds alternated.
build runs reached a stretch of 25 s or more without a frame result of those
main 3da2abb 6 5 all 5 ended at game_scarlett_master.exe+0x2215c35 (write at 0x0, the address of #232), at 63.7, 78.8, 89.8, 93.1 and 97.6 s, 28 to 34 s after the frames stopped
d4c6d34 on 3da2abb 5 3 all 3 went on: no frame for 40 s (55 to 95 s), 35 s (56 to 91 s) and 25 s (26 to 51 s), then frames again and exit 0x0 at the 300 s limit, no device removal
  • Two of the five main runs that ended had XCL_PSO_WAIT_MS=50; the other three and every PR run had binds waiting. The sixth main run stayed at 30 fps for 300 s and never came to the stretch.
  • Where the thread was. main, the 78.8 s run, dumps at 60, 65, 68, 72 and 76 s: in all five the thread inside PresentX was in title_textures::refresh ← q_execute_command_lists ← present::present_now (resolved with a PDB of the same commit), at its own code (refresh_once and what is inlined into it) or in Thread::join under subresources_on; the title's thread that later wrote to 0x0 was in kernelx::Sleep in all five. The 97.6 s run's dump at the exception shows the same refresh stack. I did not resolve the other three main runs' dumps.
  • The PR runs, in their stretches without a frame: the submitting thread was in title_textures::refresh ← q_execute_command_lists in 9 of the 10 dumps from 55.7 to 100.4 s of the first, in the 3 dumps at 65, 72 and 81 s of the second, and in the one dump (40 s) of the third – in refresh_once, in Thread::join under subresources_on, and once in fence::wait ← texture::upload_batch. So the guard around q_execute_command_lists is the one that held here; create_placed_resource_x and finish_pso do not show in these dumps.

Not tested

  • The machine was not idle: another game was running on the same GPU and CPU in every run above (CPU load 70 to 100 %). That is probably why refresh takes this long here; an earlier run of main on the quiet machine passed this phase without ending. A run on a quiet machine with this head: not done.
  • The pad input was not scripted, so the runs did not press A at the same second.
  • The other two PR runs ended before a stretch without frames, at 42.9 s and 101.8 s, in XCL's own thread dump: unhandled exception 0xc0000005 in ntdll.dll+0x1ff2a, raised on the thread that takes the dump while it unwound another thread (what xcl run: thread dumps unwind a copy of each stopped thread's stack #253 is about). That is XCL_THREAD_DUMP_AT's doing, not this PR's code, but it means two runs say nothing about it.
  • No scripts/smoke.ps1 pair on this head. AMD. Anything past the first minutes of the world load.

AI use

  • Claude Code with Claude Fable 5.2 ran the builds, the suite and the title, resolved the dumps and wrote this report; the numbers are from those runs on the machine named.

@ivall

ivall commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Merged as 1a0bbe3, thank you. This is the AMD run it was waiting for.

Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug: ea088a5 + #2029 + #1782, cargo test --workspace --no-fail-fast -- --test-threads=4: 1248 passed, 2 failed, 46 ignored, 7 SKIPPED. The two failures are fuzz_validate_and_gpu_1 and _3 (#2115), on main too.

In the title (426a5a7 + #2180 + #2029 + #1782 + the #2080 stack with a fix, XCL_DIRECT_DXIL=1 XCL_PSO_PRELOAD=0, release): one run of 421 s, 30 fps in the menus, then the world load with no present from about 70 s on (pipelines being built, as before). No device removal and no crash; closed by hand.

Not measured: the effect of this change on its own, and the crash at 87 s reported on an older head, which did not come up in this run.

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this on the maintainer's behalf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

goal:world-load Bears on the retail title getting past world loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants