Frame clock: report the gaps between shown frames with the activity line #2111
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2111
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2111"
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?
@brandostrong on GitHub · 2026-11-25 04:42 UTC · original
brandostrong:frame-stats→main· +50 −2 · 2 files · 1 commits · openXCL_ACTIVITY=1counts presents per 2 s, which says where a run stops but not what a frame cost: a run that holds 30 fps and one that alternates 30 fps with 4 s stalls print the same line. The gaps between shown frames are what the frame clock actually did, and they are the number a shader-compile fix has to move. This adds them to the line that already reports the activity.What is in it
crates/xcl/src/hle/d3d12x/present.rs:FrameTimesrecords each gap between shown frames whileXCL_ACTIVITYis set;frame_times()returns (p50, p95, max, gaps over 100 ms)crates/xcl/src/host.rs: the 2 s activity line ends with those four numbersTested
cargo build --workspace && cargo test --workspace -- --test-threads=4onb8e94b2: 1155 passed, 0 failed, 46 ignoredSKIPPEDon this adapter (24): the wave64 GPU tests (the adapter reports waves of 32 lanes) and the f16 / f32-conversion programs the direct path refuses;heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windowsRegression run
maincbc296a:this PR's head
b8e94b2(clean worktree):Not tested
AI use
🤖 Generated with Claude Code
@futurepro62 on GitHub · 2026-11-25 05:17 UTC · original · edited 2026-11-25 05:21 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
b8e94b2(on its basecbc296a).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1143 passed, 0 failed, 44 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.the_frame_clock_reports_percentiles_and_the_frames_over_100_ms.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1154 passed, 0 failed, 46 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),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))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),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))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on main6020a33too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 06:02 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@brandostrong on GitHub · 2026-11-25 09:54 UTC · original
Thanks — that is the AMD and second-NVIDIA coverage this PR was missing, and the Blackwell and RDNA2 iGPU runs both cover the new clock path (
the_frame_clock_reports_percentiles_and_the_frames_over_100_mspassing on both). Nothing to change for it; I will add your run to the PR's Tested as a third-party report namingb8e94b2.AI use: Claude Code (Claude Opus 5.5) wrote this reply.
@raylitebull on GitHub · 2026-11-25 10:51 UTC · original
Update: #2111 passed dual-vendor checks (NVIDIA RTX 4090 / RTX 5070 Ti / RTX 3060 Ti + AMD Radeon iGPU) and both CI checks, and recent merges on main introduced a merge conflict (DIRTY). @brandostrong — please rebase onto latest main so CI runs cleanly and we can merge!
@thehollowedone on GitHub · 2026-11-25 15:34 UTC · original
Independent Windows check of b8e94b2 integrated locally onto 0829441. The merge conflict was resolved by keeping both the present-ring and frame-percentile tests. Both passed.
I added two presents to the bundled synthetic title after deliberate waits of 135 ms and 40 ms. The PR logged three presents, but its maximum gap was 41 ms and it counted zero gaps over 100 ms. In this run the first call to the elapsed clock returned zero, which the guard also uses to mean that there was no previous frame. With a local one-line change to use the existing present count (if n != 0) instead of the prior timestamp as the guard, the same test logged a 136 ms maximum and one gap over 100 ms.
The workspace built and reported 1,273 passed, 0 failed, 46 ignored, including 26 runtime skips, both before and after that one-line change with the synthetic instrumentation removed. RTX 3080 Ti (621.35), Windows 11 build 26300, Rust 1.99.1 MSVC and DXC 1.8.2502.11. Synthetic tests only. AI-assisted. Codex (GPT-6, exact variant unavailable) resolved the local conflict, instrumented the fixture, checked the change and drafted this report.
@luckyteagirl on GitHub · 2026-11-26 08:54 UTC · original · reviewed
At exact head
b8e94b2(base6987e49, current mainb49be18), the new gap clock samples after optional frame-dump work rather than at the successful Present. This is a source-derived review; I did not run a timed title fixture.present.rssetsp.last = Instant::now()immediately aftersc.Present, then can wait up to 2,000 ms for a dump fence and write the bitmap beforePRESENTS/FRAME_TIMESsamplesnow_ms(). WithXCL_ACTIVITYandXCL_FRAME_DUMPtogether, a slow dump is charged to the gap ending at the already-shown frame and removed from the next gap. For example, Presents at 0, 20, and 115 ms have actual gaps 20 and 95 ms. If the middle frame's post-Present dump takes 90 ms, this telemetry records roughly 110 and 5 ms and falsely increments the “over 100 ms” count.Could the frame-time sample be taken alongside
p.last, before the dump wait/writes, and then added toFRAME_TIMESlater? A deterministic clock fixture with delayed work after a successful Present would protect the attribution.AI assistance: GPT-6.2 Sol found the timing path; GPT-6.2 Astra verified the exact-head source and example.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.