XGameRuntime: implement XPersistentLocalStorageMountForPackage #839

Open
mastrr9 wants to merge 1 commit from upstream-pr/845 into main
mastrr9 commented 2026-11-24 06:39:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mastrr9 on 2026-11-24T06:39:53Z.


Implements XPersistentLocalStorageMountForPackage (slot 8 of 41a4e10c in gdk_table.rs, previously returning E_NOTIMPL) and registers it in both api.rs and mod.rs exports:

  • Mounts the running game's persistent local storage path (pls_path()) as a standard XPackage Mount handle compatible with XPackageGetMountPathSize, XPackageGetMountPath, and XPackageCloseMountHandle (case-insensitive package identifier match).
  • Returns HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) for any other package identifier, and E_INVALIDARG for a null out-pointer or null/empty identifier (clearing *out to null first).
  • Adds unit test pls_mounts_for_the_running_package_only.

Tested

  • Hardware/OS: NVIDIA RTX 5080 (driver 617.42 / 32.0.16.1742), Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC debug, DXC Windows SDK 10.0.26100.0, d3d12SDKLayers.dll installed
  • Commit tested: e024c8610a44732af7f7188a4e9e1e5bd30913f6
  • cargo build --workspace: clean (only pre-existing fetch_update deprecation warning)
  • cargo test --workspace -- --test-threads=4: 714 passed, 0 failed, 41 ignored (new test hle::xgameruntime::tests::pls_mounts_for_the_running_package_only passed)
  • SKIPPED GPU tests: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64

Not tested

  • Retail title regression run (scripts/smoke.ps1) not yet run (no retail title available in this clean-room environment); opened as Draft pending a smoke run.

AI use

  • Authored with Claude Code (Claude Opus 5.5); reviewed, audited, and verified on native Windows/RTX 5080 hardware with Antigravity (Gemini 4 Neon + Claude Sonnet 5.5).
<!-- greyfinch-sync:ivall/xcl:issue:5467407007 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/845). Originally posted by [mastrr9](https://github.com/mastrr9) on 2026-11-24T06:39:53Z. --- Implements `XPersistentLocalStorageMountForPackage` (slot 8 of `41a4e10c` in `gdk_table.rs`, previously returning `E_NOTIMPL`) and registers it in both `api.rs` and `mod.rs` exports: - Mounts the running game's persistent local storage path (`pls_path()`) as a standard `XPackage` `Mount` handle compatible with `XPackageGetMountPathSize`, `XPackageGetMountPath`, and `XPackageCloseMountHandle` (case-insensitive package identifier match). - Returns `HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)` for any other package identifier, and `E_INVALIDARG` for a null out-pointer or null/empty identifier (clearing `*out` to null first). - Adds unit test `pls_mounts_for_the_running_package_only`. **Tested** - Hardware/OS: NVIDIA RTX 5080 (driver `617.42` / `32.0.16.1742`), Windows 11 Pro 25H2 (`26200.9974`), `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC debug, DXC Windows SDK `10.0.26100.0`, `d3d12SDKLayers.dll` installed - Commit tested: `e024c8610a44732af7f7188a4e9e1e5bd30913f6` - `cargo build --workspace`: clean (only pre-existing `fetch_update` deprecation warning) - `cargo test --workspace -- --test-threads=4`: **714 passed, 0 failed, 41 ignored** (new test `hle::xgameruntime::tests::pls_mounts_for_the_running_package_only` passed) - `SKIPPED` GPU tests: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64` **Not tested** - Retail title regression run (`scripts/smoke.ps1`) not yet run (no retail title available in this clean-room environment); opened as Draft pending a smoke run. **AI use** - Authored with Claude Code (Claude Opus 5.5); reviewed, audited, and verified on native Windows/RTX 5080 hardware with Antigravity (Gemini 4 Neon + Claude Sonnet 5.5).
futurepro62 commented 2026-11-24 07:06:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T07:06:29Z.


Full-suite run, since this PR has no test report yet. Tested exact head e024c86 (on its base beaa245).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 714 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: pls_mounts_for_the_running_package_only.

Not tested

  • AMD, 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:7124624031 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/845#issuecomment-7124624031). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T07:06:29Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `e024c86` (on its base `beaa245`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **714 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `pls_mounts_for_the_running_package_only`. **Not tested** - AMD, 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.
SlopTart commented 2026-11-24 09:07:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T08:09:50Z.


Linux / AMD RDNA3 datapoint.

Merged state: head e024c86 onto main 1ec4c98 (lane merge c9e2fca).

The first lane run died mid-lib with no panic (transient Wine/Wine-X hiccup - same rig artifact as my batch-1 #818 note). Isolated reruns are clean and this is the honest row:

  • lib suite, --test-threads=4: 668 passed, 7 failed, 21 ignored - exactly the known Wine-lane set from my #42 rows, zero flakes.
  • e2e, pls_quota, predication_e2e targets: each fails only on its known Wine-lane signature (test_title_runs..., disk_free_space_ex_reports_pls_quota, set_predication_buffer_state_and_kickoff).

XPersistentLocalStorageMountForPackage tests green here.

Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7125800606 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/845#issuecomment-7125800606). Originally posted by [SlopTart](https://github.com/SlopTart) on 2026-11-24T08:09:50Z. --- Linux / AMD RDNA3 datapoint. **Merged state:** head `e024c86` onto main `1ec4c98` (lane merge `c9e2fca`). The first lane run died mid-lib with no panic (transient Wine/Wine-X hiccup - same rig artifact as my batch-1 #818 note). Isolated reruns are clean and this is the honest row: - lib suite, `--test-threads=4`: **668 passed, 7 failed, 21 ignored** - exactly the known Wine-lane set from my #42 rows, zero flakes. - `e2e`, `pls_quota`, `predication_e2e` targets: each fails only on its known Wine-lane signature (`test_title_runs...`, `disk_free_space_ex_reports_pls_quota`, `set_predication_buffer_state_and_kickoff`). `XPersistentLocalStorageMountForPackage` tests green here. **Not tested:** retail titles (none here), Windows, RDNA4. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
JJAutoCompare commented 2026-11-25 06:05:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:45:32Z.


Empirical test report (1d99a186)

Hardware / environment

  • Windows x64, build 26200. AMD CPU (family 23, model 113, stepping 0), 12 logical processors reported by Windows.
  • Rust 1.100.0 (0ef1bc386 2026-11-09) and DXC 1.9.2609.5 (01b62ad47). Cargo test profile was unoptimized, with debug info and incremental compilation disabled.
  • Verified detached head 1d99a18670874eec996fa169fabab0c8b4b06155 for xcl-dev/xcl PR #845. Both commands ran outside Invoke-ArcTest.ps1, with no Arc GPU mutex held. The focused run used XCL_ADAPTER=NONE_CPU_ONLY and RUST_TEST_NOCAPTURE=1.

Commands and results

  • cargo test --workspace --no-run exited 0. It built the workspace test executables without executing them.
  • cargo test -p xcl --lib hle::xgameruntime::tests::pls_mounts_for_the_running_package_only -- --exact --nocapture exited 0. Focused log counts were 1 passed, 0 failed, 0 ignored, 0 skipped. The harness filtered out 693 tests.

Observed behavior

  • The PR's unit test rejected a null output pointer and null and empty package identifiers with E_INVALIDARG. It checked that the output handle was null after the null-identifier call.
  • An unrelated package identifier returned HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) and left a null output handle. The runtime logged that the package was unavailable.
  • A lowercased identifier for the running package returned S_OK and a non-null mount handle. XPackageGetMountPathSize and XPackageGetMountPath retrieved the path, which matched the runtime's persistent local storage path. The test then called XPackageCloseMountHandle.

Not tested

  • The full GPU workspace suite and game smoke runs were omitted. The focused test calls the implementation directly. Title import resolution and in-game behavior were outside this run.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr845-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7154110572 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/845#issuecomment-7154110572). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:45:32Z. --- ### Empirical test report (1d99a186) **Hardware / environment** - Windows x64, build 26200. AMD CPU (family 23, model 113, stepping 0), 12 logical processors reported by Windows. - Rust `1.100.0 (0ef1bc386 2026-11-09)` and DXC `1.9.2609.5 (01b62ad47)`. Cargo test profile was unoptimized, with debug info and incremental compilation disabled. - Verified detached head `1d99a18670874eec996fa169fabab0c8b4b06155` for xcl-dev/xcl PR #845. Both commands ran outside `Invoke-ArcTest.ps1`, with no Arc GPU mutex held. The focused run used `XCL_ADAPTER=NONE_CPU_ONLY` and `RUST_TEST_NOCAPTURE=1`. **Commands and results** - `cargo test --workspace --no-run` exited 0. It built the workspace test executables without executing them. - `cargo test -p xcl --lib hle::xgameruntime::tests::pls_mounts_for_the_running_package_only -- --exact --nocapture` exited 0. Focused log counts were 1 passed, 0 failed, 0 ignored, 0 skipped. The harness filtered out 693 tests. **Observed behavior** - The PR's unit test rejected a null output pointer and null and empty package identifiers with `E_INVALIDARG`. It checked that the output handle was null after the null-identifier call. - An unrelated package identifier returned `HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)` and left a null output handle. The runtime logged that the package was unavailable. - A lowercased identifier for the running package returned `S_OK` and a non-null mount handle. `XPackageGetMountPathSize` and `XPackageGetMountPath` retrieved the path, which matched the runtime's persistent local storage path. The test then called `XPackageCloseMountHandle`. **Not tested** - The full GPU workspace suite and game smoke runs were omitted. The focused test calls the implementation directly. Title import resolution and in-game behavior were outside this run. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr845-focused.log` and published.
DavidM1911 commented 2026-11-25 11:09:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T10:27:43Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7159726993 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/845#issuecomment-7159726993). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T10:27:43Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
github-actions[bot] commented 2026-11-29 20:40:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:40:50Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7262272475 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/845#issuecomment-7262272475). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:40:50Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 04:18:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:18:03Z.


Triage (#1607) – head 1d99a18

No open or merged PR implements XPersistentLocalStorageMountForPackage (main only lists it in gdk_table.rs).
The handle is the same boxed Mount that XPackageMount returns, so XPackageGetMountPath(Size) and XPackageCloseMountHandle work on it unchanged; *out is nulled on every failure path. 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:7300589508 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/845#issuecomment-7300589508). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:18:03Z. --- **Triage (#1607)** – head 1d99a18 No open or merged PR implements XPersistentLocalStorageMountForPackage (main only lists it in `gdk_table.rs`). The handle is the same boxed `Mount` that XPackageMount returns, so XPackageGetMountPath(Size) and XPackageCloseMountHandle work on it unchanged; `*out` is nulled on every failure path. 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/845:upstream-pr/845'
git switch 'upstream-pr/845'

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/845'
git switch 'upstream-pr/845'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/845'
git switch 'upstream-pr/845'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/845'
git switch 'main'
git merge --squash 'upstream-pr/845'
git switch 'main'
git merge --ff-only 'upstream-pr/845'
git switch 'main'
git merge 'upstream-pr/845'
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!839
No description provided.