protonscr

Reshade4 compatibility broken (dxgi.dll)

dxvkclosed
doitsujin/dxvk#1057 · opened 2019-05-15 by jarrard · updated 2019-05-20 · 18 comments · github
3 matching comments, n / p to jump
Jjarrard 2019-05-15 github

Seems latest DXVK broke reshade4 compatibility, at least for War Thunder non-native game and possibly others. It should be noted that reshade does not work with warthunder and steamplay atm (dxgi.dll method at least), not sure why. d3d11.dll method should work however, but not all games will accept that method.

Reshade can be used either via d3d11.dll or dxgi.dll, it will depend on the game on which is needed, warthunder needs dxgi.dll and outward needs d3d11.dll for example.

This problem could be exclusive to the DXGI.DLL method of injecting reshade effects into games, d3d11.dll may be just fine, but not all games accept it.

Software information

War Thunder win64 exe, dxgi.dll file works with dxvk1.1.1. (https://reshade.me/)

System information

  • GPU: 1080ti
  • Driver: 418.52-05 beta
  • Wine version: 4.8
  • DXVK version: 1.2

Apitrace file(s)

  • Put a link here

Log files

  • d3d11.log:
  • dxgi.log: (War Thunder win64)
    dxgi.log
Ddoitsujin maintainer 2019-05-15 github

Try setting the DXVK DLL overrides to native,builtin instead of native. This is not a DXVK bug, this is an issue with how ReShade loads d3d11.dll.

To elaborate, it needs to load the system's DLL (in this case, the one provided by dxvk) to create a D3D11 device, but it loads its own DLL, which leads to infinite recursion.

Jjarrard 2019-05-15 github

the issue is primarily with dxgi.dll from what I can tell, I will try your suggestion non the less.

setting either/or native,builtin for d3d11.dll and dxgi.dll did not resolve the problem, aces.exe still freezes.

PS. it works with 1.1.1 and below without any tweaks. Only started becoming a issue in 1.2.

Ddoitsujin maintainer 2019-05-15 github

In that case, please bisect. It's extremely strange that this broke because nothing at all has changed between the two versions that would affect the entry points.

I don't really intend to support ReShade due to its questionable DLL loading mechanism though.

Jjarrard 2019-05-15 github

ok I'll bisect sometime and post the results here.

It is odd how dxgi.dll reshade has never worked with steamplay on any version from what I remember so not sure what's that about.

Ffls2018 2019-05-15 github

I can confirm the same, I thought it was something changed in proton but found I was having the same issue with lutris too. I'll try the different commits tomorrow if it helps (it's 4 in the morning here) although the dxvk I was using prior is only a week or so behind master.

Iionenwks 2019-05-15 github

I was actually trying to use reshade for the first time yesterday, with dxvk 1.0.3 from winetricks it was working but with my (usual) winelib build compiled from git master I was getting stack overflow errors. Then I came across this patch:
https://gist.github.com/Riesi/09babd6f06908dbe48ff114bdbbee39b
which fixed it.
Edit: for the record, I was using reshade 4.1.1 through dxgi.dll, the override is set as (native) only, and using wine-staging-4.7 -- also tried it a few seconds ago with current git master dxvk + that patch

Jjarrard 2019-05-15 github

interesting, I might give it a go with 1.2 sometime, if it works then maybe it can be upstreamed someday.

Will still need to investigate why steamplay proton has these freeze issues with dxgi.dll in use, could be a separate issue.

Iionenwks 2019-05-15 github

Did your use of 1.1.1 and 1.2 switch to a winelib build? I believe the issue is related to that, I don't think that ever really worked properly, or at least not without the patch I mentioned.

Jjarrard 2019-05-15 github

I use lutris provided wine builds.

Ffls2018 2019-05-15 github

@doitsujin

Strange thing is I've just gone back through testing commits as far as May 1st which I'm sure was working and I'm having the same issue yet if I download the 1.1.1 release from after that date it works fine.

I'm wondering whether any updates to any compiling tools have borked it?

Edit:

I was actually trying to use reshade for the first time yesterday, with dxvk 1.0.3 from winetricks it was working but with my (usual) winelib build compiled from git master I was getting stack overflow errors. Then I came across this patch:
https://gist.github.com/Riesi/09babd6f06908dbe48ff114bdbbee39b
which fixed it.
Edit: for the record, I was using reshade 4.1.1 through dxgi.dll, the override is set as (native) only, and using wine-staging-4.7 -- also tried it a few seconds ago with current git master dxvk + that patch

This patch works fine.

Ddoitsujin maintainer 2019-05-15 github

Ah, yeah, I remember what the issue was now. I really, really hate the idea of catering to such a hooking mechanism, but well, looks like we don't have much of a choice here.

Iionenwks 2019-05-15 github

It would be nice to get to do those things with a simple LD_PRELOAD outside of wine instead, but haven't seen much when it comes to linux injectors. Handy things like VkGHL and libstrangle exist to force a few settings but not going to let you add shaders.

That aside, getting reshade to work is still kinda messy even if dxvk allows it (newer version is broken last I heard and have to stick with 4.1.1, also need a d3dcompiler_47 override). I'd agree it's generally not worth it.

Jjarrard 2019-05-15 github

4.2.1 seems to work fine with lutris and dxvk 1.1.1 (and below). I dunno what the issue was with v421 that people reported, could be a windows thing.

SSporif 2019-05-15 github

@jarrard 4.2.1 is incompatible with wined3d, not dxvk.

Tt14462 2019-05-15 github

Other DXGI-mod, Fallout 4 DynaPerf much-happier with this fix too!

This is dynamic performance tuner for fallout 4, and with 8cae607 it works very good!

Thank you!

CCloverFeywilde 2019-05-19 github

So I see this is closed but, is there a workaround or an incoming fix for this? I've read through here but seem to be somehow missing the solution piece.

Just to add, the exact same thing is happening to me with FFXIV using DXVK 1.2.1 and Wine 4.7

I ran a debug log because I thought it was FFXIV that was broken, but it was actually reshade. You can basically see towards the end where it gets stuck performing the same loop again and again
https://paste.ee/p/bpDCh

KK0bin maintainer 2019-05-19 github

Your logs just say DXVK 1.2. Make sure you're actually using 1.2.1.

CCloverFeywilde 2019-05-20 github

@K0bin ahh Thankyou so much. You're absolutely right. This was only like a week ago, so I had no idea when I first hit this snag, I was using 1.2.

DLLs