DirectStorage: a new status array's slots start complete with S_OK #1215
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1224"
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 emirduran707 on 2026-11-24T13:23:21Z.
A new DirectStorage status array started every slot as
E_PENDING, soIsComplete(i)was false for a slot that was never enqueued. A title that keeps a ring of status slots, and waits forIsCompletebefore reusing a slot (its first use included), spins there forever.Microsoft's Win32 implementation of the console DirectStorage API in Xbox-GDK-Samples (
Samples/System/SimpleDirectStorageCombo/DirectStorageWin32/) starts them complete:DirectStorageWin32WrapperStatusArray.cpphasm_completeFlags.resize(capacity, true); m_resultCodes.resize(capacity, HRESULT_FROM_WIN32(S_OK));. Its header says a status entry can be enqueued again onceIsComplete()returns true.factory_create_status_arraynow starts every slot atS_OK. Enqueuing a status still sets its slot toE_PENDING, so nothing changes after an enqueue. One side effect:EnqueueStatuson a closed queue leaves the slot as it was, which is now complete where before it stayed pending forever.What is in it
crates/xcl/src/hle/dstorage.rs: the initial value; testa_new_status_array_slot_is_complete.Tested
cargo test --workspace -- --test-threads=4on5bd7cd8: 742 passed, 0 failed, 41 ignored; no SKIPPED GPU testsassertion failed: status_is_complete(s, 3); with itcargo test -p xcl --lib dstoragepasses (15 passed)Regression run
main:
this PR:
Not tested
AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by dcastell1 on 2026-11-24T13:28:28Z.
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on
main@47efa2e(baseline 741 passed, 0 failed, 41 ignored on this box):One more than the baseline; a new status array's slots starting complete is covered and green.
Tree restored afterwards (full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-24T13:39:01Z.
Independent DirectStorage slot-reuse check on
5bd7cd8, Windows 11 build 26300, Rust 1.99.1 MSVC, debug.Both fresh slots reported complete with
S_OK. On slot 0, a mismatched copy size moved the slot throughE_PENDINGtoE_DESTINATION_SIZE. Reusing that slot for a valid copy moved it throughE_PENDINGtoS_OKand copied exactly the four requested bytes. Slot 1 stayed complete withS_OK. Restoring only the old initializer reproduced the first-use failure: both fresh slots reportedE_PENDING.All 16 focused DirectStorage tests passed at the PR head, including the additional synthetic fixture. No retail run. AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the scratch fixture and drafted this report.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:47:16Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:Note: the full
d3d12xlib filter currently aborts with 0xc0000005 on unmodifiedmaintoo (pre-existing, unrelated to this PR); the PR's own tests were run by name and pass.upstream-sync referenced this pull request2026-11-25 06:04:27 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T04:05:36Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin