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

Closed
ambroseautomation wants to merge 1 commit from upstream-pr/1145 into main
ambroseautomation commented 2026-11-24 19:11:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ambroseautomation on 2026-11-24T19:11:22Z.


Claimed in the coordination issue as: OLD-9917 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7141692121)

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)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5478631381 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1145). Originally posted by [ambroseautomation](https://github.com/ambroseautomation) on 2026-11-24T19:11:22Z. --- Claimed in the coordination issue as: OLD-9917 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7141692121) ### 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)
abnalstlll-byte commented 2026-11-24 19:12:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T19:12:50Z.

Review: APPROVED


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6045684521 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1145#pullrequestreview-6045684521). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T19:12:50Z. **Review:** APPROVED --- 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.
madhyn commented 2026-11-24 19:32:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by madhyn on 2026-11-24T19:32:59Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7142256995 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1145#issuecomment-7142256995). Originally posted by [madhyn](https://github.com/madhyn) on 2026-11-24T19:32:59Z. --- 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
Deedlyy commented 2026-11-24 20:13:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Deedlyy on 2026-11-24T20:13:24Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7143212782 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1145#issuecomment-7143212782). Originally posted by [Deedlyy](https://github.com/Deedlyy) on 2026-11-24T20:13:24Z. --- **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

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1145
No description provided.