XGameRuntime: synchronize device association registration and unregister (#1389) #1408
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1418"
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 hajduzsolt on 2026-11-24T15:46:09Z.
What is in it
Tested
cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 37 ignored (SKIPPED GPU tests: none)cargo test -p xcl --lib hle::xgameruntime: 77 passed, 0 failedRegression run
main:
PR:
Not tested
AI use
upstream-sync referenced this pull request2026-11-24 16:06:45 +00:00
Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T15:54:42Z.
Regression run for this PR: head
2fc1b5c, based onmain930e8b4. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release,XCL_NETWORK=0, A pressed every 4 s from 20 s,scripts/smoke.ps1on a retail title for 60 s.main
930e8b4:this PR:
No device removals or crashes; 104 % of main's frames, 100 % of its peak commit.
Both runs' peak commit is high because of this machine's pipeline preload list at the time (the same on
main), not this PR.Not tested: the whole suite; whether the title reaches the changed code in these 60 s.
Written with Claude Code (Claude Opus 5.5) from runs on this machine.
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T15:57:19Z.
Full-suite run, since this PR has no test report yet. Tested exact head
2fc1b5c(on its base930e8b4).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 755 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.association_unregister_stops_pending_callback,association_call_drops_on_canceled_queue,association_unregister_waits_for_in_flight_callback,association_unregister_reentrant_and_unknown_token.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 755 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T17:13:11Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (One parallel run showed a single flaky failure; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by throny on 2026-11-25T00:27:02Z.
Two contributors checked independently and found that #1583 #1753 solves the same problem (for #1389) in a different way: #1607, group D58. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint from the community triage in #1607, not a maintainer decision.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T09:21:27Z.
Focused current-main review of head
2fc1b5c8, trial-merged cleanly onto maine429936c. The registration, cancellation, waiting, and reentrant callback paths address the cases I traced in #1389; this also covers the self-unregister case still open on #1753.One test-isolation issue is worth fixing before treating a parallel suite as reliable: each of the four new tests calls
reset_association_state_for_test(), which clears the process-global registry, but none holds the existingxasync::ASYNC_TEST_LOCK. Another association test already holds that lock. With four test threads, one new test can clear a second test's token between registration anduser_signed_in(); the second test then misses its callback or getsfalsefrom unregister. Acquiring the same lock before each reset and holding it through queue cleanup prevents this interleaving without changing runtime behavior.On Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti 621.35,
cargo test --offline --locked -j 4 -p xcl --lib hle::xgameruntime -- --test-threads=4passed 79/79 on the unchanged trial merge and 79/79 with the four-line candidate below. The race is source-derived; I did not observe a failing unmodified run. I did not run the full workspace suite or a title smoke for this review.The current PR description check is green; the CI workflow is
action_required, so it has not supplied a current-head build/test result. That gate needs repository-side approval before merge readiness can be judged.Test-only candidate, verified locally (79 passed)
AI use: Codex (GPT-6.2 Sol) traced the paths and ran both focused checks; Codex (GPT-6.2 Astra) independently reviewed the callback and test-state interleavings.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:41:02Z.
Triage (#1607) – head
2fc1b5cMerged #1753 (
d7ced4d6) covers the core of this: on mainXUserUnregisterForDeviceAssociationChangedmarks a queued callDonesoassociation_callskips it,association_callhonourscanceled, andwaitblocks until a running call finishes. The PR now conflicts with that code.Two pieces here are not on main: an unregister with
wait=truefrom inside the callback itself (main waits on its ownRunningcall and would block forever), andfalsefor an unknown token. If you want those, a small PR on top of main'sCallStatecode would be easy to review.The new tests reset the global association state while other tests may run in parallel, so they can be flaky.
Recommendation: close (superseded by #1753).
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.