DirectStorage: the error record keeps the request's offset, size and tag #1214
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1223"
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:14Z.
The record
RetrieveErrorRecordreturns for the first failed request leftFileOffset(0x230),SourceSize(0x240) andCancellationTag(0x248) at zero. A title that uses the tag or the offset to find which of its requests failed got 0.The layout comes from Microsoft's Win32 implementation of the console DirectStorage API in Xbox-GDK-Samples (
Samples/System/SimpleDirectStorageCombo/DirectStorageWin32/, which uses the same interface IDs as XCL). Itsdstorage_win32.hdeclares, afterWCHAR Filename[MAX_PATH]:UINT64 FileOffset; void* Source; UINT32 SourceSize; UINT64 CancellationTag; CHAR Name[...]. ItsMarkRequestErrorcopies them from the failed request. XCL's existing offsets (0x10, 0x18, 0x20, 0x24, 0x238, record size 0x290) fit the same layout.queue_retrieve_error_recordnow also writes the request's file offset (file requests only), source size and cancellation tag. The name (0x250) is not filled: XCL's request does not keep the name pointer.What is in it
crates/xcl/src/hle/dstorage.rs: the three fields; testerror_record_has_the_failed_requests_offset_source_size_and_tag(16 bytes at 0x100 of an 8-byte file, tag 0xABCD, on a file queue).Tested
cargo test --workspace -- --test-threads=4on2e17d3d: 742 passed, 0 failed, 41 ignored; no SKIPPED GPU testsFileOffsetleft: 0,right: 256; 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 thehollowedone on 2026-11-24T13:26:11Z.
Independent mixed-queue check on
2e17d3d, Windows 11 build 26300, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, debug.I queued one valid read and two reads past the end of an eight-byte synthetic file, after canceling another queued read by its tag. The valid read copied the expected bytes and the canceled request left its destination untouched. The first record counted two failures and returned the first surviving request’s offset
0x100, size 5 and full 64-bit tag0x1701234567. A second retrieval cleared the fields. A new batch then reported only its own failure at0x200, size 7 and tag0x29ABCDEF01.cargo test --offline --locked -p xcl --lib hle::dstorage::tests -- --test-threads=1passed 16/16 with the scratch fixture. Removing only the three field writes made the same fixture fail with the failure count still correct and all three metadata fields zero. Synthetic file queues only.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:18Z.
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 04:08:41 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T04:05:35Z.
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