iXit / Mesa-3D

Please use official https://gitlab.freedesktop.org/mesa/mesa/ !
https://github.com/iXit/Mesa-3D/wiki
66 stars 13 forks source link

Vampire: The Masquerade - Bloodlines fails to display menu/game #101

Open jstraarup opened 9 years ago

jstraarup commented 9 years ago

Intro video shows, but image hangs when going to menu. Menu music plays in background, mouse/keyboard works, game loads/plays through blind navigation. Without Nine, it works.

WINEDEBUG=d3d9 WINEPREFIX=/games/bloodlines WINEARCH=win32 wine vampire.exe

fixme:winediag:start_process Wine Staging is a testing version containing experimental patches. fixme:winediag:start_process Please report bugs at http://bugs.wine-staging.com (instead of winehq.org). trace:d3d9:Direct3DCreate9 sdk_version 0x1f. fixme:d3d9:d3dadapter9_new Native Direct3D 9 is active. For more information visit https://wiki.ixit.cz/d3d9 trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceName overriden: .\DISPLAY1 trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceId:VendorId overridden: 6610:1002 trace:d3d9:d3dadapter9_GetAdapterModeCount 38 modes. trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceName overriden: .\DISPLAY1 trace:d3d9:d3dadapter9_GetAdapterIdentifier DeviceId:VendorId overridden: 6610:1002 trace:d3d9:d3dadapter9_AddRef 0x131798 increasing refcount to 2. fixme:d3dadapter:DRI3PresentGroup_GetMultiheadCount (0x13cff0), stub! fixme:d3dadapter:DRI3PresentGroup_GetMultiheadCount (0x13cff0), stub! trace:d3d9:d3dadapter9_Release 0x131798 decreasing refcount to 1.

System: mesa [git, iXit - 2015-03-28] wine [1.37] - think it's the same error msg with 1.38 xorg-server [1.7.1] xf86-video-ati [git, anongit.freedesktop - 2015-03-28] - doesn't work with iXit driver either

Gfx card: Radeon R7 250 Wine overrides: d3dcompiler_43.dll and d3dx9_24.dll - d3dx9_43.dll

axeldavy commented 9 years ago

Can you get log with mesa with debug enabled and NINE_DEBUG=all ?

jstraarup commented 9 years ago

Thank you for your reply. Yes - it is huge though (51 MB): https://s3-eu-west-1.amazonaws.com/triplejim/vampire_bloodlines_nine_all

I have no idea why it says: Driver: nvd3dum.dll Description: NVIDIA GeForce GTX 680 DeviceName: AMD OLAND ... Seems strange to me, I do not have a NVIDIA card (on second thought, it's probably irrelevant).

axeldavy commented 9 years ago

Thanks for the log. There is nothing in the log that let indicate of any error or problem.

Could you do a short trace with apitrace (see apitrace wiki on how to make recording with wine) ?

jstraarup commented 9 years ago

I'm am not sure I am doing this correct, but i have made two traces.

  1. Linux host calls.
  2. Trace inside WINE.
  3. WINEPREFIX=/games/bloodlines WINEARCH=win32 apitrace trace wine vampire.exe Result: https://s3-eu-west-1.amazonaws.com/triplejim/wine-preloader.trace
  4. WINEDLLOVERRIDES='Z:\home\johan\Downloads\apitrace-mingw\x86\bin\wrappers\d3d9.dll=n' WINEPREFIX=/games/bloodlines WINEARCH=win32 wine ~/Downloads/apitrace-mingw/x86/bin/apitrace.exe trace -a d3d9 -v vampire.exe Result: https://s3-eu-west-1.amazonaws.com/triplejim/vampire.trace
deri82 commented 9 years ago

https://bugs.winehq.org/show_bug.cgi?id=24701 https://bugs.winehq.org/show_bug.cgi?id=31345

siro20 commented 9 years ago

Tested with latest: https://github.com/iXit/xf86-video-ati (DRI3 and Glamor enabled) https://github.com/siro20/Mesa-3D/ wine-1.7.40 HD6870 I replayed the trace file and I don't see any difference in WINE and Gallium Nine, the menu works as expected.

jstraarup commented 9 years ago

This is very interesting. I have not tried with your repo yet. Do you think it would help? Since the game is very buggy by it self, and I see people on Windows getting the same problem - I am curious to what version of the game, and what settings you are using? Are you using any patches (official/unofficial/"true patch")? No CD patch/fixed exe? What wine settings? Overrides/specific windows version? 32/64 bit? Difference could be that you are using r600g, and I am using radeonsi driver.

siro20 commented 9 years ago

I'm going to retest with ixit git, but the differences are minor. I do not own a copy of this game, I just replayed the trace file "vampire.trace" you provided. 32bit WINE from https://github.com/iXit/wine, set to "Windows 7", d3dx9_* dll overrides

siro20 commented 9 years ago

Tested again with latest https://github.com/iXit/Mesa-3D and it work's as it should. Probably a bug in the radeonsi driver. This should be tested on Nvidia too, just to be sure.

jstraarup commented 9 years ago

Thank you, for helping narrowing it down. If you have any idea how I can debug further, please let me know.

siro20 commented 9 years ago

I tried again with Steam's Vampire: The Masquerade - Bloodlines, but I couldn't get it to start. It tries to create textures forever.... Looks like bug: https://bugs.winehq.org/show_bug.cgi?id=24701

I've made an apitrace and it looks quite different compared to the apitrace you provided. I can start and play the game using WineD3D (so it's a Gallium Nine issue), but most textures are way to dark.

jstraarup commented 9 years ago

I just bought the Steam version, and I am getting the same out of memory issue when using Nine (the same happens with a crack from gamecopyworld).

But it is different from the other issue that I am having.

I have been making the apitrace with the "true patch" applied, and applying the "true patch", to the Steam version is giving the same results (Black screen, sound in background, ability to click on menu items). To get the "true patch" to work, I had to use a program called ResPatch.exe, from the "unoffical patch", to patch some files to 16:10 resolution, which I am using.

Patching with the "unofficial patch" and using the exe (and maybe vampire.dll, can't remember), from the "true patch" gives the same results.

The textures with WineD3D, look good with Wine 1.7.38. But dark with 1.7.40.

siro20 commented 9 years ago

I was able to start the unpatched game with my latest mesa git, but it has trouble setting a correct screen resolution and keeping in the foreground. It changes the screen resolution three times and always loses it's focus. I was able to see the intro movies, but got an engine error due to E_OUTOFMEMORY once I reach the main menu.

siro20 commented 9 years ago

The game requires vidmem accounting to work. It allocates textures in a loop until E_OUTOFMEMORY or D3DERR_OUTOFVIDEOMEMORY is beeing returned. It frees all textures and starts with "normal" operation, creating index and vertex buffers. As I'm using pipe_querry to get the actual vidmem, and the driver needs some time to free all resources, creating indexbuffer/ vertexbuffers receives an unexpected E_OUTOFMEMORY too. I've hacked around this issue and do not see a crash anymore, but a black screen with menu music playing as described in the first post.

axeldavy commented 8 years ago

The game is likely fixed now. Can you confirm ?

jstraarup commented 8 years ago

Sorry about the late response. Unfortunately I still experience the same issue. Have tried with mesa from 12/12-2015, wine 1.7.55, xf86-video-ati 7.6.1, and also with an other graphics card (Radeon HD 7850 - Southern Islands - radeonsi).

axeldavy commented 8 years ago

"mesa from 12/12-2015": do you mean this mesa branch or not ?

jstraarup commented 8 years ago

Yes, this branch. I am installing it on gentoo, using this ebuild: https://github.com/okias/ixit/blob/master/media-libs/mesa/mesa-9999.ebuild

sarnex commented 8 years ago

Try using mesa in the wine-a-holics overlay with the ixit and d3d9 use flags.

jstraarup commented 8 years ago

Thank you for the suggestion, but there are no apparent difference; the same thing happens again.

I did try to click something in the menu, and was flooded with the message: err:d3dadapter:PRESENTPixmap FATAL ERROR: Trying to Present a pixmap not released I don't think I have seen that error before.

axeldavy commented 8 years ago

Could you give a log which shows this error message ?

jstraarup commented 8 years ago

I found out that it only gives this error message, after switching to a different workspace, and then killing vampire.exe. So I guess a log is not of much use, but I have made one anyway: https://s3-eu-west-1.amazonaws.com/triplejim/vampire_bloodlines_nine_all_change_workspace

If I quit the game by using the menu - through blind navigation - it gives this log: https://s3-eu-west-1.amazonaws.com/triplejim/vampire_bloodlines_nine_all_new

dhewg commented 5 years ago

Problem still exists. It's because d3d9/ddraw coop is used in this game. Setting DirectDrawRenderer to gdi fixes this to some degree.

On windowed mode (wine vampire.exe -windowed) that's all that's required.

For fullscreen mode there's a resolution mismatch between d3d9 and ddraw. With nine, the game doesn't change the resolution, so you have to set the game to your (virtual) display resolution: wine vampire.exe -full -width 1920 -height 1080

dhewg commented 5 years ago

Turns out the ddraw stuff is only used by binkw32.dll in this game. Renaming/deleting the Vampire/media folder gets rid of ddraw/coop, and the game can be played without setting DirectDrawRenderer. The resolution mismatch issue on fullscreen is still there though.

dhewg commented 5 years ago

Using WINEDEBUG=ddraw to see if ddraw is used, I tested different versions of binkw32.dll from a few other games:

GOG game ships with 1.6.3.0, which is using ddraw coop

1.5.21.0 from kotor1/2 - uses ddraw, no changes 1.8.21.0 from dragon age - not using ddraw, fixes game rendering 1.9.8.0 from witcher1 - not using ddraw, no changes 1.9.25.0 from rayman - not using ddraw, inverse, bink rendering broken, but game works

So apparently overwriting Bin/binkw32.dll with v1.8.x fixes the issue too

dhewg commented 5 years ago

The resolution mismatch is fixed on standalone master. The bink/ddraw issue is still present. Unsure how to fix that, known workarounds:

chewi commented 5 years ago

I can confirm that simply swapping in binkw32.dll v1.8 was enough to fix it for me.

dhewg commented 5 years ago

For the record: d9vk has the same ddraw coop issue

dhewg commented 5 years ago

VTMB Unofficial Patch v10.5-rc2 is shipping binkw32.dll v1.8x. GOG will eventually pick that up, but you can install it manually in any case. With that and standalone v0.5 everything should work out of the box now!

jstraarup commented 5 years ago

Wonderful! Thank you so much for following up on this old issue. I am not able to test this at the moment, but will look forward to trying it out when I can :-)

rox4d commented 4 years ago

Looks like it work now (with recent wine) without dancing with binkw32.dll.