WineHQ
Bug Tracking Database – Bug 24517

 Bugzilla

 

Last modified: 2015-11-22 15:11:17 UTC  

Many DirectX10/11 games need dxgi.dll.CreateDXGIFactory1 (Deus Ex: Human Revolution, Alan Wake, AC III, NFS: Most Wanted, Civ V, ...)

Bug 24517 - Many DirectX10/11 games need dxgi.dll.CreateDXGIFactory1 (Deus Ex: Human Revolution, Alan Wake, AC III, NFS: Most Wanted, Civ V, ...)
Many DirectX10/11 games need dxgi.dll.CreateDXGIFactory1 (Deus Ex: Human Revo...
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: d3d
1.3.3
x86-64 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
http://majorgeeks.com/DirectCompute_B...
: download
: 31699 32269 32901 35031 35080 35095 38968 39651 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2010-09-25 06:59 UTC by John
Modified: 2015-11-22 15:11 UTC (History)
24 users (show)

See Also:
Regression SHA1:
Fixed by SHA1: a13a546573e6af467a151f1f6ab1021237f7cf45
Distribution: ---
Staged patchset:


Attachments
forward CreateDXGIFactory1 to CreateDXGIFactory (884 bytes, patch)
2010-09-27 20:16 UTC, Austin English
Details | Diff
Partial implementation (24.08 KB, patch)
2013-01-22 14:50 UTC, John Yani
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John 2010-09-25 06:59:29 UTC
Running DirectCompute Benchmark 0.25 with native d3d11.dll and d3dx11_42.dll, it crashes with the following error.

wine: Call from 0x7bc4bef0 to unimplemented function dxgi.dll.CreateDXGIFactory1, aborting
Comment 1 Austin English 2010-09-27 20:16:06 UTC
Created attachment 30980 [details]
forward CreateDXGIFactory1 to CreateDXGIFactory

This patch avoids the crash and lets the benchmark run.
Comment 2 Rico 2012-08-10 04:03:16 UTC
I'm not sure that's a d3dx9 bug at all. Also you used a really uncommon way to get it to run. What happens with a clean wine installation? The bug is more about dxgi, which has nearly nothing to do with d3dx9 ... maybe we need a new category.
Comment 3 TestSubject 2012-08-23 10:29:31 UTC
The steam demo for Sleeping Dogs seems to be affected by this too.
Comment 4 Austin English 2012-09-13 16:16:52 UTC
*** Bug 31699 has been marked as a duplicate of this bug. ***
Comment 5 TestSubject 2012-09-15 10:08:28 UTC
The Dxgi patch allows Deus Ex: Human Revolution and Alan Wake to run, both of which ended up crashing as of a couple of wine versions ago. Any chance this patch or something like it will make it into wine anytime soon? I'm just surprised such an old patch would still work.
Comment 6 TestSubject 2012-10-08 04:39:08 UTC
Actually, about Deus Ex HR, it seems that disabling dxgi.dll does as good a job as this patch. Don't yet know about the other games.
Comment 7 André Fettouhi 2012-11-18 13:37:15 UTC
Has anyone tried this patch against the Speeling Dogs game or the demo?
Comment 8 Nikolay Sivov 2012-11-22 03:17:10 UTC
*** Bug 32269 has been marked as a duplicate of this bug. ***
Comment 9 darrrk 2012-12-26 09:47:09 UTC
I think this is major bug, because it's garbage many modern apps and games.
Comment 10 Maxime 2013-01-11 14:51:00 UTC
Affect Assassin's Creed III too :)
Comment 11 olelukoie 2013-01-19 10:02:03 UTC
Civilization V also requires this function when run in DX10/11 mode:

Unhandled exception: unimplemented function dxgi.dll.CreateDXGIFactory1 called in 32-bit code (0x7bc4d190).
...
Backtrace:
=>0 0x7bc4d190 stub_entry_point+0x50(dll="dxgi.dll", name="CreateDXGIFactory1", ret_addr=0x8861a5) [/home/olelukoie/wine/dlls/ntdll/loader.c:197] in ntdll (0x0033fc34)
0x7bc4d190 stub_entry_point+0x50 [/home/olelukoie/wine/dlls/ntdll/loader.c:197] in ntdll: subl	$4,%esp
197	    for (;;) RtlRaiseException( &rec );
Comment 12 John Yani 2013-01-20 11:33:18 UTC
Tried to apply this patch, doesn't help for Asassin's Creed III.
Probably, I missed something?
Comment 13 Andrey Gusev 2013-01-20 13:15:03 UTC
Need for Speed: Most Wanted (2012) also affected.
Comment 14 Maxime 2013-01-20 13:48:13 UTC
(In reply to comment #12)
> Tried to apply this patch, doesn't help for Asassin's Creed III.
> Probably, I missed something?

AC3 is a d3dx11 game. d3d10 is not completly implemented in Wine so you can still wait to play at AC3 with Wine :)
Comment 15 John Yani 2013-01-20 16:08:23 UTC
> AC3 is a d3dx11 game. d3d10 is not completly implemented in Wine so you can
still wait to play at AC3 with Wine :)

Maybe CreateDXGIFactory1 implementation is a good start?

As far as I see it, the proposed patch doesn't implement the function properly: http://msdn.microsoft.com/en-us/library/windows/desktop/ff471318(v=vs.85).aspx

CreateDXGIFactory1 should return IDXGIFactory1 object, which has two additional methods: EnumAdapters1 and IsCurrent
 http://msdn.microsoft.com/en-us/library/windows/desktop/ff471335(v=vs.85).aspx

Probably the game tries to call one of these methods and crashes: http://bugs.winehq.org/attachment.cgi?id=42666
Comment 16 John Yani 2013-01-21 15:35:19 UTC
From WINEDEBUG=+relay I see that the crash occurs almost immediately after dxgi.CreateDXGIFactory1 returns:

006b:Ret  dxgi.CreateDXGIFactory1() retval=80004002 ret=029030c9
006b:Call KERNEL32.GetLastError() ret=00d39259
006b:Ret  KERNEL32.GetLastError() retval=00000000 ret=00d39259
006b:Call KERNEL32.FlsGetValue(00000004) ret=00d39268
006b:Ret  KERNEL32.FlsGetValue() retval=032949a8 ret=00d39268
006b:Call KERNEL32.SetLastError(00000000) ret=00d392c3
006b:Ret  KERNEL32.SetLastError() retval=00000000 ret=00d392c3
006b:Call KERNEL32.UnhandledExceptionFilter(065ee3f8) ret=7bc8f35d
wine: Unhandled page fault on read access to 0x00000000 at address 0x821284 (thread 006b), starting debugger...


It means that the stub implementation is not enough.
Comment 17 John Yani 2013-01-22 14:50:36 UTC
Created attachment 43298 [details]
Partial implementation

Here is a better patch, containing a draft implementation of CreateDXGIFactory1. Still crashing, soon after wined3d.wined3d_incref.
Comment 18 Austin English 2013-02-06 00:40:39 UTC
*** Bug 32901 has been marked as a duplicate of this bug. ***
Comment 19 Jacque 2013-02-12 06:49:19 UTC
Any update on this problem, is it being looked at ?
Comment 20 Jacque 2013-02-12 06:49:53 UTC
How do you run the patches ?
Comment 21 John Yani 2013-02-12 07:34:14 UTC
These patches are mainly stubs. They need much more work.
Comment 22 André Z. 2013-05-23 16:00:58 UTC
(In reply to comment #21)
> These patches are mainly stubs. They need much more work.

Anyway i think it would be great if you could clean it up and send it to wine-patches, i'll be happy to mentor you with it. send me or wine-devel a mail in case you have further questions.
Comment 23 John Yani 2013-05-26 12:49:08 UTC
After some copy-pasting, I end up with a crash on this unimplemented function:

d3d11.dll.D3D11CreateDevice

I don't know whether I should post a separate bug.
Comment 24 John Yani 2013-05-26 12:50:54 UTC
BTW, how to download native d3d11.dll and d3dx11_42.dll?
Comment 25 John Yani 2013-05-27 15:25:05 UTC
Fetched master with D3D11CreateDevice stub.

Turns out that ACIII doesn't verify the return value of D3D11CreateDevice and tries to access the device (which is 0) and crashing.
Comment 26 Maxime 2013-05-27 15:30:57 UTC
(In reply to comment #25)
> Fetched master with D3D11CreateDevice stub.
> 
> Turns out that ACIII doesn't verify the return value of D3D11CreateDevice and
> tries to access the device (which is 0) and crashing.

d3d11 is not implemented so Directx11 games don't run for the moment. Even Directx10 games don't work.
Comment 27 John Yani 2013-05-27 15:32:31 UTC
> d3d11 is not implemented so Directx11 games don't run for the moment. Even
Directx10 games don't work.

Don't repeat yourself
Comment 28 John 2013-05-29 01:50:34 UTC
(In reply to comment #25)
> Fetched master with D3D11CreateDevice stub.
> 
> Turns out that ACIII doesn't verify the return value of D3D11CreateDevice and
> tries to access the device (which is 0) and crashing.

If it is not the CreateDXGIFactory1 function. Create a new bug.
Comment 29 Andrey Gusev 2013-06-19 05:22:50 UTC
Still in 1.6-rc2
Comment 30 John 2013-10-26 23:55:43 UTC
NVIDIA Aliens vs. Triangles Demo

wine: Call from 0x7bc541a0 to unimplemented function dxgi.dll.CreateDXGIFactory1, aborting

http://www.geforce.com/games-applications/pc-applications/aliens-vs-triangles-demo/downloads
Comment 31 Anastasius Focht 2013-11-08 10:10:05 UTC
Hello folks,

confirming, "Perspective 1.0" (puzzle game) also needs this.

Refining summary as it affects many games.

--- snip ---
$ pwd
/home/focht/.wine/drive_c/Program Files/DigiPen/Perspective
...
$ wine ./Perspective.exe 
...
wine: Call from 0x7bc522be to unimplemented function dxgi.dll.CreateDXGIFactory1, aborting
--- snip ---

Download: http://www.seewithperspective.com/

$ sha1sum perspective_setup.exe 
15f244103ef943f9bc1ac2b66a1cb09b4d7b1ae2  perspective_setup.exe

$ du -sh perspective_setup.exe 
98M	perspective_setup.exe

$ wine --version
wine-1.7.5-351-gffcd013

Regards
Comment 32 Bruno Jesus 2013-12-01 13:31:02 UTC
*** Bug 35031 has been marked as a duplicate of this bug. ***
Comment 33 Bruno Jesus 2013-12-08 07:57:05 UTC
*** Bug 35080 has been marked as a duplicate of this bug. ***
Comment 34 Anastasius Focht 2013-12-09 07:04:10 UTC
*** Bug 35095 has been marked as a duplicate of this bug. ***
Comment 35 Andrey Gusev 2014-01-08 07:19:28 UTC
Might be as 'major'?
Comment 37 Anastasius Focht 2014-02-11 14:16:23 UTC
Hello folks,

indeed, fixed by commit http://source.winehq.org/git/wine.git/commitdiff/a13a546573e6af467a151f1f6ab1021237f7cf45

Thanks Henri

Regards
Comment 38 John Yani 2014-02-11 14:41:47 UTC
Actually, it is implemented by a whole bunch of commits:

dxgi: Store IWineDXGIAdapter pointers in the factory.
http://source.winehq.org/git/wine.git/commit/e9f9c15016c4650a00c74916fbcaa5d1c7141d23
dxgi: Implement IDXGIAdapter1.
http://source.winehq.org/git/wine.git/commit/ac84e9b726873687c1efb3a08ea6ed9395a8e920
dxgi: Implement IDXGIFactory1.
http://source.winehq.org/git/wine.git/commit/3d28b01916cf83461ee36325bb555b3f0771e792?f=dlls/dxgi/factory.c
dxgi: Implement CreateDXGIFactory1().
http://source.winehq.org/git/wine.git/commit/a13a546573e6af467a151f1f6ab1021237f7cf45
http://source.winehq.org/git/wine.git/commit/2be432b4df37de6890c66557d36178902f2dd48b
dxgi/tests: Add tests for CreateDXGIFactory().

Additionally:

d3d10core: Implement ID3D10Device1.
http://source.winehq.org/git/wine.git/commit/409c872c996337a85992e44e12e1acce716e291d
d3d10_1: Implement D3D10CreateDevice1().
http://source.winehq.org/git/wine.git/commit/d799eb2d8385456082a3fd72c58f531c4807e52f

Awesome job! Looking forward to D3D11CreateDevice() implementation! And hopefully, we'll be able to play ACIII in a few years.
Comment 39 Maxime 2014-02-11 14:59:53 UTC
(In reply to comment #38)

> Awesome job! Looking forward to D3D11CreateDevice() implementation! And
> hopefully, we'll be able to play ACIII in a few years.

This year will be awesome.
So, i tried these commits with a d3d10 game first gen (understand a game at the beginning of d3d10) => Assassin's Creed

Unfortunatly, it does not work, it crash at launch. But i know that d3d10/d3d10_core and d3d10_1 are not fully implemented.
Comment 40 Andrey Gusev 2014-02-11 16:47:17 UTC
Have this stub in Wine 1.7.12-57-gf4985e4

fixme:dxgi:dxgi_output_GetDesc

So, seems the next one bug 32006.
Comment 41 Alexandre Julliard 2014-02-20 12:36:40 UTC
Closing bugs fixed in 1.7.13.
Comment 42 Nikolay Sivov 2015-07-24 06:54:05 UTC
*** Bug 38968 has been marked as a duplicate of this bug. ***
Comment 43 Nikolay Sivov 2015-11-22 15:11:17 UTC
*** Bug 39651 has been marked as a duplicate of this bug. ***


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers