[Bug 60408] New: mfplat: MFCreateDXGISurfaceBuffer fails silently for DXGI_FORMAT_R8_UINT textures, so UE4 ElectraPlayer shows no video
http://bugs.winehq.org/show_bug.cgi?id=60408 Bug ID: 60408 Summary: mfplat: MFCreateDXGISurfaceBuffer fails silently for DXGI_FORMAT_R8_UINT textures, so UE4 ElectraPlayer shows no video Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: mfplat Assignee: wine-bugs@list.winehq.org Reporter: ndqh12679@gmail.com Target Milestone: --- Distribution: --- == Summary == `create_dxgi_surface_buffer()` (dlls/mfplat/buffer.c) maps the texture format with `MFMapDXGIFormatToDX9Format()`. For `DXGI_FORMAT_R8_UINT` (62) that returns 0, so `mf_format_get_stride()` fails and the function returns `MF_E_INVALIDMEDIATYPE`. It logs nothing on this path. Unreal Engine 4.26's ElectraPlayer wraps an `R8_UINT` texture that holds NV12 data as its decoder output buffer, so it gives up before submitting a single frame. The video stays black while the game's separately mixed audio plays. `DXGI_FORMAT_R8_UNORM` (61) maps to `D3DFMT_L8` (50) and works. The two formats have identical memory layouts. == Affected == - Game: Wuthering Waves (Steam 3513350), v3.7, UE 4.26.2, D3D11 mode (`-dx11`). The ultimate of the new 3.7 character Hsin plays H.264 overlay videos (1920x2160 and 3840x2160) through ElectraPlayer. - Reproduced on: - GE-Proton11-7 (wine-staging 11.0; H.264 MFT from winedmo/FFmpeg) - Proton-CachyOS cachyos-11.0-20260703 (H.264 MFT from winegstreamer) Both fail at the same step, so it isn't decoder-backend specific. - System: Nobara 44, kernel 7.2.6, NVIDIA RTX 5060 Ti, driver 595.99.02, DXVK. - Also running: 3DMigoto (WWMI) was injected. Toggling its mods off made no difference, and the failure is fully explained by the mfplat path below. I have not tested without the injection. == Symptom == Story cutscenes play normally; they use the game's bundled FFmpeg player. The ultimate's video is black with audio. == Trace (`WINEDEBUG=+mfplat`, GE-Proton11-7, before the workaround) == ``` h264_decoder_create_aggregated ... Created h264 transform 000000016FF16CA8. mediatype_SetUINT64 00000001A5EBDD00, MF_MT_FRAME_SIZE, 78000000870. <- 1920x2160 transform_SetInputType iface 000000016FF16CA8, id 0, type 00000001A5EBDD00, flags 0. transform_SetOutputType iface 000000016FF16CA8, id 0, type 00000001A5EBDD88, flags 0. <- NV12 transform_ProcessMessage ... message 0x10000000 / 0x10000003 / 0x10000002 / 0x1 MFCreateDXGISurfaceBuffer {6f15aaf2-d208-4e89-9ab4-489535d34f9c}, 00000001D6C43280, 0, 0, 00000001FC03FBE8. create_dxgi_surface_buffer format 0x3e, 1920 x 3240. <- R8_UINT, NV12-sized transform_GetOutputStreamInfo iface 000000016FF16CA8, id 0, info 0000000181B9EB00. MFCreateSample ... / MFCreateMemoryBuffer 5487, ... <- first input frame built MFCreateDXGISurfaceBuffer {6f15aaf2-...}, 00000001D6C43280, 0, 0, ... create_dxgi_surface_buffer format 0x3e, 1920 x 3240. transform_GetOutputStreamInfo ... sample_Release 000000014E1996F0, refcount 0. unknown_Release iface 000000016FF16CA0 decreasing refcount to 0. <- teardown ``` - The DXGI buffer is never used after creation. - Zero `ProcessInput` / `ProcessOutput` calls. - No `warn`/`err` from mfplat. - The 3840x2160 video fails the same way (`format 0x3e, 3840 x 3240`). - Electra never sends `MFT_MESSAGE_SET_D3D_MANAGER`. == Confirmation == In GE-Proton11-7's `x86_64-windows/mfplat.dll`, `MFMapDXGIFormatToDX9Format` is a lookup table indexed by `format - 2`. The `R8_UINT` entry is 0; the `R8_UNORM` entry is 50. Patching only the `R8_UINT` entry to 50 fixes playback. With the same trace channels: - 89 `ProcessInput` / 272 `ProcessOutput` calls across two decoder sessions - no mfplat errors - the video renders in game == Suggested fix == Accept 8-bit single-channel integer and typeless formats in `create_dxgi_surface_buffer()` (`R8_UINT`, and probably `R8_TYPELESS`), sizing them like `L8`. Also add a `WARN()` on the `MF_E_INVALIDMEDIATYPE` return. I haven't checked what native `MFMapDXGIFormatToDX9Format()` returns for `R8_UINT`. If it also returns 0, the fix belongs in `create_dxgi_surface_buffer()` rather than in the mapping table. Native `MFCreateDXGISurfaceBuffer` evidently accepts these textures, because the game works on Windows. == Related reports (none found for this exact failure) == I found no existing report of this failure. I searched the Wine, Valve Proton, GE-Proton and Proton-CachyOS trackers, plus general searches, on 2026-09-30, the same day the WuWa 3.7 update shipped. - Not a duplicate of GloriousEggroll/proton-ge-custom#599. That issue was pre-rendered videos that don't loop or replay (fixed via protonfixes, 2026-06-29). It fails *after* a first playback; this fails *before* the first frame. - Different root cause from gamesir-labs/gamehub-for-mac#45 (Ninja Gaiden 4 on D3DMetal). That one is caused by D3DMetal lacking NV12, and was worked around by making `MFCreateDXGIDeviceManager` fail. - Unfixed in the other forks I checked. The `mfplat.dll` in dwproton 10.0-18 / 11.0-6, Proton-CachyOS 10.0 / 11.0 and GE-Proton10-34 / 11-6 all map `DXGI_FORMAT_R8_UINT` to 0. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60408 --- Comment #1 from Nikolay Sivov <bunglehead@gmail.com> --- Let's see if this helps https://gitlab.winehq.org/wine/wine/-/merge_requests/12212 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60408 Nello De Gregoris <bluechxindv@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bluechxindv@gmail.com --- Comment #2 from Nello De Gregoris <bluechxindv@gmail.com> --- I was looking into this issue as well and made a Proton build with the patches, Hsin's cutscene now plays without issues. Thanks a lot for the fix! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60408 --- Comment #3 from Nikolay Sivov <bunglehead@gmail.com> --- This is merged now. Could someone retest please? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60408 --- Comment #4 from Nello De Gregoris <bluechxindv@gmail.com> --- Can confirm the video plays fine on latest master. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60408 Nikolay Sivov <bunglehead@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |3852ace0a020499e96ec865c09f | |caade789cb577 Resolution|--- |FIXED --- Comment #5 from Nikolay Sivov <bunglehead@gmail.com> --- Marking fixed, 3852ace0a020499e96ec865c09fcaade789cb577. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=60408 Alexandre Julliard <julliard@winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard@winehq.org> --- Closing bugs fixed in 11.20. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla