Frame clock: a schedule change at a deadline no longer skips its events #835
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/841"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by mastrr9 on 2026-11-24T06:39:47Z.
Fixes a frame-skipping race in
d3d12x::frame::clock_thread: whensleep_untilfinished atdeadlineand saw a changed schedulegeneration(e.g. a reschedule arriving during the unwatched 600 us spin window), the loop replanned fromqpc()(now pastdeadline), pushing every event due atdeadline(including the frame origin) a full frame interval later.deadlineinmissedand replans viareplan_after(missed.take(), qpc())(missed.min(now) - 1), so any event the new schedule still has due at that deadline fires immediately instead of being skipped for an entire interval.a_schedule_change_at_a_deadline_does_not_skip_it.Tested
617.42/32.0.16.1742), Windows 11 Pro 25H2 (26200.9974),rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC debug, DXC Windows SDK10.0.26100.0,d3d12SDKLayers.dllinstalled228b46b3b011b15aeb2d5478f5f99a9f0f9763f7cargo build --workspace: clean (only pre-existingfetch_updatedeprecation warning)cargo test --workspace -- --test-threads=4: 714 passed, 0 failed, 41 ignored (new testhle::d3d12x::frame::tests::a_schedule_change_at_a_deadline_does_not_skip_itpassed)SKIPPEDGPU tests:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64Not tested
scripts/smoke.ps1) not yet run (no retail title available in this clean-room environment); opened as Draft pending a smoke run.AI use
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T07:06:23Z.
Full-suite run, since this PR has no test report yet. Tested exact head
228b46b(on its basebeaa245).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 714 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.a_schedule_change_at_a_deadline_does_not_skip_it.Not tested
AI use
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T07:17:46Z.
Linux / AMD RDNA3 datapoint.
Merged state: head
228b46bonto mainbeaa245, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 707 passed, 7 failed, 41 ignored. Failures are the known Wine-lane set from my #42 rows plus #718 trio members; nothing here fails because of your change.a_schedule_change_at_a_deadline_does_not_skip_itandconsole_intervals_and_deadlinesok on this rig.Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
upstream-sync referenced this pull request2026-11-24 19:06:45 +00:00
Imported from ivall/xcl. Originally posted by CuteBooty on 2026-11-24T19:41:16Z.
Regression run on a retail title for
1fdbdb5: pass (no device removal, no crash, frames and peak commit within the check's limits).Tested
scripts\smoke.ps1 -Game <folder> -Seconds 60, no input, on this PR's head as it is and onmainbeaa245, the commit it branches from, each from a clean checkout. Each build ran twice back to back; the blocks are the second runs. Themainblock is shared with my reports on other PRs of the same base.main:
this PR:
Not tested
mainmerged in, AMD and Intel GPUs.AI use
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:57:21Z.
Empirical test report (
1fdbdb5f)Tested PR #841 at
1fdbdb5f3a19e1031b1bef78687c728b420a89bdin a clean, detached checkout.Hardware / environment
rustc 1.100.0 (0ef1bc386 2026-11-09), hostx86_64-pc-windows-msvc. DXC reported1.9.2609.5 (01b62ad47).XCL_ADAPTER=NONE_CPU_ONLYandRUST_TEST_NOCAPTURE=1. Both commands ran directly outside the Arc test harness and held no Arc GPU mutex.Commands and results
cargo test --workspace --no-runcompiled the workspace test executables and exited 0. This was a build-only check.cargo test -p xcl --lib hle::d3d12x::frame::tests::a_schedule_change_at_a_deadline_does_not_skip_it -- --exact --nocaptureexited 0. The captured log reports 1 passed, 0 failed, 0 ignored, and 693 filtered out. The case-sensitive^SKIPPEDcount was 0.Observed behavior
next_deadlineandreplan_afterusing integer tick values. It exercises deadline planning without starting the clock thread or using D3D12.now - 1.Not tested
The full GPU workspace suite and game smoke runs were omitted. Live clock-thread timing and event delivery in a running title were outside the focused test's scope.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr841-focused.logand published.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T10:27:57Z.
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:00:18Z.
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
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:41:41Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:16:59Z.
Triage (#1607) – head
3a02170No open or merged PR makes the same change. #1621 (also
frame.rs) revalidates the schedule inside ScheduleFrameEventX; this PR changes howclock_threadreplans after a generation change at the deadline, so they do not overlap.replan_afterplans from the missed deadline (or now, whichever is earlier), and sincelast[i]was not updated the due events fire late instead of a frame later;next_deadlinereturnsfirstwhenafteris before it, so a restarted clock is not skipped. No problems found in the diff.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.