Repository navigation
HLE: implement mfplat.dll!MFResetDXGIDeviceManagerX with system fallback - #22
Merged
Merged
Conversation
This was referenced Nov 21, 2026
Collaborator
|
Reviewed and merged, thanks. It conflicted with #20 in |
rootw0rm
pushed a commit
to rootw0rm/xcl
that referenced
this pull request
Nov 27, 2026
…wports/scissors/topo) into ListDrawRecord List slots xcl-dev#34 (SetGraphicsRootSignature), xcl-dev#50 (OMSetRenderTargets), xcl-dev#47 (IASetIndexBuffer), plus PC-side xcl-dev#20/xcl-dev#21/xcl-dev#22 (topology, viewports, scissors) store into ListDrawRecord. SetPipelineState (xcl-dev#25) now merges instead of overwriting so PSO-first or state-first order both keep the full record. Store-only: no draw, no validation, no execute; triangle/ bias FAILs stay failing. Evidence: new draw_s2_list_state_recorded_pre_draw fails pre-change (S2 symbols absent at HEAD: grep count 0) and passes post; full lib 806 passed, 0 failed, 1 ignored; both cargo checks clean; title null 4 FAILs identical to HEAD-baseline worktree run (triangle, present, bias-xcl-dev#94, all D3D12.X GPU-only, + pre-existing files:delete also on HEAD), delta 0; Vulkan 3 (triangle, bias-xcl-dev#94 + same files:delete); retail HOLDS (exit 139 @ exe+0x2237320, SIGSEGV fault 0, 20 stubs, xgr XAsync/XNetworking/XUser, 0 d3d12).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the Xbox GDK Media Foundation helper
mfplat.dll!MFResetDXGIDeviceManagerXwith transparent system fallback for all standard Media Foundation exports.Changes
crates/xcl/src/hle/mfplat.rs:MFResetDXGIDeviceManagerX(pDeviceManager, pDevice, resetToken) -> HRESULTusing the typedwindows::Win32::Media::MediaFoundation::IMFDXGIDeviceManagerCOM interface (borrowing caller-owned pointers withManuallyDrop).E_POINTER) and attemptsIMFDXGIDeviceManager::ResetDevicedirectly first (which succeeds natively forID3D12Deviceon Windows 11 and preservesE_INVALIDARGfor invalid reset tokens).ResetDevicefails for anID3D12Device, creates a companion D3D11 device (dynamically loaded fromd3d11.dll) on the matching adapter LUID withVIDEO_SUPPORT | BGRA_SUPPORTandID3D10Multithread::SetMultithreadProtected(TRUE), then passes it toResetDevicewith the caller'sresetToken.LoadLibrary+GetProcAddress, null pointer handling, invalid token rejection, realID3D12Devicereset +OpenDeviceHandle/TestDevice/CloseDeviceHandle, and the companion D3D11 bridge path.crates/xcl/src/hle/mod.rs:MFPLAT(mfplat.dll) with system fallback&[mfplat.dll](aliases_are_system() == false), so standard exports (MFStartup,MFCreateDXGIDeviceManager,MFCreateMediaType, etc.) resolve to Windows'mfplat.dllwhileMFResetDXGIDeviceManagerXresolves to XCL's HLE export andhle::opusdynamic loading remains unchanged.tests/testtitle/src/gpu.rs&tests/testtitle/src/main.rs:MFStartup,MFCreateDXGIDeviceManager,MFShutdown, andMFResetDXGIDeviceManagerXfrommfplat.dllagainst the consoled3d12_xsdevice.Verification
cargo build --workspace: 0 new warningscargo test --workspace -- --test-threads=4: all tests passed (243 lib unit tests, 12console_dlls_e2e, 1console_shaders, 1e2eincluding the newtesttitlecheck, 6gpu_pso_e2e, 3xg_oracle).