Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ryzendew opened this issue Oct 6, 2021 · 31 comments
Closed

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

ryzendew opened this issue Oct 6, 2021 · 31 comments

Comments

@ryzendew
Copy link

ryzendew commented Oct 6, 2021

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](https://user-images.githubusercontent.com/84041391/136130971-1fc54c37-e654-4400-8563-6a5a394c92f0.png
Gw2-64_d3d11.log
)

@DxCx
Copy link

DxCx commented Oct 6, 2021

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
Copy link
Owner

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
Copy link

J0s3f commented Nov 30, 2021

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

@Squall-Leonhart
Copy link

Squall-Leonhart commented Jun 30, 2022

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
Copy link
Collaborator

K0bin commented Jun 30, 2022

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
Copy link

Squall-Leonhart commented Jun 30, 2022

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
Copy link

Gazareth commented Aug 28, 2022

@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
Copy link

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

@Gazareth
Copy link

Gazareth commented Aug 29, 2022

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
Copy link

you need both the dxgi and the d3d11 file.

@Gazareth
Copy link

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
Copy link

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

@ryzendew
Copy link
Author

ryzendew commented Aug 29, 2022 via email

@Gazareth
Copy link

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
Copy link

Sildurs-shaders commented Oct 24, 2022

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
Copy link

SolarizedRed commented Nov 4, 2022

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
Copy link

Espionage724 commented Nov 25, 2022

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: #2324 (comment)

@SolarizedRed
Copy link

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
Copy link
Contributor

Blisto91 commented Jan 26, 2023

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

@K0bin
Copy link
Collaborator

K0bin commented Jan 26, 2023

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

@SolarizedRed
Copy link

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

@K0bin
Copy link
Collaborator

K0bin commented Jan 26, 2023

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

@Squall-Leonhart
Copy link

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

@SolarizedRed
Copy link

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
Copy link

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
Copy link

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
Copy link
Contributor

Blisto91 commented Mar 14, 2023

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
Copy link

So this was fun to figure out :p

  • x64 DXVK dlls
  • d3d11.dll to root GW2 folder (next to Gw2-64.exe)
  • d3d9.dll to bin64\cef folder (next to CefHost.exe)
  • dxgi.dll to bin64\cef folder (next to CefHost.exe)
  • dxvk.conf to root GW2 folder (next to Gw2-64.exe for async/hud/etc configs)

@djsolarix
Copy link

So this was fun to figure out :p

  • x64 DXVK dlls
  • d3d11.dll to root GW2 folder (next to Gw2-64.exe)
  • d3d9.dll to bin64\cef folder (next to CefHost.exe)
  • dxgi.dll to bin64\cef folder (next to CefHost.exe)
  • dxvk.conf to root GW2 folder (next to Gw2-64.exe for async/hud/etc configs)

Tried this, still errors out. Oddly I noticed it gets stuck on "Initializing" while the splash screen is loading before login but the results are still the same after trying to hit play. "Unable to Initialize 3D Output...."

@brittyazel
Copy link

brittyazel commented Nov 13, 2024

So this was fun to figure out :p

  • x64 DXVK dlls
  • d3d11.dll to root GW2 folder (next to Gw2-64.exe)
  • d3d9.dll to bin64\cef folder (next to CefHost.exe)
  • dxgi.dll to bin64\cef folder (next to CefHost.exe)
  • dxvk.conf to root GW2 folder (next to Gw2-64.exe for async/hud/etc configs)

Are you on Nvidia by any chance? For AMD GPUs all that is necessary to get DXVK working is putting d3d11.dll and dxgi.dll in the root of the GW2 folder. No modifications are necessary to the bin64/cef folder.

One interesting thing that I see when looking inside bin64/cef is that there's bundled vulkan .dll files included by default, so I wonder if on AMD GPUs when using DXVK Chromium is natively rendering using Vulkan. That would be wild if so.

FWIW, I have been putting together a small guide for people to use to get DXVK working:
https://www.reddit.com/r/Guildwars2/comments/1gpuceq/dxvk_the_easiest_way_to_use_dxvk_to_render_the/
and
https://en-forum.guildwars2.com/topic/153463-guide-how-to-easily-improve-fps-and-decrease-stuttering-on-windows-using-dxvk-greatly-helps-amd-gpus/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests