Repository navigation
XGameSave: defer container deletion until work dispatch - #108
Conversation
|
Nice fix — deferring async container deletion until work dispatch and serializing it with Note: #97 touches the complementary parts of |
|
Merged. It conflicted with #95's identical name check, which had landed on |
…nment GetResourceAllocationInfo (#25) and GetResourceAllocationInfo2 (#108) laid several resources out one after another, each at its own alignment, but returned the end of the last one as the size. The PC's docs for GetResourceAllocationInfo with several descriptions: "the C++ algorithm for calculating a structure size and alignment are used" - a 4 MiB-aligned resource between two 64 KiB-aligned ones takes 12 MiB, first or last 8 MiB, the alignment 4 MiB. XCL answered 8 MiB + 64 KiB and 4 MiB + 128 KiB: a title sizing one heap for the group from it got a heap that does not end on the alignment its resources need. The arithmetic of both is now one function, `allocation_of`, which pads the total to the largest alignment when there is more than one resource. One resource's info is still the driver's or XG's as it is (#108 asks #25 for each one alone); the per-resource offsets #108 writes are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add standalone host-driver parity and contract tests for D3D12.X's memory-layout and copy-footprint query hooks (Part of xcl-dev#480): GetResourceAllocationInfo (xcl-dev#25), GetResourceAllocationInfo2 (console xcl-dev#108 vs PC ID3D12Device8 xcl-dev#68), GetCustomHeapProperties (xcl-dev#26), and GetCopyableFootprints (xcl-dev#38). No runtime files outside crates/xcl/tests/ are modified. Full suite (.\scripts\test.ps1) passed 895 passed, 0 failed, 42 ignored (1 GPU test skipped: heap_window_out_of_memory_falls_back_to_the_switch_form). Part of xcl-dev#480 Assisted-by: Antigravity
A title using a manual work port could submit a container delete, see the operation still pending, and find its save already gone. A terminated queue could report E_ABORT after the same deletion.
Resolve the container path while the caller's inputs are valid, and delete it in the queued work callback. Serialize deletion with blob updates and report the status through XGameSaveDeleteContainerResult. Both delete entry points now apply the same name length checks as container creation.
Three synthetic tests cover manual dispatch with released inputs, queue termination before work runs or before submission, and invalid arguments preserving existing saves. On Windows, 432 library tests and 2 launcher integration tests passed with a single test thread. The library suite reported 16 ignored.