Repository navigation
XGameRuntime: retain an async operation's queue after handle close - #641
Draft
WebIdentity1 wants to merge 1 commit into
Draft
WebIdentity1 wants to merge 1 commit into
WebIdentity1 wants to merge 1 commit into
Conversation
Begin and Run now keep the queue reference in State. Schedule and Complete use that reference instead of resolving the caller's potentially closed handle, preserving scheduled work and completion delivery. Three synthetic tests reproduce lost completion callbacks or invalid scheduling on the old path and pass with retention. Part of xcl-dev#576 item 2; stale work items and completion-wait ordering are separate issues.
This was referenced Nov 24, 2026
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Regression runs for this PR's head main: this PR: Tested
Not tested
Report written with Claude Code (Claude Opus 5.5) from runs on this machine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closing the caller's queue handle after
XAsyncBegincan make later scheduling fail or silently drop completion.XAsyncRunalso loses its completion callback if its original handle closes before dispatch. Retain the queue in the operation's state and use that reference for scheduling and completion, following the existing libHttpClient contract.Part of #576, item 2 only. Items 1, 3 and 4 remain unresolved. The cleanup-guard changes from closed #197 are not included or tested in combination. #235's fallback selection is outside this patch.
What is in it
Stateretains a queue reference captured by Begin/Run; Schedule/Complete use it. Three synthetic queue-handle regressions and README behavior note. No new dependency or copied reference code.Tested
8d0bbc87fb9423f1c2d49b9d43b4ab7ecba710b6, base18c105af86929d6ae26c44096c85b66f1644e743. Native Windows 10 build 19045, Ryzen 7 7800X3D, RTX 3090 driver 591.74 plus AMD integrated driver 32.0.21030.2001, Rust 1.98.1 MSVC, SDK DXC 1.8.2502.11, Agility 1.620.2, debug.cargo build --locked --workspacesucceeded.cargo test --locked --workspace --no-fail-fast -- --test-threads=4 --show-output: 691 passed, 1 failed, 41 ignored. Onlygpu_clamp_and_omod_per_instructionfailed, previously reproduced on main. All three new regressions passed. Desktop session1,XCL_ADAPTER=3090; some upstream fixtures select AMD directly.3db536e,cargo test --locked -p xcl --lib after_queue_handle_close -- --test-threads=1 --show-output: original runtime plus tests 0/3/0 (Complete/Run delivered zero callbacks; Schedule returnedE_INVALIDARG), candidate 3/0/0. The originalxasync.rsis identical on both base revisions. Immediate/manual ports avoid timing-dependent sleeps; the completion test also verifies the retained queue is released.cargo test --locked -p xcl --lib hle::xgameruntime:: -- --test-threads=4 --show-output: 76/0/0, no skips.gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no native wave64 on NVIDIA),test_title_draws_with_a_root_signature_under_the_debug_layeranduploads_start_from_each_subresources_state(debug layer unavailable). Sample variables unset; those opt-in cases return early.Regression run
Independent contributor Anon64 supplied these exact-head/main runs, copied verbatim from that report. These are their measurements, not ours. RTX3060 12GB driver581.80, i9-14900KF, Windows11 26200.9974, Rust1.90.0, release; same title/duration, clean source,
scripts/smoke.ps1. They report no test of early queue-handle closure in that title; our synthetic regressions cover that path.Draft retained: upstream CI run45315130577 awaits maintainer approval (
action_required), and our local full suite retains the disclosed baseline CLAMP failure. No source update has invalidated these exact-head runs.Not tested
By us: retail titles, release, Wine, installed PC XGameRuntime, or integration with #197. The independently reported startup smoke above is not gameplay or early-handle-close validation. This does not fix stale queued work or callback/wait ordering, and demonstrates no retail title gameplay progress.
AI use
Codex (GPT-6) inspected public code and overlap, implemented the queue-retention change and tests, ran native Windows validation, and prepared this description.