roderickc / wine-vulkan

Other
53 stars 7 forks source link

Vulkan api 1.0.51 #6

Closed johndoe7000 closed 6 years ago

johndoe7000 commented 6 years ago

Hello,

tested this peace of gem on Debian Stretch with Doom 2016. Because of the vulkan api limitation I was only able to get this running until mesa 17.1 with intel Iris Pro 6200. Here the anv vulkan driver implements 1.0.42. The game crashes always when the imp throws his fireball (or whatever) after opening the door where you get the shotgun. I think this could be a bug in mesa 17.1 and maybe it's fixed in mesa >= 17.2 (comes with 1.0.54) but because of limitation to 1.0.51 I cannot test. Will it take long to implement 1.0.65?

roderickc commented 6 years ago

The Vulkan version in wine-vulkan doesn't matter so much. Newer versions just add more functionality and if the game doesn't use it and the driver doesn't support it, it won't change anything. Right now I support the Core version of Vulkan with window support. Really the foundation of Vulkan, extensions (so features from newer version) will come soon, but I don't expect them to help out with this.

So newer version doesn't really matter for this, but the reason I'm stuck at 1.0.51 is due to a license change in Vulkan since that time, which makes it incompatible with Wine. I have been working for some months with Khronos on a solution and we are far now.

For me Wolfenstein II works fine on RADV / Nvidia. I admit I haven't played the game far, I just have the demo. I can't say where the issue is. Could either be on my side or ANV. A starting point would be to run the game from the command line and capture the crashdump (or capture it from I guess the Wine crash dialog you will get). The crashdump might tell us in which code the crash is.

roderickc commented 6 years ago

Just read your message one more time. It is perfectly fine if your driver supported a much newer version than offered by wine-vulkan. It is just extra features, so only the features not supported are lacking. Whatever common functionality there was will still work. I would just try a newer Mesa and see how it does.

johndoe7000 commented 6 years ago

Thanks for your quick answer. I already tried 17.2, 17.3, 18.0-rc2 yesterday. DOOM crashes always with "FATAL ERROR: vkCreateDevice failed". With mesa 13.0.6, 17.0 and 17.1 it works. Vulkaninfo works with all versions of Mesa I tried. Will try Talos Principle with newer versions and report back.

johndoe7000 commented 6 years ago

OK, Talos Principle (vulkan) works with mesa 18.0-rc2.

  1. Will try Wolfenstein II Demo.
  2. Will try DOOM with wine-staging.
  3. Report back.
roderickc commented 6 years ago

I wonder if the game tries to use some extensions, which I don't have causing vkCreateDevice to fail. I'm about to add extension support and also blacklist extensions I don't have.

On Thu, Jan 25, 2018 at 9:48 AM, johndoe7000 notifications@github.com wrote:

Thanks for your quick answer. I already tried 17.2, 17.3, 18.0-rc2 yesterday. DOOM crashes always with FATAL ERROR: vkCreateDevice failed. With mesa 13.0.6, 17.0 and 17.1 it works. Vulkaninfo works with all versions of Mesa I tried. Will try Talos Principle with newer versions and report back.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/roderickc/wine-vulkan/issues/6#issuecomment-360544901, or mute the thread https://github.com/notifications/unsubscribe-auth/ATd3y748-f6OYi-gXIAZMXE2TFOJ9Z0Iks5tOL5ugaJpZM4Rsxl5 .

johndoe7000 commented 6 years ago
  1. Wolfenstein II Demo does not run at all. Wine-staging doesn't help here too. Tested all mesa drivers from 17.0.7 until master. It always stops with "FATAL ERROR: Only ID_DEV_TOOLS builds (win64-dev, vulkan-dev) can run without a package". Some search via google led me to a post from some guy which tells to disable iGPU (Intel) and use dedicated GPU AMD/Nvidia:( Hope he is wrong.
  2. Wine-staging behaves like wine-vulkan with DOOM. Mesa anv works with 13.0.6, 17.0 and 17.1. 17.2 and newer crash with "FATAL ERROR: vkCreateDevice failed with error (VK_ERROR_FEATURE_NOT_PRESENT)". DAMN seems like my copy+paste of the error message in my 2nd post was cut off - sorry.

ErrorLog_01-26-2018__01-43-47am.txt Crash.pc1.00008.html.log qconsole.log

When the games crashes (freeze) with mesa 17.1 I can see GPU hangs in dmesg... [ 2509.624077] [drm] GPU HANG: ecode 8:0:0x8795fffd, in DOOMx64vk.exe [7301], reason: Hang on render ring, action: reset [ 2509.624079] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace. [ 2509.624080] [drm] Please file a new bug report on bugs.freedesktop.org against DRI -> DRM/Intel [ 2509.624081] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue. [ 2509.624081] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it. [ 2509.624082] [drm] GPU crash dump saved to /sys/class/drm/card0/error [ 2509.624105] drm/i915: Resetting chip after gpu hang [ 4797.374365] drm/i915: Resetting chip after gpu hang [ 4983.338106] drm/i915: Resetting chip after gpu hang [ 6153.162596] drm/i915: Resetting chip after gpu hang

roderickc commented 6 years ago

Hm, okay let me go over each issue one by one.

So you think the dmesg lines correspond to the times when Doom crashes? (You can use dmesg -T to get easier to read timestamps). If so there could be a driver bug, but since my code is still fresh I don't rule out bugs in mine, though my code is mostly a passthrough. Since wine-staging seems to have similar issues, I'm betting on a Mesa issue.

Wolfenstein works fine for me on RADV and Nvidia. I'm not sure what the error you showed means. Is there any clue ine one of its log files like for DOOM? I know for me on RADV and Nvidia the first thing the game does is show some dialog about a driver warning, because it doesn't recognize the version.

I will provide a few more updates like this weekend. It will fix some extension reporting issue. Who knows the game could be sensitive to this at startup.

johndoe7000 commented 6 years ago

I've found the issue why all mesa releases AFTER 17.1 (17.1.10 to be exactly) do not work with DOOM on Intel iGPU with anv. It did not make any sense to me after you told me that the vulkan api version shouldn't matter. Also the error tells that some FEATURE is not present. Why should a newer driver have less features than the older one? Searched all 17.2 commits and found this one... https://cgit.freedesktop.org/mesa/mesa/commit/?id=5dd96b1156e25e10d649d49377df02763fcd45a5

A simple "git revert" makes newer mesa versions run DOOM with anv!

The same code was ported some days after to RADV too... https://cgit.freedesktop.org/mesa/mesa/commit/?id=22b59b99cbee00689b68f1781ed0a10d74ffc49e

So you think the dmesg lines correspond to the times when Doom crashes?

Yes. When DOOM crashes (freeze) with anv during gameplay GPU hang happens and gets logged.

Since wine-staging seems to have similar issues, I'm betting on a Mesa issue.

Yes. Think you are right.

Wolfenstein works fine for me on RADV and Nvidia. I'm not sure what the error you showed means.

Seams that this error comes from a wrong/broken Steam package. Look here... https://steamcommunity.com/app/612880/discussions/0/1479856439028373903/

Will redownload Wolfenstein II Demo and report back.

Will test mesa 18.0-rc2 and master with DOOM against GPU hang. So far... 17.2 + reverted patch > GPU hang. 17.3 + reverted patch > GPU hang.

johndoe7000 commented 6 years ago

DOOM: 18.0-rc2 + reverted patch > GPU hang. master + reverted patch > GPU hang.

Wolfenstein II: Steam Store did not work for me thats why I used steamcmd. But steamcmd somehow downloads a bad package which results into "FATAL ERROR: Only ID_DEV_TOOLS builds (win64-dev, vulkan-dev) can run without a package". But starting steam with "-no-cef-sandbox" makes the Steam Store work again:) Downloaded Wolfenstein II and voila it worked. It also needs the reverted patch or it will end up also with "FATAL ERROR: vkCreateDevice failed with error (VK_ERROR_FEATURE_NOT_PRESENT)" when using mesa higer than 17.1 and ANV. Sadly when I start a campaign I get immediately a GPU hang like with DOOM.

I will write a bug report against DOOM and Wolfenstein II at mesa bugtracker and hopefully they can solve the GPU hangs with both games.

But I still wonder why you don't get the "FATAL ERROR: vkCreateDevice failed with error (VK_ERROR_FEATURE_NOT_PRESENT)" error with Wolfenstein II and RADV. Reading Calvin Ellingtons last post at... https://appdb.winehq.org/objectManager.php?sClass=version&iId=33711 ...shows the same error like for me when he tries to run DOOM 2016 with RADV instead. Which Mesa version do you use with AMD/RADV? Maybe RADV developers have some patch for vulkan which ANV does not have and could be backported to ANV.

johndoe7000 commented 6 years ago

In the meantime Mesa developer Jason Ekstrand from Intel answered to my report. DOOM and Wolfenstein 2 require "depthBoundsTest" which is a FEATURE. With ANV it is currently set to false and with RADV to true. Commit 5dd96b1156e25e10d649d49377df02763fcd45a5 hides disabled features. Thats why these games work with RADV and not ANV on mesa version higher 17.2.

roderickc commented 6 years ago

Thanks for the investigation I guess that confirms the issue. I hope they can add that missing feature to ANV soon.

roderickc commented 6 years ago

I support a bunch of extensions now as well for 1.0.51. I will consider this bug closed.