XGameRuntime: save blobs beyond the Windows path limit #1846

Open
github-bot wants to merge 1 commit from github-bot/gh-1846 into main AGit
Owner

@⁠gloger2003 on GitHub · 2026-11-24 21:44 UTC · original
gloger2003:fix/gamesave-long-path → main · +61 −4 · 2 files · 1 commits · open

Fixes #722. XGameSave could write the sibling temporary file, then fail to move it into place when the save path exceeded Windows' legacy path limit. Normalize the paths and pass their extended-length forms to the existing atomic replace.

What is in it

  • gamesave.rs preserves the existing replace and write-through flags, and tests creating and replacing a long-path blob and converting Windows path forms.
  • README.md notes that long Windows save paths are supported.

Tested

  • Radeon RX 7800 XT (driver 32.0.32029.2010), Ryzen 7 5700X, Windows 11 build 26300.9974, Rust 1.100.0 MSVC, DXC 1.9.2602.17. Debug tests and release title runs.
  • The new long-path regression failed on the base with E_FAIL. All 12 XGameSave tests passed with the change.
  • cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output: 891 passed, 0 failed, 42 ignored. The heap-window fallback test skipped with the opt-in off and passed in a separate real-GPU run with heap windows enabled.

Regression run
Minecraft Preview, the same 1× MSAA settings in both runs. The baseline's first run with default settings stopped at startup after a device removal.

xcl-smoke v1
commit: b9b6ea62080cc62fc19e212033372d01c6214e5c
gpu: AMD Radeon RX 7800 XT
title: Xbox-Series-1.18.3064.0
seconds: 30
exit: 0x0
frames shown: 1609 (PresentX 1609)
presents per 2 s (last 3): 120 120 120
device removals: 0
crashes: 0
peak commit: 3380 MB
xcl-smoke v1
commit: 20b51dc577d68963b0ddfcce310952777fa5c63c
gpu: AMD Radeon RX 7800 XT
title: Xbox-Series-1.18.3064.0
seconds: 30
exit: 0x0
frames shown: 1636 (PresentX 1636)
presents per 2 s (last 3): 120 120 120
device removals: 0
crashes: 0
peak commit: 3360 MB

Not tested

  • A live UNC share. The unit test checks UNC path conversion without connecting to a share.
  • The title run covers startup and rendering. The long-path save itself is covered by the local XGameSave test.

AI use

  • OpenAI Codex (GPT-6.2 Sol, high reasoning effort, Fast mode) reproduced the bug, wrote the fix and tests, ran validation, and drafted this description.
**@⁠gloger2003** on GitHub · 2026-11-24 21:44 UTC · [original](https://github.com/xcl-dev/xcl/pull/1846) `gloger2003:fix/gamesave-long-path` → `main` · +61 −4 · 2 files · 1 commits · open Fixes #722. XGameSave could write the sibling temporary file, then fail to move it into place when the save path exceeded Windows' legacy path limit. Normalize the paths and pass their extended-length forms to the existing atomic replace. **What is in it** - `gamesave.rs` preserves the existing replace and write-through flags, and tests creating and replacing a long-path blob and converting Windows path forms. - `README.md` notes that long Windows save paths are supported. **Tested** - Radeon RX 7800 XT (driver 32.0.32029.2010), Ryzen 7 5700X, Windows 11 build 26300.9974, Rust 1.100.0 MSVC, DXC 1.9.2602.17. Debug tests and release title runs. - The new long-path regression failed on the base with `E_FAIL`. All 12 XGameSave tests passed with the change. - `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output`: 891 passed, 0 failed, 42 ignored. The heap-window fallback test skipped with the opt-in off and passed in a separate real-GPU run with heap windows enabled. **Regression run** Minecraft Preview, the same 1× MSAA settings in both runs. The baseline's first run with default settings stopped at startup after a device removal. ``` xcl-smoke v1 commit: b9b6ea62080cc62fc19e212033372d01c6214e5c gpu: AMD Radeon RX 7800 XT title: Xbox-Series-1.18.3064.0 seconds: 30 exit: 0x0 frames shown: 1609 (PresentX 1609) presents per 2 s (last 3): 120 120 120 device removals: 0 crashes: 0 peak commit: 3380 MB ``` ``` xcl-smoke v1 commit: 20b51dc577d68963b0ddfcce310952777fa5c63c gpu: AMD Radeon RX 7800 XT title: Xbox-Series-1.18.3064.0 seconds: 30 exit: 0x0 frames shown: 1636 (PresentX 1636) presents per 2 s (last 3): 120 120 120 device removals: 0 crashes: 0 peak commit: 3360 MB ``` **Not tested** - A live UNC share. The unit test checks UNC path conversion without connecting to a share. - The title run covers startup and rendering. The long-path save itself is covered by the local XGameSave test. **AI use** - OpenAI Codex (GPT-6.2 Sol, high reasoning effort, Fast mode) reproduced the bug, wrote the fix and tests, ran validation, and drafted this description.
Resolve save paths in their extended-length form before the atomic replace, preserving the replace and write-through flags. Cover the first write and a replacement past MAX_PATH.

Fixes #722

Assisted-by: OpenAI Codex (GPT-6.2 Sol)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:07:06 +00:00
Author
Owner

@⁠frenziedcoder on GitHub · 2026-11-24 22:05 UTC · original

NVIDIA test report for 20b51dc: full suite green, the PR's 2 own tests pass (atomic_save_creates_and_replaces_a_blob_past_max_path, move_paths_preserve_windows_path_forms), and a clean smoke pair on the retail title (1653 vs 1649 frames).

Tested

  • NVIDIA GeForce RTX 5080 16 GB (driver 617.14, 32-lane waves), AMD Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head 20b51dc577d68963b0ddfcce310952777fa5c63c, no local changes.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 (debug): 891 passed, 0 failed, 42 ignored; the PR's 2 own tests pass (atomic_save_creates_and_replaces_a_blob_past_max_path, move_paths_preserve_windows_path_forms). SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • test_title_draws_with_a_root_signature_under_the_debug_layer reports ok, but this machine has no D3D12 debug layer (debug layer requested but unavailable … (0x887A002D)), so it ran without the layer and is no evidence either way.

Regression run (scripts/smoke.ps1 -Seconds 60, release, the retail title of #505 at its start screen; XCL_PSO_PRELOAD=0 for both builds, because this machine's preload list holds the program of #1307)

base (b9b6ea6, this PR's merge base with main):

xcl-smoke v1
commit: b9b6ea62080cc62fc19e212033372d01c6214e5c
gpu: NVIDIA GeForce RTX 5080
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1649 (PresentX 1649)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14603 MB

this PR:

xcl-smoke v1
commit: 20b51dc577d68963b0ddfcce310952777fa5c63c
gpu: NVIDIA GeForce RTX 5080
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1653 (PresentX 1653)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14602 MB

Not tested: the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD.

AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.

**@⁠frenziedcoder** on GitHub · 2026-11-24 22:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/1846#issuecomment-7145789949) **NVIDIA test report for `20b51dc`: full suite green, the PR's 2 own tests pass (`atomic_save_creates_and_replaces_a_blob_past_max_path`, `move_paths_preserve_windows_path_forms`), and a clean smoke pair on the retail title (1653 vs 1649 frames).** **Tested** - NVIDIA GeForce RTX 5080 16 GB (driver 617.14, 32-lane waves), AMD Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 25H2 (26200.9974), rustc 1.100.0 `stable-x86_64-pc-windows-msvc`, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact head `20b51dc577d68963b0ddfcce310952777fa5c63c`, no local changes. - `cargo build --workspace && cargo test --workspace -- --test-threads=4` (debug): **891 passed, 0 failed, 42 ignored**; the PR's 2 own tests pass (`atomic_save_creates_and_replaces_a_blob_past_max_path`, `move_paths_preserve_windows_path_forms`). SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu_wave32_program_in_wave64_hardware` (no wave64), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `test_title_draws_with_a_root_signature_under_the_debug_layer` reports ok, but this machine has no D3D12 debug layer (`debug layer requested but unavailable … (0x887A002D)`), so it ran without the layer and is no evidence either way. **Regression run** (`scripts/smoke.ps1 -Seconds 60`, release, the retail title of #505 at its start screen; `XCL_PSO_PRELOAD=0` for both builds, because this machine's preload list holds the program of #1307) base (`b9b6ea6`, this PR's merge base with `main`): ``` xcl-smoke v1 commit: b9b6ea62080cc62fc19e212033372d01c6214e5c gpu: NVIDIA GeForce RTX 5080 title: RetailTitle seconds: 60 exit: 0x0 frames shown: 1649 (PresentX 1649) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14603 MB ``` this PR: ``` xcl-smoke v1 commit: 20b51dc577d68963b0ddfcce310952777fa5c63c gpu: NVIDIA GeForce RTX 5080 title: RetailTitle seconds: 60 exit: 0x0 frames shown: 1653 (PresentX 1653) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14602 MB ``` **Not tested:** the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD. *AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.*
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 01:15 UTC · original

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

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

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 01:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/1846#issuecomment-7149365571) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 03:02 UTC · original

PR #1846 — XGameRuntime long-path save verification

Verified 20b51dc577d68963b0ddfcce310952777fa5c63c on STOR-WINLAB. The PR supplies absolute, extended-length Windows paths for both operands of the atomic MoveFileExW blob replacement.

Environment

Windows 11 Enterprise Evaluation build 26200.9974, Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, DoublePrecisionFloatShaderOps=0, wave sizes 8–32). Rust 1.100.0 (0ef1bc386), DXC/DXIL 1.9.2609.5. Debug/test profiles with debug info and incremental compilation disabled. XCL_ADAPTER=A770.

Tested

  • cargo build --workspace and cargo test --workspace --no-run both passed.
  • cargo test -p xcl hle::xgameruntime::gamesave::tests:: -- --nocapture — 12 passed, 0 failed, 0 ignored. Both new tests also passed in the workspace suite. atomic_save_creates_and_replaces_a_blob_past_max_path verified both writes returned S_OK and read back the expected bytes at a path of at least 260 UTF-16 code units. move_paths_preserve_windows_path_forms verified drive-path normalization and conversion or preservation of UNC path strings.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under the shared Arc lock and exited 101. Summed across 20 harness summaries, Cargo reported 873 passed, 18 failed, 42 ignored. The log contains 4 SKIPPED lines. Those tests contributed to Cargo's pass count and provide no coverage.

Failures and skips

  • 17 GPU library failures. 13 returned 0x80070057 from CreateComputePipelineState, including FP64 cases. Four had result mismatches in FMA, mip sampling, FP16 high-half preservation, and whole-wave reductions.
  • The bundled-title E2E test failed its dynamic depth-bias check (blue pixel, expected green). The title log also recorded an XAudio2 mastering-voice error (0x80070490).
  • Logged skips comprised two wave64 cases, one driver-cache measurement, and one heap-window fallback case.

Not tested

Live UNC writes, retail-title smoke on main or PR head, optional game samples, other GPUs, and D3D12 debug-layer coverage (missing d3d12SDKLayers.dll). No baseline suite was run to establish whether the failures predate the PR.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1846-suite.log and published this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 03:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/1846#issuecomment-7151533136) # PR #1846 — XGameRuntime long-path save verification Verified `20b51dc577d68963b0ddfcce310952777fa5c63c` on STOR-WINLAB. The PR supplies absolute, extended-length Windows paths for both operands of the atomic `MoveFileExW` blob replacement. **Environment** Windows 11 Enterprise Evaluation build 26200.9974, Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, `DoublePrecisionFloatShaderOps=0`, wave sizes 8–32). Rust 1.100.0 (`0ef1bc386`), DXC/DXIL 1.9.2609.5. Debug/test profiles with debug info and incremental compilation disabled. `XCL_ADAPTER=A770`. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` both passed. - `cargo test -p xcl hle::xgameruntime::gamesave::tests:: -- --nocapture` — 12 passed, 0 failed, 0 ignored. Both new tests also passed in the workspace suite. `atomic_save_creates_and_replaces_a_blob_past_max_path` verified both writes returned `S_OK` and read back the expected bytes at a path of at least 260 UTF-16 code units. `move_paths_preserve_windows_path_forms` verified drive-path normalization and conversion or preservation of UNC path strings. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under the shared Arc lock and exited 101. Summed across 20 harness summaries, Cargo reported **873 passed, 18 failed, 42 ignored**. The log contains **4 `SKIPPED ` lines**. Those tests contributed to Cargo's pass count and provide no coverage. **Failures and skips** - 17 GPU library failures. 13 returned `0x80070057` from `CreateComputePipelineState`, including FP64 cases. Four had result mismatches in FMA, mip sampling, FP16 high-half preservation, and whole-wave reductions. - The bundled-title E2E test failed its dynamic depth-bias check (blue pixel, expected green). The title log also recorded an XAudio2 mastering-voice error (`0x80070490`). - Logged skips comprised two wave64 cases, one driver-cache measurement, and one heap-window fallback case. **Not tested** Live UNC writes, retail-title smoke on main or PR head, optional game samples, other GPUs, and D3D12 debug-layer coverage (missing `d3d12SDKLayers.dll`). No baseline suite was run to establish whether the failures predate the PR. **AI use** T3 Code / Codex (`gpt-6.2-sol`, `reasoningEffort: high`) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, `gemini-4-neon`) verified counts against `pr1846-suite.log` and published this report.
This pull request has changes conflicting with the target branch.
  • README.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1846/head:github-bot/gh-1846'
git switch 'github-bot/gh-1846'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1846'
git switch 'github-bot/gh-1846'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1846'
git switch 'github-bot/gh-1846'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1846'
git switch 'main'
git merge --squash 'github-bot/gh-1846'
git switch 'main'
git merge --ff-only 'github-bot/gh-1846'
git switch 'main'
git merge 'github-bot/gh-1846'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.