[Bug 59634] New: WPF applications render black windows - GdiEntry13 returns 0 instead of IDirect3D9
http://bugs.winehq.org/show_bug.cgi?id=59634 Bug ID: 59634 Summary: WPF applications render black windows - GdiEntry13 returns 0 instead of IDirect3D9 Product: Wine Version: 11.6 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdi32 Assignee: wine-bugs@list.winehq.org Reporter: wehrwolfmann@gmail.com Distribution: --- Created attachment 80718 --> http://bugs.winehq.org/attachment.cgi?id=80718 Proposed fix patch WPF applications (e.g. Razer Central, Razer Axon) show black or empty windows when running under Wine. The WPF rendering pipeline fails to initialize. Root cause: WPF's wpfgfx_v0400.dll calls GetProcAddress(gdi32, "GdiEntry13") to obtain an IDirect3D9 object. On Windows, GdiEntry13 internally calls Direct3DCreate9(D3D_SDK_VERSION) and returns the IDirect3D9 pointer. In Wine, GdiEntry13 is mapped to DdQueryDisplaySettingsUniqueness which is a stub returning 0. WPF receives NULL instead of a valid IDirect3D9 pointer and fails to initialize its D3D9-based rendering pipeline. Steps to reproduce: 1. Install any WPF application (e.g. Razer Central) 2. Run the application under Wine 3. The window appears but content is entirely black Evidence from wpfgfx_v0400.dll (strings output): - Contains "GdiEntry13" string (loaded via GetProcAddress) - Contains "Direct3DCreate9" and "Direct3DCreate9Ex" as fallbacks Fix: Implement GdiEntry13 to dynamically load d3d9.dll and call Direct3DCreate9(32). Patch sent to wine-devel. -- 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=59634 Esme Povirk <madewokherd@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd@gmail.com --- Comment #1 from Esme Povirk <madewokherd@gmail.com> --- The WPF source code disagrees, it has GdiEntry13 returning ULONG: https://gitlab.winehq.org/mono/wpf/-/blob/wine-mono/src/Microsoft.DotNet.Wpf... -- 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=59634 --- Comment #2 from Wehrwolfmann <wehrwolfmann@gmail.com> --- You're right, I apologize for the incorrect analysis. Looking at the WPF source code, GdiEntry13 is indeed used as DdQueryDisplaySettingsUniqueness returning ULONG, not as Direct3DCreate9. However, the stub returning 0 may still be problematic - WPF uses this value to track display changes. I will investigate further what actually causes the black window and whether returning a proper uniqueness value fixes it. Withdrawing the current patch. Will submit a corrected one after further investigation. -- 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=59634 Wehrwolfmann <wehrwolfmann@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #3 from Wehrwolfmann <wehrwolfmann@gmail.com> --- After further investigation, Esme is correct - GdiEntry13 is used solely as DdQueryDisplaySettingsUniqueness (returning ULONG), not as Direct3DCreate9. I confirmed that WPF rendering works correctly WITHOUT the proposed patch. The initial black window was likely caused by first-run initialization, not by GdiEntry13 returning 0. The WPF source (d3dloader.cpp) shows that D3D9 is loaded independently via LoadLibrary("d3d9.dll") + GetProcAddress("Direct3DCreate9"), and GdiEntry13 is only used for display change tracking. Closing this bug as INVALID. Apologies for the noise. -- 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