doitsujin / dxvk

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

Guild wars 2 DX11 mode doesn't work with DXVK #2324

Closed ryzendew closed 2 years ago

ryzendew commented 2 years ago

Tried Running Guild wars 2 in DX11 mode with newest DXVK on Nvidia Drivers 510.10 and newest game ready drivers on windows 10 and windows 11 RTM and windows 11 insider

same result everytime also added log if you need more info let me know how image

DxCx commented 2 years ago

I was successfully running both dx9 and dx11 gw2 with dxvk.. A. Did u ensure dx9 version works locally? (so you know vulkan is setup correctly) B. Did u also copy dxgi.dll? C. For Dx9 dlls need to be in gw2/bin64, for dx11 it should be in gw2/

Btw ive found out that as for now, dx9 dxvk version runs the best (out of dx9, dx11, and dx11vk), dx11vk one gives me around 10 less fps and Abit more stuttering, i hope that anet will improve dx11 in the future and it will run better xD

doitsujin commented 2 years ago

The game is known to work with DXVK, it probably loads dxgi.dll from system32 or you just forgot to copy it or something.

J0s3f commented 2 years ago

Is there any way to prevent it from loading dxgi.dll from system32?

Squall-Leonhart commented 2 years ago

Delete the dxvk version of the d3d9 file from the bin64 folder in order to use dxvk with d3d11 and dxgi in the games main folder.

K0bin commented 2 years ago

Delete the dxvk version of the d3d9 file from the bin64 folder in order to use dxvk with d3d11

@Squall-Leonhart

That's just wrong. If the game decides to use D3D9, it will just use your normal d3d9 driver (because you deleted DXVK after all). If it decides to use D3D11, deleting d3d9.dll has absolutely no effect.

Squall-Leonhart commented 2 years ago

DXVK's D3D9 file in /bin64/ prevents GW2 from loading the D3D11 and DXGI files from the root directory when the game is configured to D3D11, the game by default loads the D3D9.dll at launcher start preventing the started game from seeing the DXVK d3d11 and dxgi files (this is before logging in and starting the game).

When you do login and start game after having set D3D11 to enabled, you see this image

When you do not have the d3d9 file in /bin64/, the system version of the library is loaded instead(obviously) and guildwars 2 is able to load the d3d11 and dxgi files from dxvk placed in the root directory of GW2

image

It is the first i've seen any title have different load location requirements depending on the D3D api used, where the same executable is used for both.

My theory would be that the dxvk library under /bin64/ changes the start in location, which in that case the d3d11 and dxgi dll's should work from the /bin64/ folder too, but they don't.

¯_(ツ)_/¯

Gazareth commented 2 years ago

@Squall-Leonhart How did you get this to work?

I'm getting this same problem as OP and I've tried deleting all dxgi/d3d9/d3d11 files from both the root folder and /bin64/, starting from scratch with dxvk today. Using the resource monitor, it always seems to be associated with d3d9 and dxgi from /System32/, even when the game is set to use DX11, and I've put dxvk's d3d11 & dxgi dll's into GW2's root directory. If I put dxvk's d3d9 into /bin64/ it will use that and vulkan will load, but I'll be on d3d9->vk 😩

I really want to use d3d11->vk because dx11 performace has really come a long way in GW2 and I'm hoping that will translate into vulkan and push it even higher.

Squall-Leonhart commented 2 years ago

dxvk's d3d11 and dxgi go into the same folder as gw2-64.exe, nothing goes into bin64.

Gazareth commented 2 years ago

Yeah I am doing that, I just tested out the dx9 version of vk in order to verify that at least that would work. It does, but dx11 doesn't.

Interestingly if I install the dx11 version of reshade, that works, and resouce monitor says it's using the dxgi in the gw2 root folder.

Trying dxgi from dxvk just causes the same crash as shown by OP:

image

I wondered if it was something on my PC, I uninstalled a couple of overlay programs that were showing up, and also deleted everything in the GW2 folder. But no luck. Could it be that my GW2 is not installed in /Program Files/?

Squall-Leonhart commented 2 years ago

you need both the dxgi and the d3d11 file.

Gazareth commented 2 years ago

Yep got that as well.

Here's my GW2 root folder:

image

And my /bin64/

image

And I'm getting that error when I try to load up the DX11 mode of GW2

Squall-Leonhart commented 2 years ago

it could be due to being blocked on the file properties.

ryzendew commented 2 years ago

It just doesn’t work as said it should it errors out I’ve tried everything also and nothing works but my performance is amazing with dx11 now Sent from my iPhoneOn Aug 29, 2022, at 6:30 PM, Squall Leonhart @.***> wrote: it could be due to being blocked on the file properties.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

Squall-Leonhart commented 2 years ago

more than likely this https://reverseengineering.stackexchange.com/questions/29872/program-doesnt-load-a-custom-dll-from-main-directory-how-can-i-inject-a-dll

Gazareth commented 2 years ago

Thanks for that. Lots of info there. I'm not in a position to create a launcher, (GW2 has one anyway, so not sure if that would work), but I did try some of the DLL redirect stuff out. No beans.

The fact that GW2 will load Reshade's dxgi suggests it's capable of loading custom dll's. I'm wondering if it's specifically the d3d11 that it won't load or doesn't like for some reason.

@Squall-Leonhart are you able to get yours to load on the latest GW2 and dxvk? Just want to make sure they haven't introduced a hard-coded path to d3d11 in a later version of GW2.

Sildurs-shaders commented 1 year ago

Manually patching the Gw2-64.exe file to load d3d11.dll works but it's not optimal in case of updates. UPDATE: For some reason d3d9.dll is being loaded from the base64 folder, modding it to load d3d11.dll also in the bin64 folder works and the game runs in vulkan mode without the need of modifying the exe files directly.

SolarizedRed commented 1 year ago

Manually patching the Gw2-64.exe file to load d3d11.dll works but it's not optimal in case of updates. UPDATE: For some reason d3d9.dll is being loaded from the base64 folder, modding it to load d3d11.dll also in the bin64 folder works and the game runs in vulkan mode without the need of modifying the exe files directly.

Any chance you could provide that modded DLL? I'm running into the same issues as described above on every device I test with. EDIT: If anyone else runs into this issue, I've found success using https://github.com/megai2/SelectRenderer and GW2 Addon Manager to load the renderer.

Espionage724 commented 1 year ago

I put 64-bit versions of d3d11.dll and dxgi.dll in the root GW2 folder (next to Gw2-64.exe) and d3d9.dll in the bin64 folder (next to CoherentUI_Host.exe).

There's no 3D accelerator error, GW2 starts in D3D11 mode (DX9 legacy unchecked in-game), it runs through DXVK for me (DXVK logs and Steam remote-play overlay) on Windows 10 and I don't have to modify the exe or use an injector.

If you get the 3D accelerator error, GW2 gets switched to DX9 until you disable it manually from settings. DXVK also works fine with DX9 mode.

Edit: This was fine in 2022 but in 2024 I needed different locations: https://github.com/doitsujin/dxvk/issues/2324#issuecomment-2294503936

SolarizedRed commented 1 year ago

This issue is still occurring for me, and the SelectRenderer workaround doesn't seem to fix it anymore. Specifically, DX11 will fail to initialize the 3D renderer, and will fall back to the DX9 renderer, which works.

Blisto91 commented 1 year ago

CoherentUI will be replaced in the game sometime here in Q1. Might make things easier then.

K0bin commented 1 year ago

@SourceRyan On Linux or on Windows? Can you post a fresh set of DXVK logs?

SolarizedRed commented 1 year ago

This is on Windows. Here are the logs: Gw2-64_d3d11.log Gw2-64_d3d9.log

K0bin commented 1 year ago

If it's on Windows, there's probably nothing we can do about it.

Squall-Leonhart commented 1 year ago

under windows 10 you need to mess with knowndll's a bit to get dxvk loaded by guildwars 2.

SolarizedRed commented 1 year ago

under windows 10 you need to mess with knowndll's a bit to get dxvk loaded by guildwars 2.

Any links, suggestions, or tips on how to go about doing that? I tried searching but I haven't seen much discussion of working with KnownDLLs in regards to DXVK or Guild Wars 2

Espionage724 commented 1 year ago

This issue is still occurring for me, and the SelectRenderer workaround doesn't seem to fix it anymore. Specifically, DX11 will fail to initialize the 3D renderer, and will fall back to the DX9 renderer, which works.

DXVK works fine for me with GW2 today on Windows 10 21H2:

Image

d3d11.dll and dxgi.dll in the root GW2 folder next to Gw2-64.exe, and d3d9.dll in bin64 folder. I'm not using KnownDlls or anything special afaik, but I do have UAC disabled. I'm using DXVK 1.10 with an older AMD graphics driver.

SolarizedRed commented 1 year ago

For what it's worth, all of the devices I have access to and have tested on have been either Nvidia or Intel integrated graphics. I'll have an AMD device available in a few weeks and can see if that makes any difference.

Blisto91 commented 1 year ago

The newest update makes the game use CEF (Chromium Embedded Framework) instead of CoherentUI by default so this might work better now if it is of interest.

Edit: nvm they reverted it again

Espionage724 commented 3 weeks ago

So this was fun to figure out :p