Frame clock: drain pending signals and origins when events end #2010

Open
eizispark wants to merge 1 commit from upstream-pr/2020 into main
eizispark commented 2026-11-25 00:55:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by eizispark on 2026-11-25T00:55:38Z.


Stopping the console frame clock (SetFrameIntervalX with length 0), changing its frame interval, or unscheduling a secondary event (ScheduleFrameEventX(..., UNSCHEDULE)) previously cleared only Kind::scheduled. Up to ORIGIN_SEMAPHORE_MAX (4) unconsumed counts remained in the origin semaphore together with their timestamps in ORIGINS, secondary auto-reset events (types 1 and 2) stayed signalled, and duplicated ancillary handles remained stored in Clock::kinds. After restarting or rescheduling, up to four WaitFrameEventX(0) calls returned in 0 ms and stamped newly issued frame tokens with pre-stop QPC origins, while rescheduled secondary events woke immediately before their new offset. In addition, clock_thread checked Clock::generation before signalling internal handles outside the lock, letting an in-flight tick from an ended schedule post a stale signal right after unscheduling.

What is in it

  • crates/xcl/src/hle/d3d12x/frame.rs: add unschedule_kind to clear duplicated ancillary handles, drain the origin semaphore and ORIGINS queue, and ResetEvent secondary internal events whenever an event is unscheduled in set_frame_interval_x or schedule_frame_event_x; publish internal signals inside clock_thread under the same Clock::generation check while keeping ancillary handle signalling outside the lock.
  • crates/xcl/src/hle/d3d12x/frame.rs (tests): add stopping_interval_change_and_unschedule_drop_stale_signals_and_origins verifying ancillary handle release, secondary event reset on UNSCHEDULE, fresh post-restart pacing and origin QPCs after stopping the clock, and fresh origin QPCs across an active interval change (which also eliminates the latent 0 ms order-dependent failure in origin_events_issue_tokens_and_flips_have_statistics).

Tested

  • Windows 11 x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT (driver 32.0.32015.16001), rustc 1.100.0 (0ef1bc386 2026-11-09), debug and release.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on the head, rebased onto main 426a5a7: 1241 passed, 3 failed – gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, fuzz_validate_and_gpu_3 and gpu::recomp::tests::gpu_image_get_resinfo_past_last_level, which fail the same way on a clean main 426a5a7 on this adapter; 46 ignored.
  • cargo test -p xcl --lib hle::d3d12x::frame -- --test-threads=4: 6 passed, 0 failed, including #1053's interval_override_parsing_and_clamping.
  • stopping_interval_change_and_unschedule_drop_stale_signals_and_origins failed before the fix: 4 unconsumed origin counts carried across SetFrameIntervalX(..., 0, ...).

Regression run

main:

xcl-smoke v1
commit: 426a5a745db4d5e4b037449ede0b70cb342f5192
gpu: AMD Radeon RX 9070 XT
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1680 (PresentX 1680)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14599 MB

PR head:

xcl-smoke v1
commit: bb461bb5f4552ed36c4d5175125cee7aa5b72096
gpu: AMD Radeon RX 9070 XT
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1671 (PresentX 1671)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14566 MB

Not tested

  • 120 Hz display intervals (8 333 µs / 25 000 µs), NVIDIA and Intel GPUs, Windows 10, wave32-only adapters, and XCL_SAMPLE_* sample-data tests.

AI use

  • Antigravity (Google DeepMind, Gemini 4 Carbon) – audited the frame clock's stop and unschedule transitions in frame.rs, wrote the fix and unit test, and ran the test suite and smoke check. Antigravity (Claude Opus 5.5) – rebased it onto main 426a5a7 over #1053 (the clock thread keeps sleep_until(timer, deadline, allow_spin) and checks the generation under the lock, where the signals are published), and reran the suite and the smoke pair.
<!-- greyfinch-sync:ivall/xcl:issue:5483013052 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2020). Originally posted by [eizispark](https://github.com/eizispark) on 2026-11-25T00:55:38Z. --- Stopping the console frame clock (`SetFrameIntervalX` with length `0`), changing its frame interval, or unscheduling a secondary event (`ScheduleFrameEventX(..., UNSCHEDULE)`) previously cleared only `Kind::scheduled`. Up to `ORIGIN_SEMAPHORE_MAX` (`4`) unconsumed counts remained in the origin semaphore together with their timestamps in `ORIGINS`, secondary auto-reset events (`types 1 and 2`) stayed signalled, and duplicated ancillary handles remained stored in `Clock::kinds`. After restarting or rescheduling, up to four `WaitFrameEventX(0)` calls returned in `0 ms` and stamped newly issued frame tokens with pre-stop QPC origins, while rescheduled secondary events woke immediately before their new offset. In addition, `clock_thread` checked `Clock::generation` before signalling internal handles outside the lock, letting an in-flight tick from an ended schedule post a stale signal right after unscheduling. **What is in it** - `crates/xcl/src/hle/d3d12x/frame.rs`: add `unschedule_kind` to clear duplicated ancillary handles, drain the origin semaphore and `ORIGINS` queue, and `ResetEvent` secondary internal events whenever an event is unscheduled in `set_frame_interval_x` or `schedule_frame_event_x`; publish internal signals inside `clock_thread` under the same `Clock::generation` check while keeping ancillary handle signalling outside the lock. - `crates/xcl/src/hle/d3d12x/frame.rs` (`tests`): add `stopping_interval_change_and_unschedule_drop_stale_signals_and_origins` verifying ancillary handle release, secondary event reset on `UNSCHEDULE`, fresh post-restart pacing and origin QPCs after stopping the clock, and fresh origin QPCs across an active interval change (which also eliminates the latent `0 ms` order-dependent failure in `origin_events_issue_tokens_and_flips_have_statistics`). **Tested** - Windows 11 x64, AMD Ryzen 7 9800X3D, AMD Radeon RX 9070 XT (driver `32.0.32015.16001`), `rustc 1.100.0 (0ef1bc386 2026-11-09)`, debug and release. - `cargo test --workspace --no-fail-fast -- --test-threads=4` on the head, rebased onto `main` `426a5a7`: 1241 passed, 3 failed – `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, `fuzz_validate_and_gpu_3` and `gpu::recomp::tests::gpu_image_get_resinfo_past_last_level`, which fail the same way on a clean `main` `426a5a7` on this adapter; 46 ignored. - `cargo test -p xcl --lib hle::d3d12x::frame -- --test-threads=4`: 6 passed, 0 failed, including #1053's `interval_override_parsing_and_clamping`. - `stopping_interval_change_and_unschedule_drop_stale_signals_and_origins` failed before the fix: 4 unconsumed origin counts carried across `SetFrameIntervalX(..., 0, ...)`. **Regression run** `main`: ``` xcl-smoke v1 commit: 426a5a745db4d5e4b037449ede0b70cb342f5192 gpu: AMD Radeon RX 9070 XT title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1680 (PresentX 1680) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14599 MB ``` PR head: ``` xcl-smoke v1 commit: bb461bb5f4552ed36c4d5175125cee7aa5b72096 gpu: AMD Radeon RX 9070 XT title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1671 (PresentX 1671) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14566 MB ``` **Not tested** - 120 Hz display intervals (`8 333 µs` / `25 000 µs`), NVIDIA and Intel GPUs, Windows 10, wave32-only adapters, and `XCL_SAMPLE_*` sample-data tests. **AI use** - Antigravity (Google DeepMind, Gemini 4 Carbon) – audited the frame clock's stop and unschedule transitions in `frame.rs`, wrote the fix and unit test, and ran the test suite and smoke check. Antigravity (Claude Opus 5.5) – rebased it onto `main` `426a5a7` over #1053 (the clock thread keeps `sleep_until(timer, deadline, allow_spin)` and checks the generation under the lock, where the signals are published), and reran the suite and the smoke pair.
raylitebull commented 2026-11-25 02:08:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T01:12:51Z.


Code review on 21a7291:

  • crates/xcl/src/hle/d3d12x/frame.rs cleanly drains pending signals and pending_origins when events end (ending_events_clears_pending_signals_and_origins), verified on AMD RX 9070 XT.

Remaining before merge:

  1. Rebase onto current main (currently CONFLICTING) so Build and test (Windows, no GPU) can run against main.
  2. An NVIDIA verification pass on the rebased head.
<!-- greyfinch-sync:ivall/xcl:comment:7149320332 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2020#issuecomment-7149320332). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T01:12:51Z. --- Code review on `21a7291`: - `crates/xcl/src/hle/d3d12x/frame.rs` cleanly drains pending signals and `pending_origins` when events end (`ending_events_clears_pending_signals_and_origins`), verified on AMD RX 9070 XT. **Remaining before merge:** 1. Rebase onto current `main` (currently `CONFLICTING`) so `Build and test (Windows, no GPU)` can run against `main`. 2. An **NVIDIA** verification pass on the rebased head.
fromthemoonx commented 2026-11-25 02:08:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-25T01:22:21Z.


Rerun on the rebased head bb461bb: passes on the RTX 3060, and the conflict with main is gone. cargo test --workspace --no-fail-fast -- --test-threads=4: 1244 passed, 0 failed, 46 ignored (base 426a5a7; merges into main 1a0bbe3 without conflicts). hle::d3d12x::frame -- --test-threads=4: 6 passed, 20 of 20 runs (including #1053's interval_override_parsing_and_clamping). The same mutation (drain in unschedule_kind disabled) still fails only stopping_interval_change_and_unschedule_drop_stale_signals_and_origins. The report below is for 21a7291.


Passes at the head on an RTX 3060 / Ryzen 7 5700X, and the new test fails without the fix. As the review above says, it needs a rebase: the conflict is in frame.rs, with 4f4db64 (#1053's frame interval override).

  • Exact head 21a7291 (base 4178e88): cargo build --workspace + cargo test --workspace --no-fail-fast -- --test-threads=4: 892 passed, 0 failed, 42 ignored. No GPU tests skipped beyond the usual ones for no wave64 and no heap windows.
  • Merged onto main 5796cc4: CONFLICT (content): Merge conflict in crates/xcl/src/hle/d3d12x/frame.rs. The only commit on main since the base that touches the file is 4f4db64. I did not resolve it, so there is no merged-tree run.
  • cargo test -p xcl --lib hle::d3d12x::frame -- --test-threads=4, 20 runs: 20 of 20 passed (5 tests each), including origin_events_issue_tokens_and_flips_have_statistics. So the timing tests hold on this CPU too.
  • Mutation: with the drain in unschedule_kind disabled (if false && !k.internal.is_null()), stopping_interval_change_and_unschedule_drop_stale_signals_and_origins fails (frame.rs:697). The other 4 frame tests still pass, so the new test is what covers it.

Hardware: RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug.

Not tested: the tree merged with main (conflict), 120 Hz intervals, Windows 10, a release build.

AI use: Claude Code (Claude Opus 5.5) ran the tests and the mutation check and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7149477739 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2020#issuecomment-7149477739). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-25T01:22:21Z. --- **Rerun on the rebased head `bb461bb`: passes on the RTX 3060, and the conflict with `main` is gone.** `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1244 passed, 0 failed, 46 ignored (base `426a5a7`; merges into `main` `1a0bbe3` without conflicts). `hle::d3d12x::frame -- --test-threads=4`: 6 passed, 20 of 20 runs (including #1053's `interval_override_parsing_and_clamping`). The same mutation (drain in `unschedule_kind` disabled) still fails only `stopping_interval_change_and_unschedule_drop_stale_signals_and_origins`. The report below is for `21a7291`. --- Passes at the head on an RTX 3060 / Ryzen 7 5700X, and the new test fails without the fix. As the review above says, it needs a rebase: the conflict is in `frame.rs`, with `4f4db64` (#1053's frame interval override). - Exact head `21a7291` (base `4178e88`): `cargo build --workspace` + `cargo test --workspace --no-fail-fast -- --test-threads=4`: **892 passed, 0 failed, 42 ignored**. No GPU tests skipped beyond the usual ones for no wave64 and no heap windows. - Merged onto main `5796cc4`: `CONFLICT (content): Merge conflict in crates/xcl/src/hle/d3d12x/frame.rs`. The only commit on `main` since the base that touches the file is `4f4db64`. I did not resolve it, so there is no merged-tree run. - `cargo test -p xcl --lib hle::d3d12x::frame -- --test-threads=4`, 20 runs: 20 of 20 passed (5 tests each), including `origin_events_issue_tokens_and_flips_have_statistics`. So the timing tests hold on this CPU too. - Mutation: with the drain in `unschedule_kind` disabled (`if false && !k.internal.is_null()`), `stopping_interval_change_and_unschedule_drop_stale_signals_and_origins` fails (`frame.rs:697`). The other 4 frame tests still pass, so the new test is what covers it. **Hardware:** RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug. **Not tested:** the tree merged with `main` (conflict), 120 Hz intervals, Windows 10, a release build. **AI use:** Claude Code (Claude Opus 5.5) ran the tests and the mutation check and wrote this report.
raylitebull commented 2026-11-25 02:08:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T01:25:49Z.


Nice — @fromthemoonx's RTX 3060 pass (892 passed, 0 failed, 42 ignored) gives 21a7291 both AMD (RX 9070 XT) and NVIDIA coverage. Once rebased onto main (resolving the #1053 frame.rs conflict) with Build and test green and a quick confirm on the rebased head, this will be ready to merge.

<!-- greyfinch-sync:ivall/xcl:comment:7149537273 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2020#issuecomment-7149537273). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T01:25:49Z. --- Nice — `@fromthemoonx`'s RTX 3060 pass (`892 passed, 0 failed, 42 ignored`) gives `21a7291` both AMD (`RX 9070 XT`) and NVIDIA coverage. Once rebased onto `main` (resolving the `#1053` `frame.rs` conflict) with `Build and test` green and a quick confirm on the rebased head, this will be ready to merge.
JJAutoCompare commented 2026-11-25 02:08:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T01:34:03Z.


PR #2020 empirical test report

Tested the clean live head 21a7291ea41893218026938cfbaf818a64d06585 of xcl-dev/xcl#2020 (Frame clock: drain pending signals and origins when events end).

  • Merge check: git merge-tree --write-tree origin/main HEAD found a content conflict in crates/xcl/src/hle/d3d12x/frame.rs against origin/main at 8f5fca5bb9ad6e695093d75294ad2cec023bba60.

Tested

  • Host: STOR-WINLAB, Windows 11 Enterprise Evaluation x64 build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave lanes 8–32, DoublePrecisionFloatShaderOps=0).
  • Toolchain: Rust 1.100.0 (0ef1bc386), DXC 1.9.2609.5 (01b62ad4), unoptimized dev/test profiles with CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0, XCL_ADAPTER=A770.
  • cargo test --workspace --no-run and cargo build --workspace succeeded (producing the test-title executable and DLL required by e2e).
  • cargo test -p xcl --lib hle::d3d12x::frame::tests:: -- --show-output (outside GPU lock): 5 passed, 0 failed, 0 ignored, 0 skipped (including the new regression test).
  • cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output (under Invoke-ArcTest.ps1): exited 101 across 20 test harness summaries with 874 passed, 18 failed, 42 ignored in raw Cargo totals, including 7 explicit SKIPPED GPU tests (not counted as coverage, leaving 867 non-skipped passes).
    • Failures: 17 GPU tests in -p xcl --lib (CreateComputePipelineState: 0x80070057 / Arc shader assertions) and 1 in -p xcl --test e2e (test_title_runs_and_game_folder_is_untouched synthetic-title RSSetDepthBiasX pixel check).

Explicit GPU skips (7)

  • gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask — no wave64
  • gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware — no wave64
  • shaders::tests::pso_measurement_compiles_an_exact_synthetic_record — cannot disable driver cache (Windows Developer Mode required, 0x887A002D)
  • placed_title_textures_share_vram_and_preserve_pixels — tiled tier < 2
  • test_title_draws_with_a_root_signature_under_the_debug_layer — no d3d12SDKLayers.dll
  • heap_window_out_of_memory_falls_back_to_the_switch_form — no heap windows
  • uploads_start_from_each_subresources_state — no D3D12 debug layer (0x887A002D)

Not tested

  • Same-host origin/main baseline comparison in this run (so the 18 GPU/e2e failures are not attributed to this PR here).
  • Retail-title scripts/smoke.ps1 regression runs and optional XCL_SAMPLE_* datasets.
  • AMD / NVIDIA GPUs, wave64 hardware, FP64 hardware ops, and D3D12 debug-layer paths.

AI use

  • T3 Code / Codex (gpt-6.2-sol) fetched and checked the PR head, built and ran the targeted and workspace tests, and summarized the logs. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified the counts against suite.log and published this report.
<!-- greyfinch-sync:ivall/xcl:comment:7149695565 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2020#issuecomment-7149695565). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T01:34:03Z. --- # PR #2020 empirical test report Tested the clean live head `21a7291ea41893218026938cfbaf818a64d06585` of [xcl-dev/xcl#2020](https://github.com/xcl-dev/xcl/pull/2020) (*Frame clock: drain pending signals and origins when events end*). - **Merge check:** `git merge-tree --write-tree origin/main HEAD` found a content conflict in `crates/xcl/src/hle/d3d12x/frame.rs` against `origin/main` at `8f5fca5bb9ad6e695093d75294ad2cec023bba60`. ## Tested - **Host:** STOR-WINLAB, Windows 11 Enterprise Evaluation x64 build `26200.9974`, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver `32.0.101.9175`, wave lanes 8–32, `DoublePrecisionFloatShaderOps=0`). - **Toolchain:** Rust `1.100.0 (0ef1bc386)`, DXC `1.9.2609.5 (01b62ad4)`, unoptimized dev/test profiles with `CARGO_INCREMENTAL=0`, `CARGO_PROFILE_DEV_DEBUG=0`, `CARGO_PROFILE_TEST_DEBUG=0`, `XCL_ADAPTER=A770`. - `cargo test --workspace --no-run` and `cargo build --workspace` succeeded (producing the test-title executable and DLL required by `e2e`). - `cargo test -p xcl --lib hle::d3d12x::frame::tests:: -- --show-output` (outside GPU lock): **5 passed, 0 failed, 0 ignored, 0 skipped** (including the new regression test). - `cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output` (under `Invoke-ArcTest.ps1`): exited `101` across 20 test harness summaries with **874 passed, 18 failed, 42 ignored** in raw Cargo totals, including **7 explicit `SKIPPED` GPU tests** (not counted as coverage, leaving 867 non-skipped passes). - Failures: 17 GPU tests in `-p xcl --lib` (`CreateComputePipelineState: 0x80070057` / Arc shader assertions) and 1 in `-p xcl --test e2e` (`test_title_runs_and_game_folder_is_untouched` synthetic-title `RSSetDepthBiasX` pixel check). ### Explicit GPU skips (7) - `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` — no wave64 - `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` — no wave64 - `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` — cannot disable driver cache (Windows Developer Mode required, `0x887A002D`) - `placed_title_textures_share_vram_and_preserve_pixels` — tiled tier < 2 - `test_title_draws_with_a_root_signature_under_the_debug_layer` — no `d3d12SDKLayers.dll` - `heap_window_out_of_memory_falls_back_to_the_switch_form` — no heap windows - `uploads_start_from_each_subresources_state` — no D3D12 debug layer (`0x887A002D`) ## Not tested - Same-host `origin/main` baseline comparison in this run (so the 18 GPU/e2e failures are not attributed to this PR here). - Retail-title `scripts/smoke.ps1` regression runs and optional `XCL_SAMPLE_*` datasets. - AMD / NVIDIA GPUs, wave64 hardware, FP64 hardware ops, and D3D12 debug-layer paths. ## AI use - T3 Code / Codex (`gpt-6.2-sol`) fetched and checked the PR head, built and ran the targeted and workspace tests, and summarized the logs. Coordinator #2 (T3 Code / Antigravity, `gemini-4-neon`) verified the counts against `suite.log` and published this report.
DavidM1911 commented 2026-11-25 04:10:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T04:01:37Z.


Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7152459981 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2020#issuecomment-7152459981). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T04:01:37Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
eizispark commented 2026-11-25 12:06:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by eizispark on 2026-11-25T11:45:21Z.


Rebased onto main 426a5a7 as bb461bb, as @raylitebull and @fromthemoonx asked. The conflict with #1053 was one line in clock_thread. The resolved version keeps sleep_until(timer, deadline, allow_spin) and leaves the generation check out of that line, because the PR does that check under the CLOCK lock where the origins and internal events are published. #1053's effective interval and the uncapped path are untouched.

On the RX 9070 XT: hle::d3d12x::frame 6 passed (including #1053's interval_override_parsing_and_clamping). Full workspace: 1241 passed; the 3 failures are the same ones that fail on a clean main 426a5a7 here. New smoke pair in the description: 1680 frames on main, 1671 on the PR, no removals or crashes. Thanks @fromthemoonx for the NVIDIA run and the mutation check on 21a7291.

<!-- greyfinch-sync:ivall/xcl:comment:7161457029 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2020#issuecomment-7161457029). Originally posted by [eizispark](https://github.com/eizispark) on 2026-11-25T11:45:21Z. --- Rebased onto `main` `426a5a7` as `bb461bb`, as @raylitebull and @fromthemoonx asked. The conflict with #1053 was one line in `clock_thread`. The resolved version keeps `sleep_until(timer, deadline, allow_spin)` and leaves the generation check out of that line, because the PR does that check under the `CLOCK` lock where the origins and internal events are published. #1053's effective interval and the uncapped path are untouched. On the RX 9070 XT: `hle::d3d12x::frame` 6 passed (including #1053's `interval_override_parsing_and_clamping`). Full workspace: 1241 passed; the 3 failures are the same ones that fail on a clean `main` `426a5a7` here. New smoke pair in the description: 1680 frames on main, 1671 on the PR, no removals or crashes. Thanks @fromthemoonx for the NVIDIA run and the mutation check on `21a7291`.
DavidM1911 commented 2026-11-26 01:05:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T00:49:45Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7179154229 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2020#issuecomment-7179154229). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T00:49:45Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
upipibi commented 2026-11-26 21:29:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-26T21:29:50Z.


Tested head bb461bb5f4552ed36c4d5175125cee7aa5b72096 (merge-base with main 426a5a7) on Windows 11 Pro 26100, rustc 1.100.0 MSVC, debug, CPU only (no GPU opened).

cargo test -p xcl --lib hle::d3d12x::frame:: -- --test-threads=1: head 6 passed, 0 failed, 0 ignored; merge-base 5 passed, 0 failed. New on head: stopping_interval_change_and_unschedule_drop_stale_signals_and_origins. Applied to the merge-base 426a5a745db4d5e4b037449ede0b70cb342f5192 code (test hunk only, no fix), hle::d3d12x::frame::tests::stopping_interval_change_and_unschedule_drop_stale_signals_and_origins fails at frame.rs:752 with stop drops ancillary handles, 0 passed, 1 failed.

Not tested: full suite, GPU, retail title. AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).

<!-- greyfinch-sync:ivall/xcl:comment:7203782096 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2020#issuecomment-7203782096). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-26T21:29:50Z. --- Tested head `bb461bb5f4552ed36c4d5175125cee7aa5b72096` (merge-base with main `426a5a7`) on Windows 11 Pro 26100, rustc 1.100.0 MSVC, debug, CPU only (no GPU opened). `cargo test -p xcl --lib hle::d3d12x::frame:: -- --test-threads=1`: head 6 passed, 0 failed, 0 ignored; merge-base 5 passed, 0 failed. New on head: `stopping_interval_change_and_unschedule_drop_stale_signals_and_origins`. Applied to the merge-base `426a5a745db4d5e4b037449ede0b70cb342f5192` code (test hunk only, no fix), `hle::d3d12x::frame::tests::stopping_interval_change_and_unschedule_drop_stale_signals_and_origins` fails at frame.rs:752 with `stop drops ancillary handles`, 0 passed, 1 failed. Not tested: full suite, GPU, retail title. AI-assisted (Claude Code, Claude Sonnet 5.5 ran the tests; Claude Opus 5.5 checked and posted).
Decodere commented 2026-11-27 05:01:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T05:01:27Z.


Independent desktop NVIDIA verification of PR #2020 at head bb461bb5f4552ed36c4d5175125cee7aa5b72096 (1 commit; exact parent & merge-base: 426a5a745db4d5e4b037449ede0b70cb342f5192, pre-#2555 ancestor of main).

Environment

  • 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 (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (bb461bb5)

Command Result
cargo test --release -p xcl --lib stopping_interval_change_and_unschedule_drop_stale_signals_and_origins -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1200 filtered out × 3 (0.30s × 3, 0 skipped)
cargo test --release -p xcl --lib hle::d3d12x::frame:: -- --test-threads=1 (3 consecutive runs) 6 passed; 0 failed; 0 ignored; 1195 filtered out × 3 (0.62s × 3, 0 skipped)
cargo build --release -p xcl Clean build (1m 04s, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (426a5a745db4d5e4b037449ede0b70cb342f5192, cached baseline on the same machine):

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

PR #2020 (bb461bb5f4552ed36c4d5175125cee7aa5b72096):

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

Runtime log observations (xcl.log)

  • 9203 log lines, 0 [ERROR] / device-removal / panic lines (dxil_cache: 460 hits, 0 misses, 0 compilation failures; 228 background pipelines, 0 failures).
  • Final draw/memory telemetry in log: 19480 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 14466 MB committed by the process; video memory 6115 MB local, 4683 MB non-local.

Limits of coverage

  • Draining pending origin-semaphore counts, ORIGINS timestamps, secondary auto-reset events, and ancillary handles across SetFrameIntervalX stop/interval changes and ScheduleFrameEventX unscheduling was directly verified via stopping_interval_change_and_unschedule_drop_stale_signals_and_origins (3/3) and hle::d3d12x::frame:: (6/6 × 3).
  • The 60 s retail smoke confirms steady 60 60 60 frame-clock pacing and zero runtime regression on title: 29640639 (single-run frame/commit delta vs. cached parent reflects normal startup variance, not this PR); it did not drive a dynamic mid-session SetFrameIntervalX cadence switch.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7210284635 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2020#issuecomment-7210284635). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T05:01:27Z. --- Independent desktop NVIDIA verification of **PR #2020** at head `bb461bb5f4552ed36c4d5175125cee7aa5b72096` (`1` commit; exact parent & merge-base: `426a5a745db4d5e4b037449ede0b70cb342f5192`, pre-`#2555` ancestor of `main`). ### Environment - **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 (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`bb461bb5`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib stopping_interval_change_and_unschedule_drop_stale_signals_and_origins -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1200 filtered out` × 3 (`0.30s` × 3, `0` skipped) | | `cargo test --release -p xcl --lib hle::d3d12x::frame:: -- --test-threads=1` (3 consecutive runs) | `6 passed; 0 failed; 0 ignored; 1195 filtered out` × 3 (`0.62s` × 3, `0` skipped) | | `cargo build --release -p xcl` | Clean build (`1m 04s`, exit `0`, `0` new warnings) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base (`426a5a745db4d5e4b037449ede0b70cb342f5192`, cached baseline on the same machine): ``` xcl-smoke v1 commit: 426a5a745db4d5e4b037449ede0b70cb342f5192 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1591 (PresentX 1591) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14477 MB ``` PR #2020 (`bb461bb5f4552ed36c4d5175125cee7aa5b72096`): ``` xcl-smoke v1 commit: bb461bb5f4552ed36c4d5175125cee7aa5b72096 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1588 (PresentX 1588) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14466 MB ``` ### Runtime log observations (`xcl.log`) - `9203` log lines, `0` `[ERROR]` / device-removal / panic lines (`dxil_cache`: `460` hits, `0` misses, `0` compilation failures; `228` background pipelines, `0` failures). - Final draw/memory telemetry in log: `19480 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped)`; last memory sample `14466 MB committed by the process; video memory 6115 MB local, 4683 MB non-local`. ### Limits of coverage - Draining pending origin-semaphore counts, `ORIGINS` timestamps, secondary auto-reset events, and ancillary handles across `SetFrameIntervalX` stop/interval changes and `ScheduleFrameEventX` unscheduling was directly verified via `stopping_interval_change_and_unschedule_drop_stale_signals_and_origins` (`3/3`) and `hle::d3d12x::frame::` (`6/6` × 3). - The 60 s retail smoke confirms steady `60 60 60` frame-clock pacing and zero runtime regression on `title: 29640639` (single-run frame/commit delta vs. cached parent reflects normal startup variance, not this PR); it did not drive a dynamic mid-session `SetFrameIntervalX` cadence switch. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
Foniass commented 2026-12-01 07:12:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:12:27Z.


Triage (#1607) – head bb461bb

No open or merged PR drains the origin semaphore / ORIGINS queue or resets the type 1/2 events on unschedule; #841 and #1621 touch the same clock code (the generation check in clock_thread, the schedule_frame_event_x commit) for different problems, and the branch conflicts with main's frame.rs changes (#3294, 8aba55ba).
No problems found in the diff; lock order is CLOCK then ORIGINS in both unschedule_kind and the clock thread, and a wait that loses its queued origin to the drain falls back to qpc(). The new test depends on sleeps of 25-85 ms.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7303771493 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2020#issuecomment-7303771493). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:12:27Z. --- **Triage (#1607)** – head bb461bb No open or merged PR drains the origin semaphore / ORIGINS queue or resets the type 1/2 events on unschedule; #841 and #1621 touch the same clock code (the generation check in `clock_thread`, the `schedule_frame_event_x` commit) for different problems, and the branch conflicts with main's frame.rs changes (#3294, 8aba55ba). No problems found in the diff; lock order is CLOCK then ORIGINS in both `unschedule_kind` and the clock thread, and a wait that loses its queued origin to the drain falls back to `qpc()`. The new test depends on sleeps of 25-85 ms. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2020:upstream-pr/2020'
git switch 'upstream-pr/2020'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2020'
git switch 'upstream-pr/2020'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2020'
git switch 'upstream-pr/2020'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2020'
git switch 'main'
git merge --squash 'upstream-pr/2020'
git switch 'main'
git merge --ff-only 'upstream-pr/2020'
git switch 'main'
git merge 'upstream-pr/2020'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2010
No description provided.