XGameSave: stage all blob writes before renaming (#324) #486
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/491"
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 Grimkaaah on 2026-11-24T01:00:03Z.
Summary
XGameSaveSubmitUpdate/applynow stages every write (display + blobs) to sibling temp files, and only renames them into place after all stages succeed.E_FAILwithout changing the container (GDK all-or-nothing).Oldand bloba = old, with no blobb.Fixes #324
Test plan
cargo test -p xcl --lib hle::xgameruntime::gamesave::(11 passed)mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #172Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T03:04:04Z.
Tested exact head
60930bb(on its base2997c9a).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 677 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.Not tested
scripts/smoke.ps1(no title on this machine), AMD, wave64 hardware, a release build.AI use
Imported from ivall/xcl. Originally posted by H0UNDZER0 on 2026-11-24T03:05:46Z.
Tested on an RTX 5080, release build: pass, 677 passed, 0 failed.
60930bb057093bd7b2d89f1a95ee4d38aacb6aa3, this PR's head as is (on its base2997c9a), release build.XCL_*variables set.cargo build --release --workspace --locked: OK, with 2 warnings more thanmain's one: unused importAtomicUsize(gamesave.rs:7, used only undercfg(test)), andwrite_atomicis never used (gamesave.rs:190).cargo test --workspace --release --no-fail-fast --locked -- --test-threads=4, run twice (the second with--show-output): 677 passed, 0 failed, 41 ignored both times.main2997c9agives 676 / 0 / 41 on this PC: the difference is the newfailed_submit_leaves_container_untouched, which passes.SKIPPED: the usual 2,gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64).e2e), its save-storage check included, ends withfailures: 0.Not tested
main. When this was written that wasdd2ae9a;git merge-treeshowed no conflict.scripts/smoke.ps1.AI use: Claude Code (Claude Opus 5.5, Claude Fable 5.2)
Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T05:24:02Z.
Test run of
60930bb057093bd7b2d89f1a95ee4d38aacb6aa3on AMD RDNA4. I merged it onto currentmaind208e14locally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 705 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 664 passed, 0 failed, 21 ignoredSKIPPED; thegamesavetests pass,atomic_writes_preserve_xcltmp_blobs_and_skip_leftover_tempsincluded.Review: Staging every write to a sibling temp and renaming only after all stages succeed makes a failed update leave the container as it was, which is what #324 asks for (the GDK's all-or-nothing). The renames themselves are still separate, so a failure between two renames can leave a partial update; that window is much smaller than before but not zero.
Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-24T10:44:10Z.
Closing as a duplicate of #543 for #324, which passes the
PR descriptioncheck (whereas this PR failsPR description).Pull request closed