xgameruntime: forward XAsyncBeginAlloc and XTaskQueueIsEmpty to xtaskqueue (OLD-9917) #1145

Open
github-bot wants to merge 1 commit from github-bot/gh-1145 into main AGit
Owner

@⁠ambroseautomation on GitHub · 2026-11-24 19:11 UTC · original
ambroseautomation:carry/old-9917-xasync-begin-alloc → main · +34 −27 · 3 files · 1 commits · open

Claimed in the coordination issue as: OLD-9917 (#14)

What and why

Carries forward old-pr/9917 (draft #185, originally authored by tedin7, commit author preserved; indexed in #17), rebased cleanly onto current main.

Replaces the two private stubs in XThreadingImpl (runtime/shims/xgameruntime.cpp) with direct forwarding to the vendored xtaskqueue implementations:

  • Slot 8 (XAsyncBeginAlloc): forwards to XAsyncBeginAlloc from XAsyncProviderPriv.h, allocating and copying the provider context/parameter block and invoking XAsyncOp::Begin.
  • Slot 28 (XTaskQueueIsEmpty): forwards to XTaskQueueIsEmpty from XTaskQueuePriv.h, taking (queue, port) instead of returning a stub 0.
  • Updates docs/runtime_imports.md to record XTaskQueueIsEmpty's (queue, port) signature and extends runtime/test/xgameruntime_test.cpp to verify both slots end-to-end.

Tested

  • Compiled and ran xgameruntime_test.exe natively on Windows 11 with MSVC (/std:c++20 /EHsc /W4 /permissive- /utf-8 /O2): xgameruntime_test: OK (163 checks).
  • python -I tests/test_docs_links.py: 16 tests, OK.
  • python -I scripts/check_no_game_data.py docs/runtime_imports.md runtime/shims/xgameruntime.cpp runtime/test/xgameruntime_test.cpp: exit 0 (no game data).

GPUs tested: n/a (CPU/OS runtime shim; built and tested on Windows 11 Pro 64-bit, MSVC VS 18)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a — xgameruntime shim)
**@⁠ambroseautomation** on GitHub · 2026-11-24 19:11 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1145) `ambroseautomation:carry/old-9917-xasync-begin-alloc` → `main` · +34 −27 · 3 files · 1 commits · open Claimed in the coordination issue as: OLD-9917 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why Carries forward `old-pr/9917` (draft #185, originally authored by `tedin7`, commit author preserved; indexed in #17), rebased cleanly onto current `main`. Replaces the two private stubs in `XThreadingImpl` (`runtime/shims/xgameruntime.cpp`) with direct forwarding to the vendored `xtaskqueue` implementations: - Slot 8 (`XAsyncBeginAlloc`): forwards to `XAsyncBeginAlloc` from `XAsyncProviderPriv.h`, allocating and copying the provider context/parameter block and invoking `XAsyncOp::Begin`. - Slot 28 (`XTaskQueueIsEmpty`): forwards to `XTaskQueueIsEmpty` from `XTaskQueuePriv.h`, taking `(queue, port)` instead of returning a stub `0`. - Updates `docs/runtime_imports.md` to record `XTaskQueueIsEmpty`'s `(queue, port)` signature and extends `runtime/test/xgameruntime_test.cpp` to verify both slots end-to-end. ### Tested - Compiled and ran `xgameruntime_test.exe` natively on Windows 11 with MSVC (`/std:c++20 /EHsc /W4 /permissive- /utf-8 /O2`): `xgameruntime_test: OK (163 checks)`. - `python -I tests/test_docs_links.py`: 16 tests, OK. - `python -I scripts/check_no_game_data.py docs/runtime_imports.md runtime/shims/xgameruntime.cpp runtime/test/xgameruntime_test.cpp`: exit 0 (no game data). GPUs tested: n/a (CPU/OS runtime shim; built and tested on Windows 11 Pro 64-bit, MSVC VS 18) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a — `xgameruntime` shim)
Squashed from ItsNotRexed/Leonida#8588 by tedin7, head e09f0a9bd (security scan PASS).

Applied as the PR's own diff (gh pr diff); head matches the watcher's scan. xgameruntime_test keeps Wave 1's per-thread time-sensitive flag checks (#7957); the old slot-8 comment that preceded this PR's new slot-8 test is dropped.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:40:07 +00:00
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 19:12 UTC · original · approved these changes

Reviewed and verified. Replaces non-functional stubs for slot 8 (XAsyncBeginAlloc) and slot 28 (XTaskQueueIsEmpty) in runtime/shims/xgameruntime.cpp with direct forwarding to vendored xtaskqueue implementations. Tested end-to-end with xgameruntime_test.exe (163/163 checks PASS). 100% clean-room.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 19:12 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1145#pullrequestreview-6045684521) · **approved these changes** Reviewed and verified. Replaces non-functional stubs for slot 8 (`XAsyncBeginAlloc`) and slot 28 (`XTaskQueueIsEmpty`) in `runtime/shims/xgameruntime.cpp` with direct forwarding to vendored `xtaskqueue` implementations. Tested end-to-end with `xgameruntime_test.exe` (163/163 checks PASS). 100% clean-room.
Author
Owner

@⁠madhyn on GitHub · 2026-11-24 19:32 UTC · original

Tested 877b6d234 on Arch Linux + Wine 11.22 (clang-cl + xwin cross-build):

  • ctest --test-dir runtime/build/win -R "^xgameruntime$" --output-on-failure: Passed (5.32 s)

AI-assisted: yes

**@⁠madhyn** on GitHub · 2026-11-24 19:32 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1145#issuecomment-7142256995) Tested `877b6d234` on Arch Linux + Wine 11.22 (clang-cl + xwin cross-build): - `ctest --test-dir runtime/build/win -R "^xgameruntime$" --output-on-failure`: **Passed** (5.32 s) AI-assisted: yes
Author
Owner

@⁠Deedlyy on GitHub · 2026-11-24 20:13 UTC · original

Recommendation: [MERGE]

Reasoning: Carries #185: XThreadingImpl slots 8 and 28 forward to the vendored xtaskqueue XAsyncBeginAlloc/XTaskQueueIsEmpty instead of private stubs. Net code reduction with test coverage. Verified on Wine by madhyn. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main. Merge once the queued checks are green.

Impact level: 4/10

**@⁠Deedlyy** on GitHub · 2026-11-24 20:13 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1145#issuecomment-7143212782) **Recommendation:** [MERGE] **Reasoning:** Carries #185: `XThreadingImpl` slots 8 and 28 forward to the vendored `xtaskqueue` `XAsyncBeginAlloc`/`XTaskQueueIsEmpty` instead of private stubs. Net code reduction with test coverage. Verified on Wine by madhyn. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. Merge once the queued checks are green. **Impact level:** 4/10
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1145/head:github-bot/gh-1145'
git switch 'github-bot/gh-1145'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1145'
git switch 'github-bot/gh-1145'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1145'
git switch 'github-bot/gh-1145'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1145'
git switch 'main'
git merge --squash 'github-bot/gh-1145'
git switch 'main'
git merge --ff-only 'github-bot/gh-1145'
git switch 'main'
git merge 'github-bot/gh-1145'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.