doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
13.36k stars 862 forks source link

[d3d9/d3d11][Windows] Omega Force Engine games crash/black screen #1361

Closed NikoofDeath closed 4 years ago

NikoofDeath commented 4 years ago

Software information

In every game utilizing Omega Force's engine (can be easily identified by their usage of a LINKDATA.BIN file for the majority of data storage) that I have tested, using DXVK causes either an immediate crash on startup, or a frozen black screen, with RAM usage not changing and CPU usage moving between around 30 and 40% until the process is force closed. I have separated the games I have tested into 3 categories, based on API and behavior, with one apitrace for each: d3d9x32 (Immediate termination): DYNASTY WARRIORS 7: Xtreme Legends Definitive Edition, Samurai Warriors 4-II d3d11x64 (Immediate termination): Samurai Warriors: Spirit of Sanada (This is by far the worst performing Omega Force game I have played, and the only dx11 game that behaves this way, so it might be a unique case. My main reason for trying to use DXVK with these games in the first place was to see if it would help alleviate the performance issues these games face like it does for Sekiro) d3d11x64 (Freeze): Warriors Orochi 4, Dynasty Warriors 9, Dragon Quest Heroes, Dragon Quest Builders 2 It should be noted that AMD's drivers had been causing these games to crash on startup from 19.12.2 to 20.1.2, but that was fixed in 20.1.3 (and I believe this issue extended to Koei games that do not use the same engine and I have found to work with DXVK, like Dead or Alive 6, so I believe this is an unrelated issue)

System information

Apitrace file(s)

Log files

doitsujin commented 4 years ago

What's with all the Windows bug reports lately? Many games simply will not work on Windows either due to the way they load D3D DLLs, or due to interactions with amdags/nvapi libraries.

Anyway,

Dynasty Warriors 7: This relies on a D3D9 feature that is already implemented in latest master, please try that if possible. Samurai Warriors: Requires shared resources, which DXVK cannot support. Warriors Orochi 4: The apitrace replays fine and the game is known to work on Linux, so this is most likely not a DXVK bug but one of those Windows problems that we cannot fix on our end. This game also seems to be broken as fuck and sort of relies on a bug in the D3D11 runtime that we currently don't emulate correctly, but this shouldn't cause any problems since the game also does some things where even native D3D11 errors out.

NikoofDeath commented 4 years ago

What's with all the Windows bug reports lately?

DXVK got shared in a lot of places recently as a way to improve Sekiro's performance with AMD graphics cards (which it is effective at, for example, one scene that kills performance for me for some reason goes from 50fps to 68fps on highest settings, and 79 to 120fps on lowest settings), so I assume that is the source of the increased interest from Windows users (it was the case for me at least).

Many games simply will not work on Windows either due to the way they load D3D DLLs, or due to interactions with amdags/nvapi libraries.

Oddly enough, of the games I've tested, it's one that uses the AGS dll (Sekiro) that seems like the best case scenario (perhaps there is something "bugged" that is helping performance?)

Dynasty Warriors 7: This relies on a D3D9 feature that is already implemented in latest master, please try that if possible.

I'll try and set up the build environment and get back to you on this.

Samurai Warriors: Requires shared resources, which DXVK cannot support.

Curious if that's related to the port being so much worse than the others.

Warriors Orochi 4: The apitrace replays fine and the game is known to work on Linux, so this is most likely not a DXVK bug but one of those Windows problems that we cannot fix on our end. This game also seems to be broken as fuck and sort of relies on a bug in the D3D11 runtime that we currently don't emulate correctly, but this shouldn't cause any problems since the game also does some things where even native D3D11 errors out.

Sadly it's one of the least broken ports Omega Force has put out. As I said before, the ports being so bad was the main reason I wanted to try DXVK with these games. Honestly surprised it's working on Linux.

Thanks for the response!

misyltoad commented 4 years ago

I'll try and set up the build environment and get back to you on this.

There are builds of every commit at https://git.froggi.es/doitsujin/dxvk/-/jobs

DaRkL3AD3R commented 4 years ago

Just to add a further comment on the Windows angle of this discussion, I can also claim DXVK boosts performance over native D3D9 on Nvidia hardware as well in a few games that are CPU bottlenecked. Dead Rising 2: Off the Record shoots up from 76 fps to 116 in one particularly heavy scene.

Additionally, with newer versions of Windows 10 deprecating D3D8 and parts of D3D9 as well as the fact that all D3D games are facing the plague known as "fullscreen optimizations", DXVK offers a barrier of protection like a VM to avoid all these cancerous problems Microsoft has created since the release of the Creators Update 1703. Without this wrapper, I would suffer significantly worse frametimes, failure to hook gsync in D3D9 at all, and worsening performance as old APIs are replaced with emulators (like Direct Draw.)

Sorry I know Windows support is not part of DXVK's plan, and I try not to report issues that I know are 100% because of the broken way Windows loads the dll files. I try to stick to actual render issues from games that do work. Just trying to give some feedback on how important this project is even among Windows gamers.

NikoofDeath commented 4 years ago

There are builds of every commit at https://git.froggi.es/doitsujin/dxvk/-/jobs

Ah, I didn't realize this, thanks! Can confirm that the latest build works with DW7.

doitsujin commented 4 years ago

Oddly enough, of the games I've tested, it's one that uses the AGS dll (Sekiro) that seems like the best case scenario (perhaps there is something "bugged" that is helping performance?)

Sekiro only uses it for HDR and not for D3D extensions.

It's really the games that use it to interact with the D3D device without doing any sort of error checking that cause problems. With AGS it's usually less insane than with NVAPI, which is also why DXVK reports all GPUs as AMD by default, but there are exceptions (e.g. Assassin's Creed Syndicate). NVAPI on the other hand breaks all Unreal Engine 4 games.