Skip to content

xgameruntime_store: the download, install, durables and store-UI calls complete their async block offline - #8690

Closed
tedin7 wants to merge 5 commits into
ProjectLeonida:mainfrom
tedin7:c2-xstore-download-durables-async
Closed

tedin7 wants to merge 5 commits into
ProjectLeonida:mainfrom
tedin7:c2-xstore-download-durables-async

Conversation

@tedin7

@tedin7 tedin7 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What

Complete offline store download, install, durables-license and UI requests asynchronously. Result slots report the pending or completed status, and cancellation completes with E_ABORT. Result and count methods reject null blocks and blocks belonging to a different operation.

Why

Callers must receive a completion callback and the actual request status, including when they inspect a result before dispatch or cancel a request.

Tested

  • p2: xgameruntime_store_test passed 64 checks; the previous worker hit a read fault in the new termination test.
  • p2: xgameruntime_store_test passed 59 checks with zero failures after syncing the branch xtaskqueue source into the temporary build.
  • AI-assisted; CPU only, no GPU required. The single xgameruntime_store_test target was built with two jobs using MinGW and run under Wine. With the new tests, the previous revision had 10 failures in 54 checks; the corrected revision passed all 54. The temporary MinGW harness supplied compatibility definitions for two MSVC intrinsics used by unrelated shims.

@ItsNotRexed: an exe PR, as you asked.

Claim: #8504 (comment)

@shdann

shdann commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Tested d68aba7 on Windows 11, MSVC, CPU only. All 57 checks in the store test pass.

I built xgameruntime_store_test with --config RelWithDebInfo. I ran ctest -C RelWithDebInfo -R "^xgameruntime_store$" -V in the build folder. All nine offline operations stay pending until dispatch. Each delivers one callback. The cancellation check returns E_ABORT. The result and count checks reject a block from a different operation.

For the control, I built the same test file with the parent implementation at 6554abbb0. CTest reports a segmentation fault on that revision. The test uses a manual queue and synthetic inputs.

AI-assisted.

@MartinIndra02

Copy link
Copy Markdown
Contributor

Independent build + test: PASS

AI-assisted (Claude Code). Windows 11 x64, MSVC 19.44.35220, Ninja RelWithDebInfo. GPU (not used): NVIDIA GeForce RTX 3080 driver 621.24 / 32.0.16.2124.

Head d68aba7af, based on current main 867d922f0. Built xgameruntime_store_test and gta6rt (both link the modified vendored third_party/xtaskqueue).

Test PR runtime/shims/xgameruntime_store.cpp reverted to main
xgameruntime_store_test.exe exit 0, 57 checks, 0 failures exit 1, 37 checks, 13 failures, e.g. FAIL offline result and count reject a null block, FAIL slot 49 begins pending

Note on the vendored change: AsyncBlockInternal gains an identity pointer, and this struct is stored inside the caller's XAsyncBlock::internal (sizeof(void*) * 4 = 32 bytes). The existing static_assert(sizeof(AsyncBlockInternal) <= sizeof(XAsyncBlock::internal)) still holds (8 + 8 + 4 + 4 + 1, padded to 32) and the build confirms it, but that struct is now exactly full, so the next field added will hit the assert. This is also a local change to third-party code. Recording it in the vendoring notes would help whoever next updates xtaskqueue. No issues found.

@comtek21516

Copy link
Copy Markdown

Tested b6e5e2856 on main at 867d922f0, in one tree with #8422, #8669, #8670, #8770, #8784 (six clean merges): pass.

For this change. xgameruntime_store passes natively and under Wine. The PR also touches third_party/xtaskqueue/Source/Task/AsyncLib.cpp, which every async shim links: xgameruntime, xgameruntime_user, xgameruntime_gamesave and the other xgameruntime_* tests pass on both sides as well.

Setup. Built with MSVC 14.52 (Visual Studio 18), Windows SDK 10.0.26100, Vulkan SDK 1.4.363.1, Ninja RelWithDebInfo on Windows Server 2025 (no Vulkan driver there), then the same binaries run through scripts/run_wine_tests.py under wine-11.0 (WineHQ stable, xvfb-run) on a Quadro RTX 4000 (Turing), NVIDIA 615.71.09, Ubuntu 22.04.5.

passed failed skipped
native Windows, this tree 147 4 124
Wine on the GPU machine, main 867d922f0 210 12 54
Wine on the GPU machine, this tree 210 12 54

Under Wine the tree is test by test the same as main. The four native failures are gameinput_host, d3d12_sparse_queue_family, vk_bindless_ps_tex and vk_bindless_ps_imgatomic, which fail the same way on main on that machine (#7452). The 12 under Wine are the same 12 as on main (host comparisons Wine cannot answer, and d3d12_xdxr_rt, d3d12_indirect_rt, d3d12_indirect_dispatch_count).

Because the six were built together, there is no per-PR negative control in this run: a regression would have shown as a difference from main, and there is none. No game files used. AI-assisted (Claude Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants