XGameRuntime: reject duplicate queued async work #2524
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!2524
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2524"
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?
@loyodea on GitHub · 2026-11-25 21:35 UTC · original
loyodea:xasync-prevent-duplicate-work→main· +132 −2 · 2 files · 1 commits · openRelated to #576. The fallback
XAsyncScheduleaccepts a second work item while the first is still pending, returningS_OKtwice. Reserve one queued item per operation and returnE_UNEXPECTEDfor the duplicate, matching libHttpClient. Release the reservation at worker entry and after a refused submission so providers can reschedule or retry.What is in it
xasync.rs: one pending-work reservation and five synthetic tests for immediate and delayed duplicates,XAsyncRun, rescheduling, and retry.README.mddocuments the behavior.Tested
86e392f,cargo build --locked --workspace --jobs 5passed.cargo test --locked --jobs 5 -p xcl --lib hle::xgameruntime::xasync::tests -- --test-threads=4reported 19 passed, 0 failed, 0 ignored. Three duplicate tests failed and the two controls passed before the fix on the original base.cargo test --locked --jobs 5 --workspace --no-fail-fast -- --test-threads=4 --nocapturereported 1,424 passed, 4 failed, and 46 ignored. The synthetic end-to-end title passed. Eight SKIPPED notices covered six unsupported per-lane paths, driver-cache measurement without Developer Mode, and the opt-in heap-window OOM path.0829441:fuzz_validate_and_gpu_1(seed 722),fuzz_validate_and_gpu_3(seed 1599),directed_reference_basics, andf64_programs_on_the_gpu. The fuzz failures match #2115.Regression run
Paired real-title
scripts/smoke.ps1results are pending. This draft remains blocked on the required smoke runs.Not tested
MSVC and release builds, retail titles, other GPU vendors, and the installed PC runtime forwarding path. Issue #576 also reports block lifetime, queue lifetime, and completion-wait behavior, which this change leaves outside its scope.
AI use
OpenAI Codex investigated the contract, wrote the patch, synthetic tests, and description, and ran the checks at the contributor's direction. The exact model used for the original patch was unavailable.
@DavidM1911 on GitHub · 2026-11-25 21:54 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!
@xpatfussy69x on GitHub · 2026-11-25 22:21 UTC · original
Test run on exact head
86e392f(86e392fd3a9d33099e3f72ec16b646bbe3dd34c8, on its base6d12f58), clean tree.Tested
cargo test --workspace -- --test-threads=4: 1428 passed, 0 failed, 46 ignoredV_MUL_F16/V_PK_MUL_F16/V_CVT_F16_F32(onmaintoo)cargo test -p xcl --lib async_schedule: 5 passed, 0 failedasync_schedule_rejects_duplicate_queued_work: okasync_schedule_rejects_duplicate_delayed_work: okasync_schedule_allows_rescheduling_from_do_work: okasync_schedule_rejected_submit_can_be_retried: okasync_schedule_rejects_work_already_queued_by_run: okRegression run (60 s, default settings, a retail title)
main:
this PR:
No crash or device removal; frames 104 % of
main's, peak commit 100 %.Not tested
main(tested on its own base; it merges intoe1d84b7without conflicts)AI use
@SlopTart on GitHub · 2026-11-25 22:49 UTC · original
Tested: current PR head merged onto current
origin/main(clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).gpu_suite (cold cache): 164 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.Targeted run of the new
async_schedule_*tests (five): all passed. XGameRuntime, CPU-side, fine under the Wine lane.Not tested: retail titles (no title data on this lane, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
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.