XGameUi: handle the Xbox Live and account dialogs explicitly, completing with E_NOTIMPL #2769
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2779"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
*Asynccompletes itsXAsyncBlockat once withE_NOTIMPL, and each*Resultreturns that status.What is in it
crates/xcl/src/hle/xgameruntime/api.rs:ui_refused,ui_refused_fns!andxgameui_refused()register the 17 functions on the XGameUi class (built on the existing
begin_withandempty_resulthelpers). The class'simplswas empty before.api.rsheader comment: says which XGameUi dialogs XCL refuses and which still go to the PC runtime.api.rstests: the newrefused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone,and the old
E_NOTIMPL+unimplementedassertion inthunk_protocol_with_xcl_objects_on_pc_queuesrewritten for the new behaviour.
HANDOFF.md(~L1029): its "not implemented in XCL classes" counts are now stale for thesefunctions. Left unedited, as the repository rules ask.
The 17 functions
Async entry points (8):
XGameUiShowAchievementsAsync,XGameUiShowPlayerPickerAsync,XGameUiShowPlayerProfileCardAsync,XGameUiShowSendGameInviteAsync,XGameUiShowStateShareAsync,XGameUiShowMultiplayerActivityGameInviteAsync,XGameUiShowWebAuthenticationAsync,XGameUiShowWebAuthenticationWithOptionsAsyncResult / status entry points (9):
XGameUiShowAchievementsResult,XGameUiShowPlayerPickerResultCount,XGameUiShowPlayerPickerResult,XGameUiShowPlayerProfileCardResult,XGameUiShowSendGameInviteResult,XGameUiShowStateShareResult,XGameUiShowMultiplayerActivityGameInviteResult,XGameUiShowWebAuthenticationResultSize,XGameUiShowWebAuthenticationResultBehaviour
*AsyncreturnsS_OK, completes the block withE_NOTIMPLand delivers the completioncallback once. It logs
XGameRuntime: <name> - no UI offline (completes with E_NOTIMPL).*Resultreturns the call's status (E_NOTIMPL) and does not write its outputarguments (counts, sizes, player ids, result pointer, buffer).
XAsyncBlock*; every GDK signature for thesefunctions 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
*Asynccompletes itsXAsyncBlockat once withE_NOTIMPL, and each*Resultreturns that status.What is in it
crates/xcl/src/hle/xgameruntime/api.rs:ui_refused,ui_refused_fns!andxgameui_refused()register the 17 functions on the XGameUi class (built on the existing
begin_withandempty_resulthelpers). The class'simplswas empty before.api.rsheader comment: says which XGameUi dialogs XCL refuses and which still go to the PC runtime.api.rstests: the newrefused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone,and the old
E_NOTIMPL+unimplementedassertion inthunk_protocol_with_xcl_objects_on_pc_queuesrewritten for the new behaviour.
HANDOFF.md(~L1029): its "not implemented in XCL classes" counts are now stale for thesefunctions. Left unedited, as the repository rules ask.
The 17 functions
Async entry points (8):
XGameUiShowAchievementsAsync,XGameUiShowPlayerPickerAsync,XGameUiShowPlayerProfileCardAsync,XGameUiShowSendGameInviteAsync,XGameUiShowStateShareAsync,XGameUiShowMultiplayerActivityGameInviteAsync,XGameUiShowWebAuthenticationAsync,XGameUiShowWebAuthenticationWithOptionsAsyncResult / status entry points (9):
XGameUiShowAchievementsResult,XGameUiShowPlayerPickerResultCount,XGameUiShowPlayerPickerResult,XGameUiShowPlayerProfileCardResult,XGameUiShowSendGameInviteResult,XGameUiShowStateShareResult,XGameUiShowMultiplayerActivityGameInviteResult,XGameUiShowWebAuthenticationResultSize,XGameUiShowWebAuthenticationResultBehaviour
*AsyncreturnsS_OK, completes the block withE_NOTIMPLand delivers the completioncallback once. It logs
XGameRuntime: <name> - no UI offline (completes with E_NOTIMPL).*Resultreturns the call's status (E_NOTIMPL) and does not write its outputarguments (counts, sizes, player ids, result pointer, buffer).
XAsyncBlock*; every GDK signature for thesefunctions 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 anassumption about the existing dispatch machinery; no test isolates it.
Side effect on
report.jsonThese calls are no longer counted under
xgameruntime.unimplemented, because they are no longerunknown slots. Anyone using that list to find gaps will stop seeing them; the log line above is
the replacement.
Tested
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).
b49be18368plus 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
SKIPPEDlines;those tests pass without running and are not coverage.
thunk_protocol_with_xcl_objects_on_pc_queues(existing, edited) covers 3:XGameUiShowAchievementsAsync,XGameUiShowAchievementsResultandXGameUiShowWebAuthenticationWithOptionsAsync. It runs on the PC runtime's queues.refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone(new) covers all 17through their vtable slots on XCL's own queues. It checks
S_OKfrom each Async, onecompletion callback per call,
XAsyncGetStatus=E_NOTIMPL, every Result =E_NOTIMPL,untouched output buffers,
E_INVALIDARGfor a never-started block and for a null block.S_OK, and a missingWithOptionsregistration,each made the new test fail; both were reverted.
errors_propagate_and_release_active_state, not by the new test.Regression run
Same game folder, 60 seconds, same title for both.
mainfirst:This change:
Not tested
E_NOTIMPL(it may treat it as fatal rather than as a dismissed dialog).XGameUiSet*UIResponseandXGameUISetUICallbacks(not in thegenerated GDK table),
XGameProtocol*.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.rsand 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.
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 parentorigin/mainb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Measurements and targeted test results only; not a full source review.Setup
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)title: 29640639viascripts/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, exit0).cargo test --release -p xcl --lib hle::xgameruntime:: -- --test-threads=4: 76 passed, 0 failed, 0 ignored (0.78 s,0skipped, exit0).Observations
XGameUidialog refusal regression test (refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone) and all 76hle::xgameruntime::tests passed cleanly in--releaseon native Windows 1126200with0skips.exit: 0x0,1546frames shown,60 60 60steady-state presents per 2 s,0device removals,0crashes,14000 MBpeak commit vs parentb49be183's14018 MB/1518frames).Paired 60 s RTX 4060 smoke (
b49be183vs58eb182e)Parent
origin/main(b49be183):PR #2779 head (
58eb182e):Limits of coverage
58eb182e(only targetedhle::xgameruntime::release tests plus paired quiet 60 s smoke).XCL_NETWORK=0) verifies zero runtime regression; live title invocations of the 17 Xbox Live / accountXGameUi*Async/*Resultdialogs are covered by the unit testrefused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone.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 testandscripts/smoke.ps1outputs.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.
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 1768Every 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.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 baseb49be18).Tested
cargo build --workspace, thenXCL_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.refused_xgameui_dialogs_complete_with_e_notimpl_and_leave_outputs_alone.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).--skipleaves out tests that fail on main53e85fb1too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh,bridged_dpp_agrees_with_hlsl_on_the_gpu(no wave64 on this card) andtwo_pass_binds_set_the_shared_view_heap(heap windows are opt-in,XCL_HEAP_WINDOWS=1) fail the same way;gpu::dxil::fuzz_testsstays skipped as in earlier runs (seeds 70, 545, 1019 and 1507 failedCreateComputePipelineStatewithE_OUTOFMEMORYon this card; they passed on this main's baseline). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6).two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobsfails on main too, since #2959 (#3441). (Edited: this line first named the wrong merge.) The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:56:49Z.
Triage (#1607) – head
58eb182No 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.rsread only the XAsyncBlock, which is the first argument of every listed XGameUi*Async call, and the Result functions reuseempty_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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.