iXit / wine-nine-standalone

Build Gallium Nine support on top of an existing WINE installation
GNU Lesser General Public License v2.1
278 stars 23 forks source link

Vietcong crash #42

Open sonicpp opened 5 years ago

sonicpp commented 5 years ago

Vietcong (AppDB) video game is using D3D8, but community tool called VCStarter converts D3D8 calls to D3D9, so it is usable with Gallium Nine (this tool is not applicable on demo versions, unfortunately).

This game runs quite well with Gallium Nine, except it crashes in certain situations, like when player is looking at handmap. Also fire is not rendered at all. Very similar issue was (almost the same I would say) was in WineD3D (bug #46849), but Gallium Nine is suffering by this issues even on Wine versions which are not affected by this bug (like Wine 4.9 or Wine <= 4.1). Note that there were similar bugs in WineD3D before, like #46359 and #46403.

System info:

$ lspci | grep Display
01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Opal XT [Radeon R7 M265/M365X/M465]
$ DRI_PRIME=1 glxinfo | grep string
server glx vendor string: SGI
server glx version string: 1.4
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
OpenGL vendor string: X.Org
OpenGL renderer string: AMD OLAND (DRM 2.50.0, 5.1.4-arch1-1-ARCH, LLVM 8.0.0)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.0.5
OpenGL core profile shading language version string: 4.50
OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.0.5
OpenGL shading language version string: 4.50
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
$ wine --version
wine-4.9
$ uname -a
Linux antergos 5.1.4-arch1-1-ARCH #1 SMP PREEMPT Wed May 22 08:06:56 UTC 2019 x86_64 GNU/Linux
axeldavy commented 5 years ago

The bug seems to revolve around ProcessVertices. Wine and nine support different features of ProcessVertices. It's highly likely we don't support the d3d8 parts, while wine does, which explains the lack of fire. While the crash could be solved quickly I hope, ProcessVertices is harder, in particular because the lack of test cases. Could you take a trace under wined3d ? https://github.com/iXit/wine-nine-standalone/wiki/apitrace

sonicpp commented 5 years ago

Here is the trace: https://drive.google.com/open?id=17GaVVlCuXUYNSzPyzdi6Pctmbq5DUYw4

The fire around helicopter is not visible with GalliumNine. Also when I switch weapon to handmap, the game crashes with GalliumNine.

dhewg commented 5 years ago

@orbea had some success with https://github.com/crosire/d3d8to9, maybe that works better?

sonicpp commented 5 years ago

Looks interesting, thanks for info. VCStarter does more than just coverting D3D8 to D3D9 tho. It fixes also some crash places. Although I know how to fix them (see appdb for details), I have to manually patch Wine-staging to get it work. Not a lot of work, but I need time and mood for it :)