Compilled WineD3D issues on Windows

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Svyatpro
Level 2
Level 2
Posts: 12
Joined: Wed Jul 03, 2013 7:34 am

Compilled WineD3D issues on Windows

Post by Svyatpro »

Hello guys!

I tried to compile WineD3D based on Wine 1.6 rc4 for Windows. While compiling it through script provided in this article I stucked in libwine.dll error and got noway to deal with this. But recently I tried to compile them using minigw and it compiled successfully at last.

But when I putted them to real Windows machine to test them I encountered one interesting error, it says that wined3d.dll requires __wine_get_wgl_driver from gdi32.dll, which is not supported in Windows. Is there any way to compile WineD3D to Windows to be fully compatible?

Image

Thanks in advance!
Svyatpro
Level 2
Level 2
Posts: 12
Joined: Wed Jul 03, 2013 7:34 am

Re: Compilled WineD3D issues on Windows

Post by Svyatpro »

I made it! I can share compiled WineD3D based on Wine 1.6 rc4 for Windows if I see here several messages about it.
Svyatpro
Level 2
Level 2
Posts: 12
Joined: Wed Jul 03, 2013 7:34 am

Re: Compilled WineD3D issues on Windows

Post by Svyatpro »

DX9 works almost as well, DX10 is still broken when attempting to run Crysis with DependencyWalker/Debugger it shows:
First chance exception 0xC0000005 (Access Violation) occurred in "D3D10CORE.DLL" at address 0x6E2C4EDD by thread 1 "Main".
First chance exception 0xC0000005 (Access Violation) occurred in "NTDLL.DLL" at address 0x7C9414D3 by thread 1 "Main".

btw ReactOS d3d9.dll works somewhat better imho
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

Re: Compilled WineD3D issues on Windows

Post by lahmbi5678 »

Wine's DX10 is not yet ready for daily use, officially it is not yet supported. Reactos' DX9 is almost the same as wine's, they are using the same code with minor modifications, it's just taken from an older wine version. So maybe there has been some kind of regression. Is wine3d from 1.4.1 working better for you?

If you want to help others with wine3d, provide a howto or a link to your wine3d build at http://wiki.winehq.org/WineD3DOnWindows. As there's already an official site for wine3d, you may contact the maintainer of http://savannah.nongnu.org/projects/wined3d. This project has been dormant for a long time, but a few days ago someone asked for a recent build, and since then the maintainer is providing wined3d for the last stable wine version (1.4.1). I'm not sure why there's no later version of wine3d, but I'd expect, that the wine3d maintainer is waiting for the next stable wine (1.6) to be released.

If you are having difficulties to find the maintainers email address, it should be rmh(at)gnu(dot)org.
Svyatpro
Level 2
Level 2
Posts: 12
Joined: Wed Jul 03, 2013 7:34 am

Re: Compilled WineD3D issues on Windows

Post by Svyatpro »

Okay, thank you I'll try to test different WineD3D versions on Windows in different Games and I will post All my investigation here. Maybe with a link of precompiled WineD3D 1.6 rc4
Svyatpro
Level 2
Level 2
Posts: 12
Joined: Wed Jul 03, 2013 7:34 am

Re: Compilled WineD3D issues on Windows

Post by Svyatpro »

Some more info about my Metro Last Light v1.0.0.4 investigation. I found REAL regression in latest WineD3Ds.

System config:
  • Intel Core i5-3570 @3.4GHz
    4GB RAM
    NVIDIA GeForce GTX480 1536MB (320.49 WinXP Driver)
    Windows Server 2003 SP2 (Hardware acceleraion enabled - all DX9 games works fine)
The method of testing is simple - put Wine's d3d9.dll, wined3d.dll, libwine.dll into game folder.

When using WineD3D 1.1.38 (available at nongnu.org) after running MetroLL.exe, game splashes warning window (D3D: Your NVIDIA video driver needs to be upgraded - system can be unstable (see the attached screenshot below)) and really starts and shows game intro properly and after intro it crashes:
  • DependencyWalker crash log:
    DllMain(0x039F0000, DLL_THREAD_ATTACH, 0x00000000) in "CUDART32_41_22.DLL" returned 1 (0x1) by thread 35.
    LoadLibraryA("OPENGL32") called from "GDI32.DLL" at address 0x77C227EC by thread 28.
    LoadLibraryA("OPENGL32") returned 0x5E8D0000 by thread 28.
    GetProcAddress(0x5E8D0000 [OPENGL32.DLL], "wglSetPixelFormat") called from "GDI32.DLL" at address 0x77C227FF and returned 0x5E8F6B98 by thread 28.
    LoadLibraryA("OPENGL32") called from "GDI32.DLL" at address 0x77C227EC by thread 28.
    LoadLibraryA("OPENGL32") returned 0x5E8D0000 by thread 28.
    GetProcAddress(0x5E8D0000 [OPENGL32.DLL], "wglGetPixelFormat") called from "GDI32.DLL" at address 0x77C227FF and returned 0x5E8F5DE9 by thread 28.
    LoadLibraryA("OPENGL32") called from "GDI32.DLL" at address 0x77C227EC by thread 28.
    LoadLibraryA("OPENGL32") returned 0x5E8D0000 by thread 28.
    GetProcAddress(0x5E8D0000 [OPENGL32.DLL], "wglDescribePixelFormat") called from "GDI32.DLL" at address 0x77C227FF and returned 0x5E8F6559 by thread 28.
    LoadLibraryA("OPENGL32") called from "GDI32.DLL" at address 0x77C227EC by thread 28.
    LoadLibraryA("OPENGL32") returned 0x5E8D0000 by thread 28.
    GetProcAddress(0x5E8D0000 [OPENGL32.DLL], "wglGetPixelFormat") called from "GDI32.DLL" at address 0x77C227FF and returned 0x5E8F5DE9 by thread 28.
    LoadLibraryA("OPENGL32") called from "GDI32.DLL" at address 0x77C227EC by thread 28.
    LoadLibraryA("OPENGL32") returned 0x5E8D0000 by thread 28.
    GetProcAddress(0x5E8D0000 [OPENGL32.DLL], "wglDescribePixelFormat") called from "GDI32.DLL" at address 0x77C227FF and returned 0x5E8F6559 by thread 28.
    LoadLibraryA("OPENGL32") called from "GDI32.DLL" at address 0x77C227EC by thread 28.
    LoadLibraryA("OPENGL32") returned 0x5E8D0000 by thread 28.
    GetProcAddress(0x5E8D0000 [OPENGL32.DLL], "wglGetPixelFormat") called from "GDI32.DLL" at address 0x77C227FF and returned 0x5E8F5DE9 by thread 28.
    HEAP[METROLL.EXE]: Heap block at 29076F18 modified at 29076F2D past requested size of d
    First chance exception 0x80000003 (Breakpoint) occurred in "NTDLL.DLL" at address 0x7C92A229 by thread 28.
    HEAP[METROLL.EXE]: Invalid Address specified to RtlFreeHeap( 00150000, 29076F20 )
    First chance exception 0x80000003 (Breakpoint) occurred in "NTDLL.DLL" at address 0x7C92A229 by thread 28.
    First chance exception 0xC0000005 (Access Violation) occurred in "METROLL.EXE" at address 0x0096E217 by thread 1.
    Second chance exception 0xC0000005 (Access Violation) occurred in "METROLL.EXE" at address 0x0096E217 by thread 1.

But when using WineD3D 1.4.1 (recently available at nongnu.org), game tries to start, creates black application window and crashes:
  • DependencyWalker crash log:
    LoadLibraryA("OPENGL32") called from "GDI32.DLL" at address 0x77C227EC by thread 23.
    LoadLibraryA("OPENGL32") returned 0x5E8D0000 by thread 23.
    GetProcAddress(0x5E8D0000 [OPENGL32.DLL], "wglGetPixelFormat") called from "GDI32.DLL" at address 0x77C227FF and returned 0x5E8F5DE9 by thread 23.
    LoadLibraryA("OPENGL32") called from "GDI32.DLL" at address 0x77C227EC by thread 23.
    LoadLibraryA("OPENGL32") returned 0x5E8D0000 by thread 23.
    GetProcAddress(0x5E8D0000 [OPENGL32.DLL], "wglDescribePixelFormat") called from "GDI32.DLL" at address 0x77C227FF and returned 0x5E8F6559 by thread 23.
    First chance exception 0xC0000005 (Access Violation) occurred in "WINED3D.DLL" at address 0x62B64ECA by thread 23.
    Second chance exception 0xC0000005 (Access Violation) occurred in "WINED3D.DLL" at address 0x62B64ECA by thread 23.

Using WineD3D 1.6 rc4 (compiled myself), game tries to start, creates black application window and crashes:
  • DependencyWalker crash log:
    LoadLibraryA("OPENGL32") called from "GDI32.DLL" at address 0x77C227EC by thread 23.
    LoadLibraryA("OPENGL32") returned 0x5E8D0000 by thread 23.
    GetProcAddress(0x5E8D0000 [OPENGL32.DLL], "wglGetPixelFormat") called from "GDI32.DLL" at address 0x77C227FF and returned 0x5E8F5DE9 by thread 23.
    LoadLibraryA("OPENGL32") called from "GDI32.DLL" at address 0x77C227EC by thread 23.
    LoadLibraryA("OPENGL32") returned 0x5E8D0000 by thread 23.
    GetProcAddress(0x5E8D0000 [OPENGL32.DLL], "wglDescribePixelFormat") called from "GDI32.DLL" at address 0x77C227FF and returned 0x5E8F6559 by thread 23.
    First chance exception 0xC0000005 (Access Violation) occurred in "WINED3D.DLL" at address 0x63E64B6B by thread 23.
    Second chance exception 0xC0000005 (Access Violation) occurred in "WINED3D.DLL" at address 0x63E64B6B by thread 23.
And when using ReactOS D3D (latest svn version 42.4.0.0 presumably based on Wine 1.5.3), game tries to start, creates black application window and crashes:
  • DependencyWalker crash log:
    LoadLibraryA("OPENGL32") called from "GDI32.DLL" at address 0x77C227EC by thread 23.
    LoadLibraryA("OPENGL32") returned 0x5E8D0000 by thread 23.
    GetProcAddress(0x5E8D0000 [OPENGL32.DLL], "wglGetPixelFormat") called from "GDI32.DLL" at address 0x77C227FF and returned 0x5E8F5DE9 by thread 23.
    LoadLibraryA("OPENGL32") called from "GDI32.DLL" at address 0x77C227EC by thread 23.
    LoadLibraryA("OPENGL32") returned 0x5E8D0000 by thread 23.
    GetProcAddress(0x5E8D0000 [OPENGL32.DLL], "wglDescribePixelFormat") called from "GDI32.DLL" at address 0x77C227FF and returned 0x5E8F6559 by thread 23.
    err:d3d:context_create wglShareLists(00020000, 00010001) failed, last error 0xaa.
    err:d3d:swapchain_create_context Failed to create a new context for the swapchain
    First chance exception 0xC0000005 (Access Violation) occurred in "WINED3D.DLL" at address 0x7097F724 by thread 23.
    Second chance exception 0xC0000005 (Access Violation) occurred in "WINED3D.DLL" at address 0x7097F724 by thread 23.
Attachments
WineD3D1.1.38_metroLL.gif
Svyatpro
Level 2
Level 2
Posts: 12
Joined: Wed Jul 03, 2013 7:34 am

Re: Compilled WineD3D issues on Windows

Post by Svyatpro »

Searching over the internet I found that people are able to run games like Metro Last Light on Linux and Wine without much problems, therefore I concluded that the regression is in compiled WineD3D for Windows only. And this is no wonder, cuz since I first compiled WineD3D incorrectly without "-DUSE_WIN32_OPENGL" flag the wined3d.dll was more than six megabytes size, but with this -DUSE_WIN32_OPENGL flag wined3d.dll is only ~1.3MB and almost all my DependecyWalker logs shows wined3d.dll Access violation exceptions. And I think this regression is only for new implemented WineD3D functions, because older games such as Hitman: Blood Money are able to run on precompiled WineD3D 1.6 rc4 for Windows and other versions including 1.4.1.

I share different WineD3D builds to others, maybe somebody will test and approve this regressions.
Everything you need to make tests is just to put d3d9.dll, wined3d.dll, libwine.dll into game's folder (ReactOS D3D has no libwine.dll).

Different WineD3D libraries precompilled for Windows
James_Huk
Level 2
Level 2
Posts: 45
Joined: Tue Feb 23, 2010 4:59 pm

Re: Compilled WineD3D issues on Windows

Post by James_Huk »

@Svyatpro:

Could You please upload ddraw.dll for wine 1.6-rc4? It is missing, and without it, I am unable to run D3D7 apps.

Thanks in advance.
Svyatpro
Level 2
Level 2
Posts: 12
Joined: Wed Jul 03, 2013 7:34 am

Re: Compilled WineD3D issues on Windows

Post by Svyatpro »

Some updates to this thread:

The last not crashing WineD3D version is 1.3.30, while intro in Metro Last Light, all newer versions crashes immediately before the intro, but 1.3.30 does not show intro video instead it shows black screen and playing sound and after intro it stops responding. Starting from WineD3D 1.3.31 and later, Metro Last Light crashes immediately before intro.

The link for WineD3D 1.3.30, WineD3D 1.3.31 and WineD3D 1.6 rc4 including ddraw.dll:
http://www.mediafire.com/?9qpn1dncappn9z0
lahmbi5678
Level 7
Level 7
Posts: 823
Joined: Thu Aug 27, 2009 6:23 am

Re: Compilled WineD3D issues on Windows

Post by lahmbi5678 »

Hi Svyatpro,

you probably should file a bug in wine's bugzilla. Wined3d on Windows doesn't have a high priority for the wine project, so I wouldn't expect too much, but maybe you are lucky, and a wine dev will pick up your bug report.

@James_Huk, I didn't try it myself, but the wiki page for wined3d mentions that ddraw and DX7 wouldn't work under windows at the moment.
Svyatpro
Level 2
Level 2
Posts: 12
Joined: Wed Jul 03, 2013 7:34 am

Re: Compilled WineD3D issues on Windows

Post by Svyatpro »

Here is the link for a lot of precompiled WineD3D's which I was using for testing the regression:
http://www.mediafire.com/?v1m8m2vhr3gqr5e


WineD3D 1.3.6_last_with_proper_intro - last WineD3D version where we can see proper intro movie after Metro Last Light launch

WineD3D 1.3.22_black_intro_last_working_after_intro - last WineD3D version where we intro is black but after intro we can continue running game for some seconds but after it crashes

WineD3D 1.3.30_black_intro_last_without_immediate_crash - last WineD3D version where game starts with black intro but after intro game crashes

All newer versions than 1.3.30 are absolutely broken for Metro Last Light!
Locked