https://bugs.winehq.org/show_bug.cgi?id=43440
Bug ID: 43440 Summary: Just Cause 2 needs nvcuda.dll.cuD3D10GetDevice Product: Wine Version: 2.13 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: nvcuda Assignee: wine-bugs@winehq.org Reporter: byi5000@gmail.com Distribution: ---
wine: Call from 0x7b43ebe2 to unimplemented function nvcuda.dll.cuD3D10GetDevice, aborting
Just Cause 2 asks for this function. Since you can work around this by disabling the nvcuda dll, i marked it as minor, but it should be fixed one day or at least stubbed.
https://bugs.winehq.org/show_bug.cgi?id=43440
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Product|Wine |Wine-staging CC| |erich.e.hoover@wine-staging | |.com, michael@fds-team.de, | |sebastian@fds-team.de Component|nvcuda |-unknown
--- Comment #1 from Sebastian Lackner sebastian@fds-team.de --- The dll is only available in Wine Staging, so technically this can be seen as a Wine Staging regression. Moving to the Wine Staging product.
https://bugs.winehq.org/show_bug.cgi?id=43440
--- Comment #2 from BieHDC byi5000@gmail.com --- Just Cause 3 asks for nvcuda.dll.cuD3D11GetDevice (dx11). But JC3 doesnt crash on it. Since its basically the same function, i add this here.
https://bugs.winehq.org/show_bug.cgi?id=43440
--- Comment #3 from BieHDC byi5000@gmail.com --- Created attachment 59306 --> https://bugs.winehq.org/attachment.cgi?id=59306 Semi-Stub for cuD3D10GetDevice
Lets Just Cause 2 start, needs testing
https://bugs.winehq.org/show_bug.cgi?id=43440
--- Comment #4 from BieHDC byi5000@gmail.com --- Created attachment 59307 --> https://bugs.winehq.org/attachment.cgi?id=59307 Manual List of changes
I also wrote the changes down by hand. Can someone tell me how to properly do a git --diff against wine with staging patches applied please? Or do i have to make the changes in plain wine and do the diff, but then it will fail, because this patch needs the wine-staging patches for nvcuda.
https://bugs.winehq.org/show_bug.cgi?id=43440
--- Comment #5 from BieHDC byi5000@gmail.com --- edit: reference to the change http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__D3D10.html#group__C...
https://bugs.winehq.org/show_bug.cgi?id=43440
--- Comment #6 from BieHDC byi5000@gmail.com --- Created attachment 59404 --> https://bugs.winehq.org/attachment.cgi?id=59404 Stub for cuD3D10CtxCreate
Followup on this: https://dev.wine-staging.com/patches/201/ I have read you accepted my patch, thanks ;) Michael noted that the game is now crashing if you have Bokeh and/or GPU water simulation due to missing cuD3D10CtxCreate. I first tried to copy the D3D9 behaviour which was unsuccessful, but letting it return pcuGLCtxCreate() (see attachment) fixes the crash. GPU water is not successfully simulated, but at least we have a stub and no crashes :)
Needs testing, works for Just Cause 2
PS: this hint "otherwise we could use cuGLGetDevices" got me to the solution
https://bugs.winehq.org/show_bug.cgi?id=43440
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #7 from Michael Müller michael@fds-team.de --- The patch has been added to Wine Staging. Closing as FIXED.
Implementing the D3D CUDA interop layer correctly in Wine would require a large modification of wined3d. Currently wined3d caches data in the CPU and does not always pass it directly to OpenGL. Modifications of textures or buffers are therefore not immediately visible for the GPU / CUDA. This would lead to all kinds of bugs and the small amount of application using this feature does not justify the required changes, at least in my opinion.
https://bugs.winehq.org/show_bug.cgi?id=43440
--- Comment #8 from BieHDC byi5000@gmail.com --- I see what you mean. I would like to test my crash preventing patch against other Dx10 cuda games, but i don't even know which other games use that. if it doesn't crash other games, then we should at least keep it in mind?
https://bugs.winehq.org/show_bug.cgi?id=43440
--- Comment #9 from BieHDC byi5000@gmail.com --- Ok, here one more point why to include my stub. Look here: https://www.geforce.com/games-applications/technology/cuda
Most of the programs listed there are things nobody really uses anymore. Nascar '14 isn't even in Steam anymore and the other thing you may call Game is a DX11 cuda game. Just Cause 2 is the only game left which is still played and combines DX10 and Cuda. It is very unlikely that this stub causes trouble anywhere else.
https://bugs.winehq.org/show_bug.cgi?id=43440
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Fixed Staging 3.14