Repository navigation
Conversation
…start The scripted presses (XCL_PRESS_AT / XCL_PRESS_A_AT) compared the schedule with the host's uptime. The startup shader preparation runs before the guest and can take longer than the whole script, so every press was already past when the title first polled its input: a cold preparation consumed the schedule and the title then stayed on its first screen. Record the moment preparation returns (log::mark_guest_entry) and count the schedule from it; before it nothing is pressed. The decision is a pure function (press_held) with a unit test. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Paired native Windows test of actual guest-visible GameInput readings after startup preparation. Clean release
No retail title in this test. OpenAI Codex (6.2sol) assisted with verification. |
|
Follow-up tested on top of Same native Windows / RTX 5070 Ti Laptop setup and synthetic GameInput guest as above, clean XCL caches, |
The marker moves from host_main (right after shader preparation) to loader::main_thread, immediately before the call to the mapped PE entry point, so runtime init and loading are not counted either (about 0.4 s of the schedule was lost before). Suggested and verified by ettehn in review. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks @ettehn, that's a clear measurement. The entry point is the right origin. Adopted as |
|
Heads-up on an overlap, so the two don't conflict: #2637 (frame-matched input rules) carries a fix for the same press clock in @ettehn's measurement here applies to ours as well. That marker still sits before the TLS callbacks, So our plan is to drop AI use: Gemini (Antigravity) compared the two diffs; Claude Code (Claude Opus 5.5) checked it against |
|
In-title check on an RTX 5090, as offered above.
So, on the retail title, the schedule now counts from the entry point as intended. On Not tested: schedules that need presses during the TLS callbacks (the case @ettehn noted); AMD; a cold cache. AI use: Claude Code (Claude Opus 5.5) ran both arms (t12) and wrote this comment. |
|
AMD check of PR #2933 on an RX 7800 XT, driver I ran the same synthetic guest twice on each build. Its TLS callback delays entry by five seconds. After entry, it polls GameInput every 5 ms for nine seconds. Both builds used
Build | Guest entry on host clock | First A press seen by guest
-- | -- | --
Base, run 1 | 5.282 s | None
PR, run 1 | 5.297 s | Guest main +1,998 ms
Base, run 2 | 5.290 s | None
PR, run 2 | 5.279 s | Guest main +2,005 ms
All four runs exited Retail-title scope: On these commits, startup shader preparation could not be disabled with AI use: OpenAI Codex (GPT-6) built both commits, wrote the synthetic guest, ran and compared the tests, and drafted this report. |
|
Closing out our earlier claim (#issuecomment-7229578155) and adding a second native Windows AMD data point alongside @moombathepilot's RX 7800 XT report (#issuecomment-7230446728, which already covers the synthetic GameInput PE verification on Tested
Not tested
AI use
|
|
NVIDIA and AMD full-suite run, to go with the reports above by moombathepilot, oni-swr, since none of them covers NVIDIA. Tested exact head Tested
Not tested
AI use
|
|
No open or merged PR makes this change. On main, AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
XCL_PRESS_AT/XCL_PRESS_A_ATcompared their schedule with the host's uptime (log::uptime(), the log's clock). The startup shader preparation runs before the guest is entered (host.rs,preparation::before_guest) and can take longer than the whole script, so on a cold preparation (about 38 minutes on the machine below) every scheduled press was already in the past when the title first polled its input: the title then stayed on its first screen for the whole run.The schedule now counts from the moment the title's entry point is called (after preparation and loading); before that nothing is pressed. The log's times are unchanged.
What is in it
crates/xcl/src/log.rs:mark_guest_entry()records the instant,guest_uptime()returns the seconds since it (Nonebefore).crates/xcl/src/loader.rs: one call tomark_guest_entry()inmain_thread, immediately before the mapped entry point is called (moved there fromhost_mainafter review: ettehn measured that the earlier marker still lost ~0.4 s of the schedule to runtime init and loading).crates/xcl/src/hle/gameinput.rs:scripted()usesguest_uptime()through a purepress_held(at, t); the doc comments forXCL_PRESS_*now say the schedule counts from the title's entry point. New unit testscripted_presses_count_from_guest_entry. (README does not mentionXCL_PRESS_*;HANDOFF.mdline aboutXCL_PRESS_A_AT=s1,s2…("at those seconds") is still right if read as "of the run", not edited.)Tested
cargo check -p xcl: ok.cargo test --workspace --no-fail-fast -- --test-threads=4on this head2a318283(aftercargo build --workspace): 1446 passed, 1 failed, 47 ignored. SKIPPED lines: 29 (21 no wave64, 3 no D3D12 debug layer, 3 f16 per-lane form refused (gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426), 1 cannot disable the driver cache, 1 no heap windows). The one failure ishle::d3d12x::list_x::tests::a_dispatch_with_a_pipeline_still_building_waits_at_the_submit(segment count 199 vs 421). It passes when run alone, 2 of 2 on this head and 2 of 2 on main8b957bec, so it looks like a parallel-run flake in code this PR doesn't touch. The first commit1286ef91had 1447 passed, 0 failed.press_heldtreating "guest not entered" as a time inside the schedule (the old behaviour: the preparation time counts) it fails withleft: 4, right: 0(an A press fires during preparation); with the fix it passes.nvidia-deveff3bcab(same code ingameinput.rs) after a 38.5-minute cold preparation. AllXCL_PRESS_A_ATpresses had fired before guest entry, and the title stayed on its first screen (0 DirectStorage reads, flat draw count). The same script with a warm cache (preparation ~1 min) reached the world. That run was not repeated with this fix.Regression run
Two 60 s
scripts/smoke.ps1runs on the same title, back to back, warm shader cache, on the machine under Tested (RTX 2060 SUPER 8 GB). Both runs had the same environment set in the calling shell (our usual 8 GB recipe; it keeps the shader cache warm on this PC):main
8b957bec:This PR's head
2a318283:Head: 0 device removals, 0 crashes, 102 % of main's frames, 99 % of main's peak commit.
XCL_PRESS_A_ATis in that environment. In the main run its early presses fired during the preparation, and in the head run they land after the title starts (the change itself). So the frame counts are a pass/fail check, not a measurement of the fix.Not tested
XCL_PRESS_A_ATset across a long cold preparation; the mechanism follows from the code and the unit test.scripts/smoke.ps1sets no press schedule, so the smoke runs only show that nothing else changed.AI use
🤖 Generated with Claude Code