XGameUi: handle the Xbox Live and account dialogs explicitly, completing with E_NOTIMPL #2769

Open
timesecay wants to merge 1 commit from upstream-pr/2779 into main
timesecay commented 2026-11-26 12:15:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by timesecay on 2026-11-26T12:15:30Z.


XGameUi: handle the Xbox Live and account dialogs explicitly, completing with E_NOTIMPL

Seven XGameUi dialog types that need Xbox Live or an account (player picker, profile card, send
game invite, state share, multiplayer activity invite, achievements, web authentication; 17
entry points in all) were unknown slots on XCL's XGameUi class. They are now handled
explicitly: each *Async completes its XAsyncBlock at once with E_NOTIMPL, and each
*Result returns that status.

What is in it

  • crates/xcl/src/hle/xgameruntime/api.rs: ui_refused, ui_refused_fns! and xgameui_refused()
    register the 17 functions on the XGameUi class (built on the existing begin_with and
    empty_result helpers). The class's impls was empty before.
  • api.rs header comment: says which XGameUi dialogs XCL refuses and which still go to the PC runtime.
  • api.rs tests: the new refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone,
    and the old E_NOTIMPL + unimplemented assertion in thunk_protocol_with_xcl_objects_on_pc_queues
    rewritten for the new behaviour.
  • HANDOFF.md (~L1029): its "not implemented in XCL classes" counts are now stale for these
    functions. Left unedited, as the repository rules ask.

The 17 functions

Async entry points (8):
XGameUiShowAchievementsAsync, XGameUiShowPlayerPickerAsync, XGameUiShowPlayerProfileCardAsync,
XGameUiShowSendGameInviteAsync, XGameUiShowStateShareAsync,
XGameUiShowMultiplayerActivityGameInviteAsync, XGameUiShowWebAuthenticationAsync,
XGameUiShowWebAuthenticationWithOptionsAsync

Result / status entry points (9):
XGameUiShowAchievementsResult, XGameUiShowPlayerPickerResultCount, XGameUiShowPlayerPickerResult,
XGameUiShowPlayerProfileCardResult, XGameUiShowSendGameInviteResult, XGameUiShowStateShareResult,
XGameUiShowMultiplayerActivityGameInviteResult, XGameUiShowWebAuthenticationResultSize,
XGameUiShowWebAuthenticationResult

Behaviour

  • Every *Async returns S_OK, completes the block with E_NOTIMPL and delivers the completion
    callback once. It logs XGameRuntime: <name> - no UI offline (completes with E_NOTIMPL).
  • Every *Result returns the call's status (E_NOTIMPL) and does not write its output
    arguments (counts, sizes, player ids, result pointer, buffer).
  • The handlers read only the first argument, the XAsyncBlock*; every GDK signature for these
    functions has it first. The slot shims pass the remaining arguments through, which relies on
    the Win64 caller cleaning up its stack, as
    @'
    XGameUi: handle the Xbox Live and account dialogs explicitly, completing with E_NOTIMPL

Seven XGameUi dialog types that need Xbox Live or an account (player picker, profile card, send
game invite, state share, multiplayer activity invite, achievements, web authentication; 17
entry points in all) were unknown slots on XCL's XGameUi class. They are now handled
explicitly: each *Async completes its XAsyncBlock at once with E_NOTIMPL, and each
*Result returns that status.

What is in it

  • crates/xcl/src/hle/xgameruntime/api.rs: ui_refused, ui_refused_fns! and xgameui_refused()
    register the 17 functions on the XGameUi class (built on the existing begin_with and
    empty_result helpers). The class's impls was empty before.
  • api.rs header comment: says which XGameUi dialogs XCL refuses and which still go to the PC runtime.
  • api.rs tests: the new refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone,
    and the old E_NOTIMPL + unimplemented assertion in thunk_protocol_with_xcl_objects_on_pc_queues
    rewritten for the new behaviour.
  • HANDOFF.md (~L1029): its "not implemented in XCL classes" counts are now stale for these
    functions. Left unedited, as the repository rules ask.

The 17 functions

Async entry points (8):
XGameUiShowAchievementsAsync, XGameUiShowPlayerPickerAsync, XGameUiShowPlayerProfileCardAsync,
XGameUiShowSendGameInviteAsync, XGameUiShowStateShareAsync,
XGameUiShowMultiplayerActivityGameInviteAsync, XGameUiShowWebAuthenticationAsync,
XGameUiShowWebAuthenticationWithOptionsAsync

Result / status entry points (9):
XGameUiShowAchievementsResult, XGameUiShowPlayerPickerResultCount, XGameUiShowPlayerPickerResult,
XGameUiShowPlayerProfileCardResult, XGameUiShowSendGameInviteResult, XGameUiShowStateShareResult,
XGameUiShowMultiplayerActivityGameInviteResult, XGameUiShowWebAuthenticationResultSize,
XGameUiShowWebAuthenticationResult

Behaviour

  • Every *Async returns S_OK, completes the block with E_NOTIMPL and delivers the completion
    callback once. It logs XGameRuntime: <name> - no UI offline (completes with E_NOTIMPL).
  • Every *Result returns the call's status (E_NOTIMPL) and does not write its output
    arguments (counts, sizes, player ids, result pointer, buffer).
  • The handlers read only the first argument, the XAsyncBlock*; every GDK signature for these
    functions has it first. The slot shims pass the remaining arguments through, which relies on
    the Win64 caller cleaning up its stack, as the existing completed() handlers do. That is an
    assumption about the existing dispatch machinery; no test isolates it.
  • The message, error and text dialogs are unchanged (still forwarded to the PC runtime).

Side effect on report.json

These calls are no longer counted under xgameruntime.unimplemented, because they are no longer
unknown slots. Anyone using that list to find gaps will stop seeing them; the log line above is
the replacement.

Tested

  • Hardware: NVIDIA GeForce RTX 5060 Ti, driver 610.88 (WDDM); Windows 11 Pro 25H2 (OS build 26200);
    stable-x86_64-pc-windows-msvc, rustc 1.100.0 (0ef1bc386 2026-11-09). Debug build for tests,
    release build for smoke. The machine was not idle during the runs (browsers, capture and
    chat apps were open).
  • Based on main b49be18368 plus one commit,
    58eb182e73.
  • cargo test --workspace -j 1 --no-fail-fast -- --test-threads=1: cargo exit 0;
    1,436 passed, 0 failed, 47 ignored (37 test binaries). The log has 45 SKIPPED lines;
    those tests pass without running and are not coverage.
  • Coverage of the 17 names:
    • thunk_protocol_with_xcl_objects_on_pc_queues (existing, edited) covers 3:
      XGameUiShowAchievementsAsync, XGameUiShowAchievementsResult and
      XGameUiShowWebAuthenticationWithOptionsAsync. It runs on the PC runtime's queues.
    • refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone (new) covers all 17
      through their vtable slots on XCL's own queues. It checks S_OK from each Async, one
      completion callback per call, XAsyncGetStatus = E_NOTIMPL, every Result = E_NOTIMPL,
      untouched output buffers, E_INVALIDARG for a never-started block and for a null block.
    • Mutation check: a handler completing with S_OK, and a missing WithOptions registration,
      each made the new test fail; both were reverted.
  • Cleanup of a failed block's payload is covered by the existing
    errors_propagate_and_release_active_state, not by the new test.

Regression run

Same game folder, 60 seconds, same title for both. main first:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 5060 Ti
title: TestGame
seconds: 60
exit: 0x0
frames shown: 1483 (PresentX 1483)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16027 MB

This change:

xcl-smoke v1
commit: 58eb182e73edd5c3f241bcd2e982ce55cc92d729
gpu: NVIDIA GeForce RTX 5060 Ti
title: TestGame
seconds: 60
exit: 0x0
frames shown: 1329 (PresentX 1329)
presents per 2 s (last 3): 60 60 59
device removals: 0
crashes: 0
peak commit: 16229 MB

Not tested

  • Whether the title in the smoke runs called any of the 17 functions; the blocks don't show it.
  • How a real title reacts to E_NOTIMPL (it may treat it as fatal rather than as a dismissed dialog).
  • Behaviour of the 14 other names on the PC runtime's queues (only 3 are covered there).
  • A duplicate completion callback arriving more than 20 ms after the first would not be seen.
  • AMD / RDNA4 and other NVIDIA models.
  • Out of scope and unchanged: XGameUiSet*UIResponse and XGameUISetUICallbacks (not in the
    generated GDK table), XGameProtocol*.
  • Duplicate-PR search: gh pr list --state all --search "XGameUi" (5 results) and "E_NOTIMPL"
    (29 results, first 20 listed). I checked #2623, #1610, #12, #24, #270 and #1537: none registers
    handlers for these XGameUi functions. #24 (merged) added the test assertion this PR changes.
    #2623, #1610, #270 and #1537 edit api.rs and may need a rebase.

AI use
Claude Code, model: not recorded. It wrote the handlers, the tests and a draft of this description, read the
function signatures from the public GDK reference, and ran the build and test commands. timesecay
reviewed the diff and is the author.

<!-- greyfinch-sync:ivall/xcl:issue:5509844615 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2779). Originally posted by [timesecay](https://github.com/timesecay) on 2026-11-26T12:15:30Z. --- XGameUi: handle the Xbox Live and account dialogs explicitly, completing with E_NOTIMPL Seven XGameUi dialog types that need Xbox Live or an account (player picker, profile card, send game invite, state share, multiplayer activity invite, achievements, web authentication; 17 entry points in all) were unknown slots on XCL's XGameUi class. They are now handled explicitly: each `*Async` completes its `XAsyncBlock` at once with `E_NOTIMPL`, and each `*Result` returns that status. **What is in it** - `crates/xcl/src/hle/xgameruntime/api.rs`: `ui_refused`, `ui_refused_fns!` and `xgameui_refused()` register the 17 functions on the XGameUi class (built on the existing `begin_with` and `empty_result` helpers). The class's `impls` was empty before. - `api.rs` header comment: says which XGameUi dialogs XCL refuses and which still go to the PC runtime. - `api.rs` tests: the new `refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone`, and the old `E_NOTIMPL` + `unimplemented` assertion in `thunk_protocol_with_xcl_objects_on_pc_queues` rewritten for the new behaviour. - `HANDOFF.md` (~L1029): its "not implemented in XCL classes" counts are now stale for these functions. Left unedited, as the repository rules ask. **The 17 functions** Async entry points (8): `XGameUiShowAchievementsAsync`, `XGameUiShowPlayerPickerAsync`, `XGameUiShowPlayerProfileCardAsync`, `XGameUiShowSendGameInviteAsync`, `XGameUiShowStateShareAsync`, `XGameUiShowMultiplayerActivityGameInviteAsync`, `XGameUiShowWebAuthenticationAsync`, `XGameUiShowWebAuthenticationWithOptionsAsync` Result / status entry points (9): `XGameUiShowAchievementsResult`, `XGameUiShowPlayerPickerResultCount`, `XGameUiShowPlayerPickerResult`, `XGameUiShowPlayerProfileCardResult`, `XGameUiShowSendGameInviteResult`, `XGameUiShowStateShareResult`, `XGameUiShowMultiplayerActivityGameInviteResult`, `XGameUiShowWebAuthenticationResultSize`, `XGameUiShowWebAuthenticationResult` **Behaviour** - Every `*Async` returns `S_OK`, completes the block with `E_NOTIMPL` and delivers the completion callback once. It logs `XGameRuntime: <name> - no UI offline (completes with E_NOTIMPL)`. - Every `*Result` returns the call's status (`E_NOTIMPL`) and does not write its output arguments (counts, sizes, player ids, result pointer, buffer). - The handlers read only the first argument, the `XAsyncBlock*`; every GDK signature for these functions has it first. The slot shims pass the remaining arguments through, which relies on the Win64 caller cleaning up its stack, as @' XGameUi: handle the Xbox Live and account dialogs explicitly, completing with E_NOTIMPL Seven XGameUi dialog types that need Xbox Live or an account (player picker, profile card, send game invite, state share, multiplayer activity invite, achievements, web authentication; 17 entry points in all) were unknown slots on XCL's XGameUi class. They are now handled explicitly: each `*Async` completes its `XAsyncBlock` at once with `E_NOTIMPL`, and each `*Result` returns that status. **What is in it** - `crates/xcl/src/hle/xgameruntime/api.rs`: `ui_refused`, `ui_refused_fns!` and `xgameui_refused()` register the 17 functions on the XGameUi class (built on the existing `begin_with` and `empty_result` helpers). The class's `impls` was empty before. - `api.rs` header comment: says which XGameUi dialogs XCL refuses and which still go to the PC runtime. - `api.rs` tests: the new `refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone`, and the old `E_NOTIMPL` + `unimplemented` assertion in `thunk_protocol_with_xcl_objects_on_pc_queues` rewritten for the new behaviour. - `HANDOFF.md` (~L1029): its "not implemented in XCL classes" counts are now stale for these functions. Left unedited, as the repository rules ask. **The 17 functions** Async entry points (8): `XGameUiShowAchievementsAsync`, `XGameUiShowPlayerPickerAsync`, `XGameUiShowPlayerProfileCardAsync`, `XGameUiShowSendGameInviteAsync`, `XGameUiShowStateShareAsync`, `XGameUiShowMultiplayerActivityGameInviteAsync`, `XGameUiShowWebAuthenticationAsync`, `XGameUiShowWebAuthenticationWithOptionsAsync` Result / status entry points (9): `XGameUiShowAchievementsResult`, `XGameUiShowPlayerPickerResultCount`, `XGameUiShowPlayerPickerResult`, `XGameUiShowPlayerProfileCardResult`, `XGameUiShowSendGameInviteResult`, `XGameUiShowStateShareResult`, `XGameUiShowMultiplayerActivityGameInviteResult`, `XGameUiShowWebAuthenticationResultSize`, `XGameUiShowWebAuthenticationResult` **Behaviour** - Every `*Async` returns `S_OK`, completes the block with `E_NOTIMPL` and delivers the completion callback once. It logs `XGameRuntime: <name> - no UI offline (completes with E_NOTIMPL)`. - Every `*Result` returns the call's status (`E_NOTIMPL`) and does not write its output arguments (counts, sizes, player ids, result pointer, buffer). - The handlers read only the first argument, the `XAsyncBlock*`; every GDK signature for these functions has it first. The slot shims pass the remaining arguments through, which relies on the Win64 caller cleaning up its stack, as the existing `completed()` handlers do. That is an assumption about the existing dispatch machinery; no test isolates it. - The message, error and text dialogs are unchanged (still forwarded to the PC runtime). **Side effect on `report.json`** These calls are no longer counted under `xgameruntime.unimplemented`, because they are no longer unknown slots. Anyone using that list to find gaps will stop seeing them; the log line above is the replacement. **Tested** - Hardware: NVIDIA GeForce RTX 5060 Ti, driver 610.88 (WDDM); Windows 11 Pro 25H2 (OS build 26200); stable-x86_64-pc-windows-msvc, rustc 1.100.0 (0ef1bc386 2026-11-09). Debug build for tests, release build for smoke. The machine was not idle during the runs (browsers, capture and chat apps were open). - Based on main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 plus one commit, 58eb182e73edd5c3f241bcd2e982ce55cc92d729. - `cargo test --workspace -j 1 --no-fail-fast -- --test-threads=1`: cargo exit 0; 1,436 passed, 0 failed, 47 ignored (37 test binaries). The log has 45 `SKIPPED` lines; those tests pass without running and are not coverage. - Coverage of the 17 names: - `thunk_protocol_with_xcl_objects_on_pc_queues` (existing, edited) covers 3: `XGameUiShowAchievementsAsync`, `XGameUiShowAchievementsResult` and `XGameUiShowWebAuthenticationWithOptionsAsync`. It runs on the PC runtime's queues. - `refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone` (new) covers all 17 through their vtable slots on XCL's own queues. It checks `S_OK` from each Async, one completion callback per call, `XAsyncGetStatus` = `E_NOTIMPL`, every Result = `E_NOTIMPL`, untouched output buffers, `E_INVALIDARG` for a never-started block and for a null block. - Mutation check: a handler completing with `S_OK`, and a missing `WithOptions` registration, each made the new test fail; both were reverted. - Cleanup of a failed block's payload is covered by the existing `errors_propagate_and_release_active_state`, not by the new test. **Regression run** Same game folder, 60 seconds, same title for both. `main` first: xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 5060 Ti title: TestGame seconds: 60 exit: 0x0 frames shown: 1483 (PresentX 1483) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16027 MB This change: xcl-smoke v1 commit: 58eb182e73edd5c3f241bcd2e982ce55cc92d729 gpu: NVIDIA GeForce RTX 5060 Ti title: TestGame seconds: 60 exit: 0x0 frames shown: 1329 (PresentX 1329) presents per 2 s (last 3): 60 60 59 device removals: 0 crashes: 0 peak commit: 16229 MB **Not tested** - Whether the title in the smoke runs called any of the 17 functions; the blocks don't show it. - How a real title reacts to `E_NOTIMPL` (it may treat it as fatal rather than as a dismissed dialog). - Behaviour of the 14 other names on the PC runtime's queues (only 3 are covered there). - A duplicate completion callback arriving more than 20 ms after the first would not be seen. - AMD / RDNA4 and other NVIDIA models. - Out of scope and unchanged: `XGameUiSet*UIResponse` and `XGameUISetUICallbacks` (not in the generated GDK table), `XGameProtocol*`. - Duplicate-PR search: `gh pr list --state all --search "XGameUi"` (5 results) and `"E_NOTIMPL"` (29 results, first 20 listed). I checked #2623, #1610, #12, #24, #270 and #1537: none registers handlers for these XGameUi functions. #24 (merged) added the test assertion this PR changes. #2623, #1610, #270 and #1537 edit `api.rs` and may need a rebase. **AI use** Claude Code, model: not recorded. It wrote the handlers, the tests and a draft of this description, read the function signatures from the public GDK reference, and ran the build and test commands. timesecay reviewed the diff and is the author.
Decodere commented 2026-11-26 15:03:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T14:18:27Z.


Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2779 at 58eb182e73edd5c3f241bcd2e982ce55cc92d729 (exact parent origin/main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Measurements and targeted test results only; not a full source review.

Setup

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200
  • Toolchain / caches: rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)
  • Workload: Retail workload title: 29640639 via scripts/smoke.ps1 -Seconds 60 (XCL_NETWORK=0 XCL_ACTIVITY=1, default flags, no input)

Targeted Win11 / RTX 4060 release unit tests (58eb182e)

  • cargo test --release -p xcl --lib refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone -- --nocapture: 1 passed, 0 failed, 0 ignored (0.21 s, exit 0).
  • cargo test --release -p xcl --lib hle::xgameruntime:: -- --test-threads=4: 76 passed, 0 failed, 0 ignored (0.78 s, 0 skipped, exit 0).

Observations

  • The new XGameUi dialog refusal regression test (refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone) and all 76 hle::xgameruntime:: tests passed cleanly in --release on native Windows 11 26200 with 0 skips.
  • Quiet 60 s retail smoke ran cleanly (exit: 0x0, 1546 frames shown, 60 60 60 steady-state presents per 2 s, 0 device removals, 0 crashes, 14000 MB peak commit vs parent b49be183's 14018 MB / 1518 frames).

Paired 60 s RTX 4060 smoke (b49be183 vs 58eb182e)

Parent origin/main (b49be183):

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1518 (PresentX 1518)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14018 MB

PR #2779 head (58eb182e):

xcl-smoke v1
commit: 58eb182e73edd5c3f241bcd2e982ce55cc92d729
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1546 (PresentX 1547)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14000 MB

Limits of coverage

  • Full workspace test suite was not re-run on 58eb182e (only targeted hle::xgameruntime:: release tests plus paired quiet 60 s smoke).
  • The 60 s no-input offline retail smoke (XCL_NETWORK=0) verifies zero runtime regression; live title invocations of the 17 Xbox Live / account XGameUi*Async / *Result dialogs are covered by the unit test refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone.
  • Native Windows 11 (26200) / x86-64 only; no Wine/Linux run on this host.

AI use

Ran the targeted release unit tests and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts and smoke blocks were taken directly from cargo test and scripts/smoke.ps1 outputs.

<!-- greyfinch-sync:ivall/xcl:comment:7194601724 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2779#issuecomment-7194601724). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-26T14:18:27Z. --- **Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2779 at `58eb182e73edd5c3f241bcd2e982ce55cc92d729`** (exact parent `origin/main` `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`). Measurements and targeted test results only; not a full source review. ### Setup - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` - **Toolchain / caches:** `rustc 1.100.0 (0ef1bc386 2026-11-09)`, DXC `1.9.2609.5`, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs) - **Workload:** Retail workload `title: 29640639` via `scripts/smoke.ps1 -Seconds 60` (`XCL_NETWORK=0 XCL_ACTIVITY=1`, default flags, no input) ### Targeted Win11 / RTX 4060 release unit tests (`58eb182e`) - `cargo test --release -p xcl --lib refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone -- --nocapture`: **1 passed, 0 failed, 0 ignored** (`0.21 s`, exit `0`). - `cargo test --release -p xcl --lib hle::xgameruntime:: -- --test-threads=4`: **76 passed, 0 failed, 0 ignored** (`0.78 s`, `0` skipped, exit `0`). ### Observations - The new `XGameUi` dialog refusal regression test (`refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone`) and all 76 `hle::xgameruntime::` tests passed cleanly in `--release` on native Windows 11 `26200` with `0` skips. - Quiet 60 s retail smoke ran cleanly (`exit: 0x0`, `1546` frames shown, `60 60 60` steady-state presents per 2 s, `0` device removals, `0` crashes, `14000 MB` peak commit vs parent `b49be183`'s `14018 MB` / `1518` frames). ### Paired 60 s RTX 4060 smoke (`b49be183` vs `58eb182e`) Parent `origin/main` (`b49be183`): ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1518 (PresentX 1518) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14018 MB ``` PR #2779 head (`58eb182e`): ``` xcl-smoke v1 commit: 58eb182e73edd5c3f241bcd2e982ce55cc92d729 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1546 (PresentX 1547) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14000 MB ``` ### Limits of coverage - Full workspace test suite was not re-run on `58eb182e` (only targeted `hle::xgameruntime::` release tests plus paired quiet 60 s smoke). - The 60 s no-input offline retail smoke (`XCL_NETWORK=0`) verifies zero runtime regression; live title invocations of the 17 Xbox Live / account `XGameUi*Async` / `*Result` dialogs are covered by the unit test `refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone`. - Native Windows 11 (`26200`) / x86-64 only; no Wine/Linux run on this host. ### AI use Ran the targeted release unit tests and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts and smoke blocks were taken directly from `cargo test` and `scripts/smoke.ps1` outputs.
gut0to commented 2026-11-26 15:43:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gut0to on 2026-11-26T15:43:24Z.

Review: COMMENTED


AI-assisted review (OpenAI GPT-6). I checked the changed test against its stated contract; I did not run tests or the game.

<!-- greyfinch-sync:ivall/xcl:review:6076956819 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2779#pullrequestreview-6076956819). Originally posted by [gut0to](https://github.com/gut0to) on 2026-11-26T15:43:24Z. **Review:** COMMENTED --- AI-assisted review (OpenAI GPT-6). I checked the changed test against its stated contract; I did not run tests or the game.
gut0to commented 2026-11-26 16:06:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gut0to on 2026-11-26T15:43:24Z.

Code review location: crates/xcl/src/hle/xgameruntime/api.rs; line 1768

@@ -1680,6 +1741,117 @@ mod tests {
         }
     }
 
+    static REFUSED_CB: AtomicU32 = AtomicU32::new(0);
+    unsafe extern "system" fn refused_cb(_b: *mut XAsyncBlock) {
+        REFUSED_CB.fetch_add(1, Ordering::SeqCst);
+    }
+
+    /// The refused XGameUi dialogs, called through the vtable slots a title's thunks use, on
+    /// XCL's own queues (no PC runtime): every Async entry point returns S_OK, completes with
+    /// E_NOTIMPL and delivers its completion callback exactly once; its Result entry points
+    /// (called with the call's own block) return that status and leave the caller's output
+    /// buffers as they were; a Result on a block that was never started is E_INVALIDARG.
+    #[test]
+    fn refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone() {
+        let _g = crate::hle::xgameruntime::xasync::ASYNC_TEST_LOCK.lock().unwrap_or_else(|e| e.into_inner());
+        super::super::xasync::use_pc(0);
+        unsafe {
+            let ui = own(&XGAMEUI, &g(0xeaf669df_5542_4590_99a3_8dc061f837cc)).expect("XGameUi object") as *const Obj as *mut c_void;
+            let at = |name: &str| slot_in_table(name).2;
+            // (async, then the call's other arguments as zeroes; each handler reads only the block)
+            type Begin = unsafe extern "system" fn(*mut c_void, *mut XAsyncBlock, usize, usize, usize, usize, usize, usize) -> HRESULT;
+            let run = |name: &str, args: usize| -> Box<XAsyncBlock> {
+                let begin: Begin = slot(ui, at(name));
+                let mut b: Box<XAsyncBlock> = Box::new(std::mem::zeroed());
+                b.callback = refused_cb as usize;
+                let before = REFUSED_CB.load(Ordering::SeqCst);
+                assert_eq!(begin(ui, &mut *b, args, args, args, args, args, args), S_OK, "{name}");

Every Async slot is called with the same zero in all six trailing positions. A handler that accidentally depends on a pointer or takes a null/default branch can still pass, and identical values do not expose an argument-order mismatch. Could this fixture pass distinct scalar sentinels and distinct non-null invalid pointer sentinels, so the test proves these refused entry points depend only on the XAsyncBlock? AI-assisted review (OpenAI GPT-6); I checked the test contract in this diff and did not run tests or the game.

<!-- greyfinch-sync:ivall/xcl:review-comment:4710609545 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2779#discussion_r4710609545). Originally posted by [gut0to](https://github.com/gut0to) on 2026-11-26T15:43:24Z. **Code review location:** `crates/xcl/src/hle/xgameruntime/api.rs`; line 1768 ~~~~diff @@ -1680,6 +1741,117 @@ mod tests { } } + static REFUSED_CB: AtomicU32 = AtomicU32::new(0); + unsafe extern "system" fn refused_cb(_b: *mut XAsyncBlock) { + REFUSED_CB.fetch_add(1, Ordering::SeqCst); + } + + /// The refused XGameUi dialogs, called through the vtable slots a title's thunks use, on + /// XCL's own queues (no PC runtime): every Async entry point returns S_OK, completes with + /// E_NOTIMPL and delivers its completion callback exactly once; its Result entry points + /// (called with the call's own block) return that status and leave the caller's output + /// buffers as they were; a Result on a block that was never started is E_INVALIDARG. + #[test] + fn refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone() { + let _g = crate::hle::xgameruntime::xasync::ASYNC_TEST_LOCK.lock().unwrap_or_else(|e| e.into_inner()); + super::super::xasync::use_pc(0); + unsafe { + let ui = own(&XGAMEUI, &g(0xeaf669df_5542_4590_99a3_8dc061f837cc)).expect("XGameUi object") as *const Obj as *mut c_void; + let at = |name: &str| slot_in_table(name).2; + // (async, then the call's other arguments as zeroes; each handler reads only the block) + type Begin = unsafe extern "system" fn(*mut c_void, *mut XAsyncBlock, usize, usize, usize, usize, usize, usize) -> HRESULT; + let run = |name: &str, args: usize| -> Box<XAsyncBlock> { + let begin: Begin = slot(ui, at(name)); + let mut b: Box<XAsyncBlock> = Box::new(std::mem::zeroed()); + b.callback = refused_cb as usize; + let before = REFUSED_CB.load(Ordering::SeqCst); + assert_eq!(begin(ui, &mut *b, args, args, args, args, args, args), S_OK, "{name}"); ~~~~ --- Every Async slot is called with the same zero in all six trailing positions. A handler that accidentally depends on a pointer or takes a null/default branch can still pass, and identical values do not expose an argument-order mismatch. Could this fixture pass distinct scalar sentinels and distinct non-null invalid pointer sentinels, so the test proves these refused entry points depend only on the `XAsyncBlock`? AI-assisted review (OpenAI GPT-6); I checked the test contract in this diff and did not run tests or the game.
futurepro62 commented 2026-11-30 00:52:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-30T00:52:43Z.


NVIDIA and AMD full-suite run, to go with the reports above by Decodere, since none of them covers AMD. Tested exact head 58eb182e (on its base b49be18).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::bridged_dpp_agrees_with_hlsl_on_the_gpu --skip hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap --skip gpu::dxil::fuzz_tests: 1424 passed, 0 failed, 45 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, dispatch_chain_native_wave64_builds_whole, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 --skip two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs: 1435 passed, 0 failed, 47 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main 53e85fb1 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, bridged_dpp_agrees_with_hlsl_on_the_gpu (no wave64 on this card) and two_pass_binds_set_the_shared_view_heap (heap windows are opt-in, XCL_HEAP_WINDOWS=1) fail the same way; gpu::dxil::fuzz_tests stays skipped as in earlier runs (seeds 70, 545, 1019 and 1507 failed CreateComputePipelineState with E_OUTOFMEMORY on this card; they passed on this main's baseline). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs fails on main too, since #2959 (#3441). (Edited: this line first named the wrong merge.) The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7265653186 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2779#issuecomment-7265653186). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-30T00:52:43Z. --- NVIDIA and AMD full-suite run, to go with the reports above by Decodere, since none of them covers AMD. Tested exact head `58eb182e` (on its base `b49be18`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::bridged_dpp_agrees_with_hlsl_on_the_gpu --skip hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap --skip gpu::dxil::fuzz_tests`: **1424 passed, 0 failed, 45 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `dispatch_chain_native_wave64_builds_whole`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 --skip two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs`: **1435 passed, 0 failed, 47 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `53e85fb1` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, `bridged_dpp_agrees_with_hlsl_on_the_gpu` (no wave64 on this card) and `two_pass_binds_set_the_shared_view_heap` (heap windows are opt-in, `XCL_HEAP_WINDOWS=1`) fail the same way; `gpu::dxil::fuzz_tests` stays skipped as in earlier runs (seeds 70, 545, 1019 and 1507 failed `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card; they passed on this main's baseline). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` fails on main too, since #2959 (#3441). (Edited: this line first named the wrong merge.) The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Foniass commented 2026-12-01 08:56:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:56:49Z.


Triage (#1607) – head 58eb182

No open or merged PR handles these XGameUi dialogs; on main they still answer E_NOTIMPL synchronously from the unimplemented slot. The new handlers in xgameruntime/api.rs read only the XAsyncBlock, which is the first argument of every listed XGameUi*Async call, and the Result functions reuse empty_result, so the caller's output buffers stay untouched. The test calls them through the vtable slots and checks the callback, the status and the outputs.
No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7305998618 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2779#issuecomment-7305998618). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:56:49Z. --- **Triage (#1607)** – head 58eb182 No open or merged PR handles these XGameUi dialogs; on main they still answer E_NOTIMPL synchronously from the unimplemented slot. The new handlers in `xgameruntime/api.rs` read only the XAsyncBlock, which is the first argument of every listed XGameUi*Async call, and the Result functions reuse `empty_result`, so the caller's output buffers stay untouched. The test calls them through the vtable slots and checks the callback, the status and the outputs. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2779:upstream-pr/2779'
git switch 'upstream-pr/2779'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2779'
git switch 'upstream-pr/2779'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2779'
git switch 'upstream-pr/2779'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2779'
git switch 'main'
git merge --squash 'upstream-pr/2779'
git switch 'main'
git merge --ff-only 'upstream-pr/2779'
git switch 'main'
git merge 'upstream-pr/2779'
git push origin 'main'
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
xcl-dev/xcl!2769
No description provided.