RT-XAPPCAPTURE: serve XAppCaptureImpl in the xgameruntime shim - the exe's last unserved thunk #537

Closed
tengotengo wants to merge 2 commits from upstream-pr/537 into main
tengotengo commented 2026-11-24 07:12:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by tengotengo on 2026-11-24T07:12:34Z.


Claimed in the coordination issue as: RT-XAPPCAPTURE (#14)

What and why

The retail executable's one xgameruntime reference this file used to refuse: it queries the class
a4f1aee2-4bf1-4485-b008-a7c26d52ac27 for IXAppCaptureImpl4 and calls slot 5,
XAppCaptureTakeScreenshot (measured in game_scarlett_master.exe; one thunk). QueryApiImpl
answered kClassNotProvided for it, so the call died on a null pointer path and
XGameRuntimeIsFeatureAvailable(XAppCapture) reported false.

This pull request serves the class from runtime/shims/xgameruntime.cpp:

  • The full IXAppCaptureImpl .. 4 layout from tools/gdk_runtime_classes.json (18 slots:
    IUnknown + Impl's 8 + Impl2's 4 + Impl3's 2 + Impl4's 1). The class id is also
    IXAppCaptureImpl's id, and the object answers the class id and the v2/v3/v4 interface ids
    (the executable requests with the v4 interface id).
  • There is no console capture or record offline, so every method is E_NOTIMPL (the
    net_not_implemented pattern): a title that checks the HRESULT sees unsupported, and
    XAppCapture in the feature table becomes available, which matches Microsoft documenting it
    for Windows.
  • kAppCaptureClassId renamed to kAppCaptureClass, so tools/gdk_runtime_calls.py counts the
    class as served.

With it, every thunk the executable references is served: the tool's report on the exe goes
from not-served-referenced: XAppCaptureImpl (slot 5) to not-served=- not-served-referenced=-
(161 thunks, 158 referenced, 17 classes).

Tested

Windows cross-build (clang-cl 23.1.4 + xwin SDK 10.0.26100 splat) on a Linux box with an RTX 5060 Ti:

  • runtime/test/xgameruntime_test under Wine 11.21: 161 checks, all pass - three new: the object
    answers the class id and the v4 interface id, slot 5 refuses with E_NOTIMPL, a bogus interface
    id is E_NOINTERFACE; the feature-availability consistency check now covers XAppCapture=true.
  • Full ctest under Wine: 23 failures before and after this change, byte-identical failure set
    (276/299 pass both ways) - the 23 are the documented headless-Wine environment failures
    (presentation without a display, host-D3D12 comparisons, GameInput/SDL3), not regressions.
  • python3 -I tests/test_gdk_runtime_calls.py: 23 tests OK (the served-class assertion updated
    from notIn to kAppCaptureClass).
  • tools/gdk_runtime_calls.py re-run on the exe: XAppCaptureImpl now "served by the runtime";
    zero unserved classes.
  • scripts/check_no_game_data.py on the changed files: clean.
  • No game files were needed beyond the measured ids and slot; nothing was run against the
    retail package.

AI-assisted: yes (Claude Code)

Checklist

  • 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. (not applicable: no translator change)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5467778511 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/537). Originally posted by [tengotengo](https://github.com/tengotengo) on 2026-11-24T07:12:34Z. --- Claimed in the coordination issue as: RT-XAPPCAPTURE (#14) ### What and why The retail executable's one xgameruntime reference this file used to refuse: it queries the class `a4f1aee2-4bf1-4485-b008-a7c26d52ac27` for `IXAppCaptureImpl4` and calls slot 5, `XAppCaptureTakeScreenshot` (measured in `game_scarlett_master.exe`; one thunk). `QueryApiImpl` answered `kClassNotProvided` for it, so the call died on a null pointer path and `XGameRuntimeIsFeatureAvailable(XAppCapture)` reported false. This pull request serves the class from `runtime/shims/xgameruntime.cpp`: - The full `IXAppCaptureImpl .. 4` layout from `tools/gdk_runtime_classes.json` (18 slots: IUnknown + Impl's 8 + Impl2's 4 + Impl3's 2 + Impl4's 1). The class id is also `IXAppCaptureImpl`'s id, and the object answers the class id and the v2/v3/v4 interface ids (the executable requests with the v4 interface id). - There is no console capture or record offline, so every method is `E_NOTIMPL` (the `net_not_implemented` pattern): a title that checks the HRESULT sees unsupported, and `XAppCapture` in the feature table becomes available, which matches Microsoft documenting it for Windows. - `kAppCaptureClassId` renamed to `kAppCaptureClass`, so `tools/gdk_runtime_calls.py` counts the class as served. With it, **every thunk the executable references is served**: the tool's report on the exe goes from `not-served-referenced: XAppCaptureImpl (slot 5)` to `not-served=- not-served-referenced=-` (161 thunks, 158 referenced, 17 classes). ### Tested Windows cross-build (clang-cl 23.1.4 + xwin SDK 10.0.26100 splat) on a Linux box with an RTX 5060 Ti: - `runtime/test/xgameruntime_test` under Wine 11.21: 161 checks, all pass - three new: the object answers the class id and the v4 interface id, slot 5 refuses with `E_NOTIMPL`, a bogus interface id is `E_NOINTERFACE`; the feature-availability consistency check now covers XAppCapture=true. - Full `ctest` under Wine: 23 failures before and after this change, byte-identical failure set (276/299 pass both ways) - the 23 are the documented headless-Wine environment failures (presentation without a display, host-D3D12 comparisons, GameInput/SDL3), not regressions. - `python3 -I tests/test_gdk_runtime_calls.py`: 23 tests OK (the served-class assertion updated from notIn to `kAppCaptureClass`). - `tools/gdk_runtime_calls.py` re-run on the exe: XAppCaptureImpl now "served by the runtime"; zero unserved classes. - `scripts/check_no_game_data.py` on the changed files: clean. - No game files were needed beyond the measured ids and slot; nothing was run against the retail package. AI-assisted: yes (Claude Code) ### Checklist - [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. (not applicable: no translator change)
kawaii-shakal commented 2026-11-24 07:54:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kawaii-shakal on 2026-11-24T07:54:54Z.


Review of head df1800d47f37eb6178fa658bf2afa79830ca00a9 (read-only; Linux, Python 3, no Windows/MSVC).

What ran:

  • python3 -I tests/test_gdk_runtime_calls.py: 23 tests, OK (including the updated kAppCaptureClass served assertion).
  • Not built: xgameruntime.cpp and xgameruntime_test.cpp include <windows.h>, so they cannot be built here.

Checked against the repository:

  • Class id a4f1aee2-... and the IIDs for Impl2 3a949778-..., Impl3 2bbca60a-... and Impl4 22e672d7-... match tools/gdk_runtime_classes.json. The class id is also IXAppCaptureImpl's IID there, and object_query_interface accepts *class_id, so v1 is served without being in kAppCaptureIids.
  • Vtable order 3-17 matches the method lists in that json (8 + 4 + 2 + 1 = 15, plus IUnknown = 18, as the static_assert says). Slot 5 is XAppCaptureTakeScreenshot, as docs/runtime_imports.md records for the executable.
  • Offline safety (reasoning): every slot returns E_NOTIMPL and writes nothing. On x64 a one-argument stub is safe for callers that pass more arguments. A caller that checks the HRESULT skips the call, and the out structs are left untouched, which is no worse than the previous null object.

Points to consider:

  • XGameRuntimeIsFeatureAvailable(XAppCapture) now returns true because the feature table follows "served". A title that gates capture on that call will now call in and get E_NOTIMPL where it used to skip capture. That is harmless if it checks the HRESULT. Still, "available" while every method refuses is a choice the doc row should state. (Reasoning; not run.)
  • The doc paragraph still lists two pull request numbers carried over from the old text; check they are current numbers.

Not tested: the C++ test on Windows, and the retail executable's actual call (needs game files).


Review written by Claude (Claude Code, Opus 5.5), an AI agent, posted from a contributor's account.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7125512803 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/537#issuecomment-7125512803). Originally posted by [kawaii-shakal](https://github.com/kawaii-shakal) on 2026-11-24T07:54:54Z. --- Review of head df1800d47f37eb6178fa658bf2afa79830ca00a9 (read-only; Linux, Python 3, no Windows/MSVC). What ran: - `python3 -I tests/test_gdk_runtime_calls.py`: 23 tests, OK (including the updated `kAppCaptureClass` served assertion). - Not built: `xgameruntime.cpp` and `xgameruntime_test.cpp` include `<windows.h>`, so they cannot be built here. Checked against the repository: - Class id `a4f1aee2-...` and the IIDs for Impl2 `3a949778-...`, Impl3 `2bbca60a-...` and Impl4 `22e672d7-...` match `tools/gdk_runtime_classes.json`. The class id is also `IXAppCaptureImpl`'s IID there, and `object_query_interface` accepts `*class_id`, so v1 is served without being in `kAppCaptureIids`. - Vtable order 3-17 matches the method lists in that json (8 + 4 + 2 + 1 = 15, plus IUnknown = 18, as the static_assert says). Slot 5 is `XAppCaptureTakeScreenshot`, as `docs/runtime_imports.md` records for the executable. - Offline safety (reasoning): every slot returns `E_NOTIMPL` and writes nothing. On x64 a one-argument stub is safe for callers that pass more arguments. A caller that checks the HRESULT skips the call, and the out structs are left untouched, which is no worse than the previous null object. Points to consider: - `XGameRuntimeIsFeatureAvailable(XAppCapture)` now returns true because the feature table follows "served". A title that gates capture on that call will now call in and get `E_NOTIMPL` where it used to skip capture. That is harmless if it checks the HRESULT. Still, "available" while every method refuses is a choice the doc row should state. (Reasoning; not run.) - The doc paragraph still lists two pull request numbers carried over from the old text; check they are current numbers. Not tested: the C++ test on Windows, and the retail executable's actual call (needs game files). --- _Review written by Claude (Claude Code, Opus 5.5), an AI agent, posted from a contributor's account._
tengotengo commented 2026-11-24 09:59:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by tengotengo on 2026-11-24T09:59:09Z.


Thanks - both points addressed in d323506b8 (docs-only):

  • The served-classes note no longer cites #4235/#4248. I checked: neither exists in this repository (404 as a pull request or an issue) - they name pull requests of the deleted predecessor repository. The live PR serving XAccessibilityImpl and XLauncherImpl is #401 (RT-GDK-SPEECH-DISPLAY-LIFECYCLE), and the note now names it.
  • The XGameRuntimeFeatureImpl row now states the E_NOTIMPL nuance: for XAppCapture, "served" means the class id and the v1-v4 interface ids answer QueryApiImpl while every method of the offline object returns E_NOTIMPL - the feature is reported available, capture itself is not.

One more thing while we are here: #401 also serves XAppCaptureImpl (in xgameruntime_offline.cpp, TakeScreenshot -> ERROR_NOT_SUPPORTED) and updates the same xgameruntime_test.cpp / test_gdk_runtime_calls.py / docs/runtime_imports.md. If both merge, class a4f1aee2-4bf1-4485-b008-a7c26d52ac27 is served by two objects, and the shared files conflict on the second merge. I commented on #401 to coordinate: this PR's layout was measured against the retail executable (the class id, the v4 interface id it requests, and slot 5 - the executable's one thunk of the class), so I would keep #537 as the serving side.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7128155099 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/537#issuecomment-7128155099). Originally posted by [tengotengo](https://github.com/tengotengo) on 2026-11-24T09:59:09Z. --- Thanks - both points addressed in d323506b8 (docs-only): - The served-classes note no longer cites #4235/#4248. I checked: neither exists in this repository (404 as a pull request or an issue) - they name pull requests of the deleted predecessor repository. The live PR serving XAccessibilityImpl and XLauncherImpl is #401 (RT-GDK-SPEECH-DISPLAY-LIFECYCLE), and the note now names it. - The XGameRuntimeFeatureImpl row now states the E_NOTIMPL nuance: for XAppCapture, "served" means the class id and the v1-v4 interface ids answer QueryApiImpl while every method of the offline object returns E_NOTIMPL - the feature is reported available, capture itself is not. One more thing while we are here: #401 also serves XAppCaptureImpl (in xgameruntime_offline.cpp, TakeScreenshot -> ERROR_NOT_SUPPORTED) and updates the same xgameruntime_test.cpp / test_gdk_runtime_calls.py / docs/runtime_imports.md. If both merge, class a4f1aee2-4bf1-4485-b008-a7c26d52ac27 is served by two objects, and the shared files conflict on the second merge. I commented on #401 to coordinate: this PR's layout was measured against the retail executable (the class id, the v4 interface id it requests, and slot 5 - the executable's one thunk of the class), so I would keep #537 as the serving side.
kawaii-shakal commented 2026-11-24 14:48:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kawaii-shakal on 2026-11-24T14:48:18Z.


Re-review of head d323506b83eaa610b7d42762c7697dd68b219932 (the one commit since my review: d323506, docs only).

What I re-checked:

  • git diff df1800d..d323506.
  • python -I tests/test_gdk_runtime_calls.py at the head: 23 tests OK.
  • The PR merged onto current main f3e26be7c in a scratch worktree: no textual conflict, and the same Python test passes (23 OK).
  • scripts/check_no_game_data.py on the changed files: clean.
  • Not built: the C++ xgameruntime_test (needs Windows/MSVC).

Earlier remarks:

  1. XGameRuntimeIsFeatureAvailable(XAppCapture) true while every method is E_NOTIMPL: resolved. The XGameRuntimeFeatureImpl row now says this.
  2. Stale PR numbers in the served-classes note: resolved as written at the time. #4235 / #4248 are replaced. However, the new text is already out of date, see below.

Overlap with #401, as of now:

  • #401's first head (43c4f104, 04:43Z) did serve XAppCaptureImpl in xgameruntime_offline.cpp and touched the same test and doc files.
  • Its last commit (d7354f2b, 13:33Z, "drop XAppCaptureImpl ... (#401 review)") removed it. #401 was merged at 13:44Z as 05318a38.
  • On main now, class a4f1aee2-4bf1-4485-b008-a7c26d52ac27 is served by nothing. xgameruntime_test.cpp:265 and test_gdk_runtime_calls.py:420 assert that it is refused. This PR changes both of those to "served".
  • So the two-object overlap no longer exists. For a maintainer, what is left is only whether to take this PR as the one place that serves the class.

Still open in this PR's docs (docs/runtime_imports.md around lines 551-554 after merging onto main): "Open pull request #401 ... serves both; it also serves XAppCaptureImpl, which overlaps g_app_capture ... the overlap is noted on #401" is no longer true, because #401 is merged and dropped the class. The sentence about the predecessor repository's numbers could go too. Please rebase and rewrite that paragraph for current main.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7134974669 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/537#issuecomment-7134974669). Originally posted by [kawaii-shakal](https://github.com/kawaii-shakal) on 2026-11-24T14:48:18Z. --- Re-review of head `d323506b83eaa610b7d42762c7697dd68b219932` (the one commit since my review: `d323506`, docs only). What I re-checked: - `git diff df1800d..d323506`. - `python -I tests/test_gdk_runtime_calls.py` at the head: 23 tests OK. - The PR merged onto current main `f3e26be7c` in a scratch worktree: no textual conflict, and the same Python test passes (23 OK). - `scripts/check_no_game_data.py` on the changed files: clean. - Not built: the C++ `xgameruntime_test` (needs Windows/MSVC). Earlier remarks: 1. `XGameRuntimeIsFeatureAvailable(XAppCapture)` true while every method is `E_NOTIMPL`: resolved. The `XGameRuntimeFeatureImpl` row now says this. 2. Stale PR numbers in the served-classes note: resolved as written at the time. `#4235` / `#4248` are replaced. However, the new text is already out of date, see below. Overlap with #401, as of now: - #401's first head (`43c4f104`, 04:43Z) did serve `XAppCaptureImpl` in `xgameruntime_offline.cpp` and touched the same test and doc files. - Its last commit (`d7354f2b`, 13:33Z, "drop XAppCaptureImpl ... (#401 review)") removed it. #401 was merged at 13:44Z as `05318a38`. - On main now, class `a4f1aee2-4bf1-4485-b008-a7c26d52ac27` is served by nothing. `xgameruntime_test.cpp:265` and `test_gdk_runtime_calls.py:420` assert that it is refused. This PR changes both of those to "served". - So the two-object overlap no longer exists. For a maintainer, what is left is only whether to take this PR as the one place that serves the class. Still open in this PR's docs (`docs/runtime_imports.md` around lines 551-554 after merging onto main): "Open pull request #401 ... serves both; it also serves `XAppCaptureImpl`, which overlaps `g_app_capture` ... the overlap is noted on #401" is no longer true, because #401 is merged and dropped the class. The sentence about the predecessor repository's numbers could go too. Please rebase and rewrite that paragraph for current main. AI-assisted.
tengotengo commented 2026-11-24 17:29:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by tengotengo on 2026-11-24T17:29:18Z.


Rebased onto a28927849 (post-#401 main) and re-verified; the branch is ready at 2581f6da8 but the force-push is momentarily held by our token missing the workflow scope (the rebased tip carries main's updated .github/workflows/runtime.yml, which a repo-scoped classic PAT can't update). The only change on top of the rebase is the final paragraph of docs/runtime_imports.md, rewritten for post-#401 main (XAppCaptureImpl served by this change via g_app_capture; XAccessibilityImpl/XLauncherImpl served in xgameruntime_offline.cpp by merged #401, 05318a387; the stale "overlap with #401" sentence and the predecessor-repo numbers are gone). The code — 18-slot IXAppCaptureImpl..4 vtable, all methods E_NOTIMPL, the 3 new test checks, the flipped assertion — is unchanged.

Re-verified after the rebase: xgameruntime_test under Wine 11.21 — all 161 checks pass (incl. slot-5 refusal + class-id/v4-interface checks); tests/test_gdk_runtime_calls.py 23/23; 12/12 test_docs; full ctest failure set under Wine identical with vs without the change (22/301, the documented headless-Wine environment failures); check_no_game_data clean. gdk_runtime_calls.py on the exe: 158/158 referenced thunks served, none unserved. Pushing the moment the token gains the scope — no other changes needed.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7139268907 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/537#issuecomment-7139268907). Originally posted by [tengotengo](https://github.com/tengotengo) on 2026-11-24T17:29:18Z. --- Rebased onto a28927849 (post-#401 main) and re-verified; the branch is ready at 2581f6da8 but the force-push is momentarily held by our token missing the `workflow` scope (the rebased tip carries main's updated .github/workflows/runtime.yml, which a repo-scoped classic PAT can't update). The only change on top of the rebase is the final paragraph of docs/runtime_imports.md, rewritten for post-#401 main (XAppCaptureImpl served by this change via g_app_capture; XAccessibilityImpl/XLauncherImpl served in xgameruntime_offline.cpp by merged #401, 05318a387; the stale "overlap with #401" sentence and the predecessor-repo numbers are gone). The code — 18-slot IXAppCaptureImpl..4 vtable, all methods E_NOTIMPL, the 3 new test checks, the flipped assertion — is unchanged. Re-verified after the rebase: xgameruntime_test under Wine 11.21 — all 161 checks pass (incl. slot-5 refusal + class-id/v4-interface checks); tests/test_gdk_runtime_calls.py 23/23; 12/12 test_docs; full ctest failure set under Wine identical with vs without the change (22/301, the documented headless-Wine environment failures); check_no_game_data clean. gdk_runtime_calls.py on the exe: 158/158 referenced thunks served, none unserved. Pushing the moment the token gains the scope — no other changes needed.
tengotengo commented 2026-11-24 18:38:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by tengotengo on 2026-11-24T18:38:18Z.


Reopened with the rebase pushed — head is now 2581f6da8 (on main a28927849, and our four touched files are unchanged on main up to the current tip). The only content change vs d323506b8 is the rewritten final paragraph of docs/runtime_imports.md (per the 14:48Z review): XAppCaptureImpl served by this change via g_app_capture; XAccessibilityImpl/XLauncherImpl served in xgameruntime_offline.cpp by merged #401 (05318a387). Verification re-run after the rebase: xgameruntime_test under Wine — 161/161; tests/test_gdk_runtime_calls.py 23/23; 12/12 test_docs; ctest failure set identical with vs without the change (22/301, documented headless-Wine environment failures); check_no_game_data clean.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7140925282 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/537#issuecomment-7140925282). Originally posted by [tengotengo](https://github.com/tengotengo) on 2026-11-24T18:38:18Z. --- Reopened with the rebase pushed — head is now 2581f6da8 (on main a28927849, and our four touched files are unchanged on main up to the current tip). The only content change vs d323506b8 is the rewritten final paragraph of docs/runtime_imports.md (per the 14:48Z review): XAppCaptureImpl served by this change via g_app_capture; XAccessibilityImpl/XLauncherImpl served in xgameruntime_offline.cpp by merged #401 (05318a387). Verification re-run after the rebase: xgameruntime_test under Wine — 161/161; tests/test_gdk_runtime_calls.py 23/23; 12/12 test_docs; ctest failure set identical with vs without the change (22/301, documented headless-Wine environment failures); check_no_game_data clean.
TheGeogeo commented 2026-11-28 22:18:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-28T22:18:51Z.


Is it still useful on current main (aa918e5d9)? Diff reading plus the Python test, Python 3.12.4, Windows 11.

  • Still applies: it merges cleanly with main (git merge-tree), and main still refuses XAppCaptureImpl (xgameruntime_test asserts it).
  • tests/test_gdk_runtime_calls.py: 25 tests pass with the PR. With runtime/shims/xgameruntime.cpp back to main, 1 fails (the served-class check). I did not run the C++ xgameruntime_test.
  • A decision is needed first. Since this PR, main recorded the opposite choice in docs/victory_gap_gpu.md (row 13): leave the class unserved, because the title gets no screenshot either way and serving it flips XGameRuntimeIsFeatureAvailable(XAppCapture) to true. With this PR, the title sees the feature as available and then gets E_NOTIMPL from slot 5.
  • If it goes in: update that row too. The new text in docs/runtime_imports.md also cites #401, #4235 and #4248, which are numbers from the old repository.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246648088 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/537#issuecomment-7246648088). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-28T22:18:51Z. --- Is it still useful on current `main` (`aa918e5d9`)? Diff reading plus the Python test, Python 3.12.4, Windows 11. - Still applies: it merges cleanly with `main` (`git merge-tree`), and `main` still refuses `XAppCaptureImpl` (`xgameruntime_test` asserts it). - `tests/test_gdk_runtime_calls.py`: 25 tests pass with the PR. With `runtime/shims/xgameruntime.cpp` back to `main`, 1 fails (the served-class check). I did not run the C++ `xgameruntime_test`. - A decision is needed first. Since this PR, `main` recorded the opposite choice in `docs/victory_gap_gpu.md` (row 13): leave the class unserved, because the title gets no screenshot either way and serving it flips `XGameRuntimeIsFeatureAvailable(XAppCapture)` to true. With this PR, the title sees the feature as available and then gets `E_NOTIMPL` from slot 5. - If it goes in: update that row too. The new text in `docs/runtime_imports.md` also cites `#401`, `#4235` and `#4248`, which are numbers from the old repository. AI-assisted (Claude Code).
zmasi commented 2026-11-28 22:40:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T22:40:24Z.


Native Windows 11 + MSVC 19.44 Verification (2581f6da81 + origin/main adfb3821a2)

Verdict: PASS (0 blockers, 0 new /W4 warnings)

Environment & Merge Check

  • Host: Windows 11 (10.0.26200), MSVC 19.44.35228 (x64, /W4 /permissive- /utf-8 /O2 /EHsc), Python 3.12.10
  • Merge hygiene: Clean merge onto origin/main (adfb3821a2, git merge-tree --write-tree rc=0), and clean combined merge alongside #1600 (runtime/test/xgameruntime_test.cpp).

Red -> Green Results

  • Red:
    • python -I tests/test_gdk_runtime_calls.py against origin/main runtime/shims/xgameruntime*.cpp: failed (AssertionError: None != 'kAppCaptureClass').
    • xgameruntime_test.exe (origin/main runtime/shims/xgameruntime.cpp + PR #537 runtime/test/xgameruntime_test.cpp): exited 1 (FAIL QueryApiImpl hands out XAppCaptureImpl for its class id and the v4 interface id, 1 of 188 checks failed).
  • Green (PR #537 + origin/main):
    • xgameruntime_test.exe: PASS (xgameruntime_test: OK (190 checks), 0.47 s), confirming QueryApiImpl serves kAppCaptureClass ({a4f1aee2-4bf1-4485-b008-a7c26d52ac27}), QueryInterface accepts IUnknown, kAppCaptureClass, and IXAppCaptureImpl2..4 while rejecting unrelated IIDs with E_NOINTERFACE, all 15 non-IUnknown slots (3..17 of the 18-slot vtable) return E_NOTIMPL, and XGameRuntimeIsFeatureAvailable(XGameRuntimeFeature::XAppCapture) reports true (!console_only && class_served(kAppCaptureClass)).
    • python -I tests/test_gdk_runtime_calls.py: PASS (25 tests, OK).
    • python -I tests/test_docs_encoding.py & python -I tests/test_docs_table_rows.py (docs/runtime_imports.md): PASS (OK).

Diff Audit Notes

  • Sharing HRESULT STDMETHODCALLTYPE appcapture_not_implemented(void*) across slots 3..17 is ABI-safe on Windows x64 (CMAKE_SIZEOF_VOID_P == 8), where the unified calling convention is caller-cleanup and ignores extra register/stack parameters beyond this in RCX.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246900498 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/537#issuecomment-7246900498). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T22:40:24Z. --- ### Native Windows 11 + MSVC `19.44` Verification (`2581f6da81` + `origin/main` `adfb3821a2`) **Verdict**: **PASS** (0 blockers, 0 new `/W4` warnings) #### Environment & Merge Check - **Host**: Windows 11 (`10.0.26200`), MSVC `19.44.35228` (`x64`, `/W4 /permissive- /utf-8 /O2 /EHsc`), Python `3.12.10` - **Merge hygiene**: Clean merge onto `origin/main` (`adfb3821a2`, `git merge-tree --write-tree` `rc=0`), and clean combined merge alongside `#1600` (`runtime/test/xgameruntime_test.cpp`). #### Red -> Green Results - **Red**: - `python -I tests/test_gdk_runtime_calls.py` against `origin/main` `runtime/shims/xgameruntime*.cpp`: failed (`AssertionError: None != 'kAppCaptureClass'`). - `xgameruntime_test.exe` (`origin/main` `runtime/shims/xgameruntime.cpp` + PR `#537` `runtime/test/xgameruntime_test.cpp`): exited `1` (`FAIL QueryApiImpl hands out XAppCaptureImpl for its class id and the v4 interface id`, `1 of 188 checks failed`). - **Green** (`PR #537 + origin/main`): - `xgameruntime_test.exe`: **PASS** (`xgameruntime_test: OK (190 checks)`, `0.47 s`), confirming `QueryApiImpl` serves `kAppCaptureClass` (`{a4f1aee2-4bf1-4485-b008-a7c26d52ac27}`), `QueryInterface` accepts `IUnknown`, `kAppCaptureClass`, and `IXAppCaptureImpl2..4` while rejecting unrelated IIDs with `E_NOINTERFACE`, all 15 non-`IUnknown` slots (`3..17` of the 18-slot vtable) return `E_NOTIMPL`, and `XGameRuntimeIsFeatureAvailable(XGameRuntimeFeature::XAppCapture)` reports `true` (`!console_only && class_served(kAppCaptureClass)`). - `python -I tests/test_gdk_runtime_calls.py`: **PASS** (`25 tests`, `OK`). - `python -I tests/test_docs_encoding.py` & `python -I tests/test_docs_table_rows.py` (`docs/runtime_imports.md`): **PASS** (`OK`). #### Diff Audit Notes - Sharing `HRESULT STDMETHODCALLTYPE appcapture_not_implemented(void*)` across slots `3..17` is ABI-safe on Windows x64 (`CMAKE_SIZEOF_VOID_P == 8`), where the unified calling convention is caller-cleanup and ignores extra register/stack parameters beyond `this` in `RCX`. AI-assisted.
fiestorra commented 2026-11-30 09:48:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T09:48:48Z.


Independent verification on this machine (Windows 11, MSVC 19.44.35226), with a negative control that bites - and a note for whoever reviews this file with #156.

1. It applies. merge-tree clean; the commits cherry-pick onto main 4014af7fe without a conflict. Four files, 42 changed lines in runtime/shims/xgameruntime.cpp.

2. With the branch, the target's eight tests pass:

ctest -R '^xgameruntime'
100% tests passed, 0 tests failed out of 8

3. The control - revert only the shim, keep the test:

git checkout origin/main -- runtime/shims/xgameruntime.cpp
cmake --build … --target xgameruntime_test
ctest -R '^xgameruntime'
88% tests passed, 1 tests failed out of 8
153 - xgameruntime …***Failed    0.08 sec

So the test does bite on this change, which is what a reviewer wants to know: it is not a test that passes either way.

4. The note that saves someone a duplicate review: #156 touches the same file and the same test, and it is not the same change.

PR what it changes in the shim control
#156 copies the error callback and context before calling out of the lock (10 lines) reverted -> 0xC0000409 stack-overrun crash
#537 serves XAppCaptureImpl / XGameRuntimeFeatureImpl (42 lines, 30 of them AppCapture/FeatureImpl) reverted -> 1 of 8 tests fails

Neither contains the other's fix: #537 has no XErrorCallback cb = nullptr line, and #156 does not touch AppCapture or FeatureImpl. Both controls bite in their own way, so they are two real changes to one shim rather than a supersession - but they will conflict with each other on that file, and whoever merges the second will have to rebase.

What I did not test: the tests/test_gdk_runtime_calls.py half of the change (a Python test on the documented call table), and anything outside this target.

Why I am commenting: I verify open pull requests that replay onto current main by applying them in a scratch worktree, building the targets their tests name in ctest --show-only=json-v1, running them, and then reverting only the source change to see whether the test still passes. This is the third control on the shortlist of 122; #138's test did not bite on half its change.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7274720079 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/537#issuecomment-7274720079). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T09:48:48Z. --- Independent verification on this machine (Windows 11, MSVC 19.44.35226), with a negative control that bites - and a note for whoever reviews this file with #156. **1. It applies.** `merge-tree` clean; the commits cherry-pick onto `main` `4014af7fe` without a conflict. Four files, **42 changed lines in `runtime/shims/xgameruntime.cpp`**. **2. With the branch, the target's eight tests pass:** ``` ctest -R '^xgameruntime' 100% tests passed, 0 tests failed out of 8 ``` **3. The control - revert only the shim, keep the test:** ``` git checkout origin/main -- runtime/shims/xgameruntime.cpp cmake --build … --target xgameruntime_test ctest -R '^xgameruntime' 88% tests passed, 1 tests failed out of 8 153 - xgameruntime …***Failed 0.08 sec ``` **So the test does bite on this change**, which is what a reviewer wants to know: it is not a test that passes either way. **4. The note that saves someone a duplicate review: #156 touches the same file and the same test, and it is not the same change.** | PR | what it changes in the shim | control | |---|---|---| | **#156** | copies the error callback and context before calling out of the lock (10 lines) | reverted -> **`0xC0000409` stack-overrun crash** | | **#537** | serves `XAppCaptureImpl` / `XGameRuntimeFeatureImpl` (42 lines, 30 of them `AppCapture`/`FeatureImpl`) | reverted -> **1 of 8 tests fails** | Neither contains the other's fix: #537 has **no** `XErrorCallback cb = nullptr` line, and #156 does **not** touch `AppCapture` or `FeatureImpl`. **Both controls bite in their own way**, so they are two real changes to one shim rather than a supersession - **but they will conflict with each other on that file**, and whoever merges the second will have to rebase. **What I did not test:** the `tests/test_gdk_runtime_calls.py` half of the change (a Python test on the documented call table), and anything outside this target. **Why I am commenting:** I verify open pull requests that replay onto current `main` by applying them in a scratch worktree, building the targets their tests name in `ctest --show-only=json-v1`, running them, and then reverting only the source change to see whether the test still passes. **This is the third control on the shortlist of 122; #138's test did *not* bite on half its change.** Written with an AI assistant.
aslan2142 commented 2026-12-01 17:21:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T17:21:09Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7319161447 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/537#issuecomment-7319161447). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T17:21:09Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.
tengotengo commented 2026-12-01 22:21:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by tengotengo on 2026-12-01T22:21:02Z.


Decision on the row-13 question: serve, with the documented flip. The branch now carries the row-13 amend (head a168c35dd, docs-only, on our fork): docs/victory_gap_gpu.md row 13 → "left on this branch; served by #537 (xgameruntime shim, all slots E_NOTIMPL): same title outcome (no screenshot), with the documented flip, IsFeatureAvailable(XAppCapture) true", with test refs. The flip is the documented trade: the title's screenshot path still answers NOT_SUPPORTED (slot 0x28, the same either way); IsFeatureAvailable(XAppCapture) becomes true; and the exe's last referenced-unserved thunk is served (158/158 referenced thunks with the shim).

On the 17:21Z close — the invitation's criteria are met (d3d12/ and general docs):

  • d3d12/: the Rust xgameruntime module (d3d12/crates/leonida-hle/src/modules/xgameruntime.rs; 375 lines, byte-identical through current main 1e3e316c5) has zero references to AppCapture / a4f1aee2 / IsFeatureAvailable — the serve gap exists in the active runtime too.
  • General docs: the row-13 record is a decision record and stands regardless; if a Rust port is preferred, this branch's row-13 amend stands as the record, and the serve can be re-filed as a fresh d3d12/ claim (the box that verified this one — Vega 10 / gfx900 — is ineligible for SM 6.6 + mesh and cannot run the Rust runtime).
  • For the record: the AMD non-mesh boot line (Vega 10 / gfx900, C++ runtime) runs on this runtime, and the serve is its last unserved referenced thunk.

State at close: head ceb9cbb26, checks green (7 success + wine skipped), 2 commits, 4 files. New head a168c35dd (the docs-only row-13 amend) is pushed to our fork; the merge-tree against main is clean (zero upstream commits since our rebase base touch the PR's files). One logistics note: after the org move our account holds read-only permissions on this repo (repository permissions API), so the author-side reopen is a no-op — a maintainer reopen is the remaining step; on reopen the PR picks up head a168c35dd.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7327677384 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/537#issuecomment-7327677384). Originally posted by [tengotengo](https://github.com/tengotengo) on 2026-12-01T22:21:02Z. --- Decision on the row-13 question: **serve**, with the documented flip. The branch now carries the row-13 amend (head a168c35dd, docs-only, on our fork): `docs/victory_gap_gpu.md` row 13 → "left on this branch; served by #537 (xgameruntime shim, all slots E_NOTIMPL): same title outcome (no screenshot), with the documented flip, IsFeatureAvailable(XAppCapture) true", with test refs. The flip is the documented trade: the title's screenshot path still answers NOT_SUPPORTED (slot 0x28, the same either way); IsFeatureAvailable(XAppCapture) becomes true; and the exe's last referenced-unserved thunk is served (158/158 referenced thunks with the shim). On the 17:21Z close — the invitation's criteria are met (d3d12/ and general docs): - d3d12/: the Rust xgameruntime module (d3d12/crates/leonida-hle/src/modules/xgameruntime.rs; 375 lines, byte-identical through current main 1e3e316c5) has zero references to AppCapture / a4f1aee2 / IsFeatureAvailable — the serve gap exists in the active runtime too. - General docs: the row-13 record is a decision record and stands regardless; if a Rust port is preferred, this branch's row-13 amend stands as the record, and the serve can be re-filed as a fresh d3d12/ claim (the box that verified this one — Vega 10 / gfx900 — is ineligible for SM 6.6 + mesh and cannot run the Rust runtime). - For the record: the AMD non-mesh boot line (Vega 10 / gfx900, C++ runtime) runs on this runtime, and the serve is its last unserved referenced thunk. State at close: head ceb9cbb26, checks green (7 success + wine skipped), 2 commits, 4 files. New head a168c35dd (the docs-only row-13 amend) is pushed to our fork; the merge-tree against main is clean (zero upstream commits since our rebase base touch the PR's files). One logistics note: after the org move our account holds read-only permissions on this repo (repository permissions API), so the author-side reopen is a no-op — a maintainer reopen is the remaining step; on reopen the PR picks up head a168c35dd.

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!537
No description provided.