protonscr

RE 2 Remake: GPU hang with dxvk 1.1.1 (Proton 4.2-4)

dxvkclosed amd radv
doitsujin/dxvk#1056 · opened 2019-05-14 by magist3r · updated 2019-06-12 · 23 comments · github
1 matching comments, n / p to jump
Mmagist3r 2019-05-14 github

Resident Evil 2 Remake causes GPU hang with DXVK 1.1.1 and Proton 4.2-4. This happens right before big RESIDENT EVIL 2 title. 100% reproducible.

Proton 3.16-9, Proton 4.2-4 with dxvk 1.0.2 and with dxvk 1.2 work fine.

Should I bisect the bad commit? It could be rather long because of hangs..

System information

  • GPU: RX 580 8 Gb
  • Driver: Mesa 19.1 Git/19.2 Git (no difference)
  • DXVK version: 1.1.1

Log files

re2_dxgi.log
re2_d3d11.log

Ddoitsujin maintainer 2019-05-15 github

What do you mean by "big RESIDENT EVIL 2 title"? The main menu?

Game works fine on my end with mesa-git and LLVM 9.0-git with the latest Proton update.

Mmagist3r 2019-05-15 github

Yes, it hangs before the main menu.
I can try to build llvm9 from git and see if it works.

GGuy1524 2019-05-15 github

Maybe you should try copying in DXVK 1.1.1 from the release page on here to see if the issue is w/ one of the proton DXVK patches.

Ddoitsujin maintainer 2019-05-15 github

Proton has literally two DXVK patches, one passes CFLAGS around and the other hides log spam when querying some wine interop interface. That won't be the issue here.

LLVM could very well be bugged though.

Hhakzsam 2019-05-15 github

Can you record an apitrace that reproduces the hang please?

Mmagist3r 2019-05-15 github

Can I use the working version of DXVK to record an apitrace?

Hhakzsam 2019-05-15 github

Yes.

Mmagist3r 2019-05-15 github

Unfortunately I can't record an apitrace. Game closes too early, and re2_d3d11.log is full with
QueryInterface: Unknown interface query
warnings.

With wined3d the game doesn't start and shows an error.

re2_d3d11.log
re2_dxgi.log

Mmagist3r 2019-05-15 github

I updated to llvm9-git - no difference.

Mmagist3r 2019-05-15 github

Bisected:

git bisect bad
67b9b6e1e19a9d19868fd1189e03fc7f0b42d4e1 is the first bad commit
commit 67b9b6e1e19a9d19868fd1189e03fc7f0b42d4e1
Author: Philip Rebohle [email protected]
Date: Tue Apr 2 12:52:44 2019 +0200

[dxvk] Pull buffer updates out of render passes whenever possible

Instead of ending the render pass and inserting two barriers, we
perform the update and barrier in a dedicated command buffer.

Improves performance in Sekiro by 5-10% depending on resolution and scene.

:040000 040000 e7bc6fcc3f05c8e823b65cec2c962dca41045c5c 789b6ba7e50b025c2a504267132692fd647fcd9f M src

Mmagist3r 2019-05-16 github

I really don't understand what's going on here. DXVK v1.2 from releases page works fine for me, BUT my self-compiled version causes hang...

Mmagist3r 2019-05-16 github

@doitsujin what mingw version do you use for releases?

Hhakzsam 2019-05-16 github

No hangs on my side too with mesa-git/llvm-git and Proton4.2-4 on RX480.

Mmagist3r 2019-05-18 github

Interesting news here.
I experienced the same hang with AMDVLK driver (from master). Here is dmesg output related to the hang:

[drm:amdgpu_dm_atomic_commit_tail [amdgpu]] *ERROR* Waiting for fences timed out.
[drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx timeout, signaled seq=328528, emitted seq=328530
[drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process re2.exe pid 482 thread dxvk-submit pid 525

v1.2 with 67b9b6e reverted works fine with both radv and amdvlk.

And for some very weird reason v1.2 from releases page works fine too, but my self-complied version and version from https://haagch.frickel.club/files/dxvk/r2230.26602b2/ doesn't.

Could it be the amdgpu kernel driver issue? I used kernel 5.0.13 and now updated to 5.1.2 - hang still persist.

Mmagist3r 2019-05-19 github

@doitsujin Finally I found the real reason of this hang. I have built dxvk with '--optimization=2' meson option (which passes -O2 instead of -O3 to gcc) and all works fine!

I guess that v1.1.1 from releases page is built with -O3, and v1.2 and v1.2.1 with -O2.

Ddoitsujin maintainer 2019-05-19 github

All my builds are compiled with -O3.

Mmagist3r 2019-05-19 github

Maybe it's a compiler bug? I use gcc 8.2.0 with mingw-w64 6.0.0.

Ddoitsujin maintainer 2019-05-19 github

Not impossible, but also not likely. I'm using GCC 9.1 right now, versions prior to 1.2 were compiled with GCC 8.3.

LloathingKernel 2019-05-20 github

@magist3r is the self-compiled one using march=native with -O3 on an avx capable processor?

Mmagist3r 2019-05-20 github

@loathingKernel No, I use default build options. From meson compile_commands.json:
-fdiagnostics-color=always -pipe -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++1z -O3 -DNOMINMAX -MD

My CPU is i7-3770 and it is avx capable.

Mmagist3r 2019-05-22 github

Conclusion:

gcc8, -O3, dxvk 1.1.1+ -> hang
gcc8, -O2, dxvk 1.1.1+ -> no hang
gcc8, -O3, dxvk 1.1.1+, commit 67b9b6e reverted -> no hang
gcc9, -O3, dxvk 1.1.1+ -> no hang

So looks like that the compiler (gcc8) generates wrong code for the commit 67b9b6e.
@doitsujin The issue can be closed I think.

Mmagist3r 2019-05-24 github

Not surprising that Proton 4.2-5 with dxvk 1.2.1 hangs too.

Mmagist3r 2019-06-12 github

Works fine now with Proton 4.2-7. Closing.

Proton versions