HLE: stub DirectStorage queue GetErrorEvent and RetrieveErrorRecord #2288
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2290"
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 Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T10:01:22Z.
Summary
Wires minimal stubs for DirectStorage queue vtable slots
0x48(GetErrorEvent) and0x50(RetrieveErrorRecord) incrates/victory-hle/src/modules/dstorage.rs:0x48(get_error_event): logs once atdebuglevel and returns a null handle (0) instead of hittingmissing::<9>(E_NOTIMPLcast to a handle).0x50(retrieve_error_record): writes a zeroed 16-byte record header (failure_count = 0,hresult = S_OK,command_type = COMMAND_NONE/-1) when passed a non-null pointer; withfailure_count == 0andcommand_type == COMMAND_NONE, the trailing union payload is inactive so no request-specific union layout is needed.Verification
cargo test -p victory-hle --lib modules::dstorage(error_slots_return_null_event_and_empty_record)cargo clippy -p victory-hle --all-targets -- -D warningscargo xtask policyImported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T10:19:09Z.
Review: COMMENTED
HLE DirectStorage: queue GetErrorEvent/ResetEvent via real event handles (CreateEventW/DuplicateHandle), file open cleanup. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1. 485 lines of Windows threading/event plumbing; needs on-hardware validation.
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-25T11:40:35Z.
Independent local verification (Windows, Rust 1.100.0/MSVC, head
58860ab, no game data):cargo test --locked -p victory-hle --lib modules::dstorage -- --test-threads=1-> 18 tests passed, 0 failed, 129 filtered, exit 0; one pre-existingtry_updatedeprecation warning.940d32f): same command -> 14 tests passed, 129 filtered, exit 0. The four extra tests are the new DirectStorage error-path coverage:error_record_layout_matches_gdk_abi,error_event_returns_unsignaled_event_and_closes_on_release,failed_request_signals_error_event_and_populates_error_record,retrieve_error_record_clears_exact_struct_and_tolerates_null.I did not run this against a real title or a different Windows build, and I did not independently verify the 656-byte ABI offsets beyond the committed layout test. AI-assisted (Hy4 flash). GPU/driver: N/A (CPU-only unit tests). No game data, assets or extracted content used.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T13:32:13Z.
Automated triage for the maintainers.
Needs work. Thanks for trimming this down. The rebased version is small and readable, and CI (
check) passes. What blocks it now is the evidence and the trade-off, not the code.0x48and0x50.QUEUE_VTABLE's comment says the same: only 0x18/0x20/0x30/0x40 are called. So the PR changes runtime behaviour for calls that have not been observed.xgameruntime::missing, which logswarn!("runtime method not implemented")with the slot on every call. That warning is how a first call from the title would be noticed. The stub swaps it for a one-timedebug!and returns a null handle, so a caller that waits on the event would getWAIT_FAILEDsilently.EmptyErrorRecord: count, pad, HRESULT, command kind −1) comes from the Windows DirectStorage documentation. Nothing shows that the console runtime's record matches it.What would change the verdict: a title call site that reaches 0x48 or 0x50, with the behaviour it expects (for example how it uses the event handle). If you cannot show one yet, consider keeping
missing's warning on these slots.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T13:43:45Z.
Updated to
09e3bbb3to address the review points:COMMAND_NONE,COMMAND_REQUEST,ERROR_PATH_LEN,ERROR_NAME_LEN), structs (ErrorRecord,FirstFailure,FailureParams,FailedRequest,FailedStatus,FailedSignal), comments, and layout test (error_record_field_offsets) incrates/victory-hle/src/modules/dstorage.rs, and updated the PR description accordingly.IDStorageQueueon Microsoft Learn /Microsoft.Direct3D.DirectStorage), whereGetErrorEventandRetrieveErrorRecordfollowClose(0x40->0x48,0x50),GetErrorEventreturns an event signaled on the first failure since the previous retrieval, andRetrieveErrorRecordfills the 656-byte (0x290) record (u32failure count + 4-byte alignment pad +0x288first-failure union withHRESULT, command kind-1/0, 260-u16path, and 64-byte request name).0x18,0x20,0x30, and0x40have been seen on the happy path;0x48and0x50were not observed called during normal startup/loading and are only wired so error-handling callers do not receiveE_NOTIMPLcast toHANDLEor an uninitialized record.[PR #2290] HLE: implement DirectStorage queue GetErrorEvent and RetrieveErrorRecordto [PR #2290] HLE: stub DirectStorage queue GetErrorEvent and RetrieveErrorRecordImported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T15:55:57Z.
Rebased onto
da82e444and trimmed toc4213559(+77/-9lines) following the triage suggestion:File::filename,Lanefailure tracking,DuplicateHandle/CreateEventW, and theFailedRequestunion layout.0x48(get_error_event) now returns null (0) with a one-timedebug!log.0x50(retrieve_error_record) writes only the 16-byte header (failure_count = 0,hresult = S_OK,command_type = COMMAND_NONE), leaving any union storage untouched.Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T17:20:26Z.
Closing this PR: as noted in triage, no title currently hits DirectStorage queue slots
0x48/0x50and replacing themissingwarning with a quiet null-event stub could mask a future first call. Happy to revisit once a title calls them.Pull request closed