XGameRuntime: XPackageEnumerateChunkAvailability calls back per language chunk #2793
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2803"
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 oni-swr on 2026-11-26T13:51:09Z.
XPackageEnumerateChunkAvailabilitywas mapped took()and never ran the callback, so a title listing the package languages got an empty list. XCL models one installed chunk per language declared inMicrosoftGame.Config(XPackageFindChunkAvailabilityalready reports Ready), so a Language selector now gets one callback per declared language with Ready, stopping when the callback returns false. A null callback returnsE_INVALIDARG. Tag, Chunk and Feature selectors have no modelled data and get no callbacks.Fixes #2785
What is in it
crates/xcl/src/hle/xgameruntime/api.rs: the implementation, and testenumerate_chunk_availability_calls_back_per_matching_selector(one callback per language, early stop, no languages, other selector types, null callback). Selector layout and enum values are from the public GDK pages forXPackageChunkSelector,XPackageChunkSelectorTypeandXPackageChunkAvailability.Tested
cargo test -p xcl --lib -j 4 hle::xgameruntime: 76 passed, 0 failed, 0 ignored, 1261 filtered out, no SKIPPED084c8b5c(clean detached checkout, RX 7800 XT driver 32.0.31035.1003, noXCL_ADAPTERset, debug):cargo build --workspace -j 4, thencargo test --workspace -j 4 --no-fail-fast -- --test-threads=4: 1435 passed, 1 failed, 47 ignored over 37 test binaries (lib: 1309 passed, 1 failed, 27 ignored). 7 SKIPPED messages: sixf16_programs_on_the_gpu/f32_programs_on_the_gpucases the lowering refuses (V_MUL_F16 / V_PK_MUL_F16 / V_CVT_F16_F32) andheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).enumerate_chunk_availability_calls_back_per_matching_selectorpassed.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1("seed 722: res[30] = 0x1, CPU 0x7fffffff", #2115). It fails the same way, same seed, onmainate120925e, so it is not caused by this PR.cargo clippy --lib --tests: nothing on the new codeRegression run
Same title, 60 s each, same machine, one after the other (RX 7800 XT). Blocks pasted unedited from
scripts/smoke.ps1.main:
PR:
Not tested
XPackageEnumerateChunkAvailability: the smoke run is a regression check onlyAI use
mainwere made with Claude Code (Claude Sonnet 5.5), which also added them to this description.🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by ettehn on 2026-11-26T14:03:51Z.
Independent Windows A/B through
QueryApiImpland XPackage slot 13, with only the same test added on each checkout (b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7and084c8b5c06f088fbe18e563ddfcb46782aeb3298). The test supplied a syntheticMicrosoftGame.Configwithen-USandfr-FRthrough the normal manifest loader.S_OKwith zero callbacks through both the current interface and the legacy V1 interface. The test failed on the expected callback assertion.Readycallback per language on both interfaces, in manifest order. Returningfalsefrom the callback stopped afteren-US. The non-language selector returnedS_OKwithout invoking the callback.Windows 11 build 26200, Ryzen 9 8945HX, Rust 1.97.1 MSVC debug.
cargo test --locked --offline -p xcl --lib -j 2 -- hle::xgameruntime::api::tests::package_language_callbacks_through_current_and_legacy_slots --exact --test-threads=1 --nocapturewas 0 passed / 1 failed on main and 1 passed / 0 failed on the PR. A separate PR process ranhle::xgameruntime, excluding the local test that sets the boot config, with 76 passed, 0 failed, 0 ignored and no reported skips. No title or full workspace run in this check.OpenAI Codex assisted with the test and verification. The exact model identifier was unavailable in this session.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:34:45Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:00:18Z.
Triage (#1607) – head
084c8b5No open or merged PR makes the same change; main still maps
XPackageEnumerateChunkAvailabilitytook.No problems found in the diff:
ChunkSelectormatches the GDK layout (u32 type, pointer union at 8), theCStringoutlives each callback, enumeration stops onfalse, and non-language selector types get no callback, which matches the no-tags/no-features model of the other XPackage stubs.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.