Skip to content

XGameRuntime: implement XPersistentLocalStorageMountForPackage - #845

Open
mastrr9 wants to merge 1 commit into
xcl-dev:mainfrom
mastrr9:feat/xgameruntime-pls-mount-for-package
Open

mastrr9 wants to merge 1 commit into
xcl-dev:mainfrom
mastrr9:feat/xgameruntime-pls-mount-for-package

Conversation

@mastrr9

@mastrr9 mastrr9 commented Nov 24, 2026

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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.

Mounts the running package's PLS as an XPackage mount handle (path via
XPackageGetMountPath(Size), closed with XPackageCloseMountHandle). Any
other package has no PLS offline and gets
HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), as the GDK reference
documents for a title whose PLS does not exist. Null out, null or
empty identifier give E_INVALIDARG.

Assisted-by: Claude Code (Claude Opus 5.5)
@mastrr9
mastrr9 force-pushed the feat/xgameruntime-pls-mount-for-package branch from e024c86 to 1d99a18 Compare November 24, 2026 07:58
@SlopTart

Copy link
Copy Markdown

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:

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.

@mastrr9
mastrr9 marked this pull request as ready for review November 24, 2026 16:42
@JJAutoCompare

Copy link
Copy Markdown

Empirical test report (1d99a18)

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 XGameRuntime: implement XPersistentLocalStorageMountForPackage #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants