protonscr

Resident Evil 2 remake is too dark with DXVK 1.0

dxvkclosed nvidia proprietary
doitsujin/dxvk#956 · opened 2019-03-09 by SergeyLatyshev · updated 2019-12-20 · 21 comments · github
SSergeyLatyshev 2019-03-09 github

RESIDENT EVIL 2 / BIOHAZARD RE:2 (883710) worked fine with DXVK 0.96 but with DXVK 1.0 the image is very, very dark in-game. It reverts back to normal if I downgrade DXVK.
883710_20190301203003_1

Software information

RESIDENT EVIL 2 / BIOHAZARD RE:2
https://store.steampowered.com/app/883710/

System information

  • GPU: Nvidia GTX 1060 6GB
  • Driver: 415.27
  • Wine version: Proton 3.16-8 beta
  • DXVK version: 1.0

Log files

steam-883710.zip

Ddoitsujin maintainer 2019-03-09 github

Still works fine on my RX 480. Please bisect the issue if you think this is a DXVK regression.

Please keep in mind that there is a game bug causing the image to be too dark on some systems when running above 60 FPS.

SSergeyLatyshev 2019-03-09 github

I don't have 60 FPS. What is "bisect the issue"?

Ddoitsujin maintainer 2019-03-09 github

https://git-scm.com/docs/git-bisect

In any case, I cannot reproduce the problem.

SSergeyLatyshev 2019-03-09 github

So, what should I do with 'git bisect'?

LL-as 2019-03-09 github

You need to bisect it and test different versions of DXVK.

SSergeyLatyshev 2019-03-09 github

So, I have to compile them? I tried to compile DXVK once and failed. Are there compiled builds between 0.96 and 1.0 available? I would test them.

RRiesi 2019-03-09 github

Are you using the dxvk version that is shipped with proton or have you tried dxvk by placing it next to the game? Just to eliminate proton in this equation.

SSergeyLatyshev 2019-03-09 github

Both. It started glitching when I tried DXVK 1.0 almost two weeks ago. I had Proton 3.16-6 or 3.16-7 back then. I've been using 0.96 since that. But now Proton got updated, got DXVK 1.0, and that happened again. If I replace Proton's DXVK with v0.96, the game works fine.

Ddoitsujin maintainer 2019-03-09 github

You could try setting d3d11.relaxedBarriers = False in the config file.

Although that doesn't really explain why it works fine with 1.0 for most people.

TTk-Glitch 2019-03-09 github

I have bisected the issue and found https://github.com/doitsujin/dxvk/commit/915091b76b2de06d04a4de0b050001b8e7c88169 to be the breaking point. Reverting it fixes the issue on both RE2 and DMC5.

Ddoitsujin maintainer 2019-03-09 github

Should be fixed as of 032625882990ae843cbdcd526f3c72087ab31888.

I don't know why using shift instructions (even arithmetic shifts, which should be equal to signed division) breaks on Nvidia, but it does, and this commit works around the issue. Thanks to @Tk-Glitch for testing.

Mmindinsomnia 2019-03-10 github

I can confirm I have the same issue as reported on a NVIDIA GTX 980 with latest Proton.

Ddoitsujin maintainer 2019-03-10 github

Yes, everyone on Nvidia has this issue, just read the comment above for a fix.

Jjeffbolznv 2019-03-13 github

I've identified the compiler bug, and it is already fixed in the most recent Vulkan developer driver at https://developer.nvidia.com/vulkan-driver. It should be fixed in our next mainline driver release as well.

LLastique 2019-03-16 github

arithmetic shifts, which should be equal to signed division

Arithmetic shift of negatives is not equal to division. Division rounds to zero, shift rounds to negative infinity.

Ddoitsujin maintainer 2019-03-16 github

The numbers in question are guaranteed to be a multiple of 4 (and technically also guaranteed to be non-negative).

Ddoitsujin maintainer 2019-12-17 github

Wasn't this found to be a game bug when running at low frame rates anyway?

Ddoitsujin maintainer 2019-12-18 github

Well I'm sorry that I wasn't able to guess your hardware and framerate based on absolutely no information whatsoever...

Jjeffbolznv 2019-12-19 github

The bugfix I made was only in the Vulkan SPIR-V compiler and had something to do with shared memory ordering. It's possible the DX compiler could have a similar issue, but it would be in a different part of the code base. But it's also likely it could be something completely different.

Ddoitsujin maintainer 2019-12-20 github

Was that a genuine driver bug though? The game is known to rely on undefined behaviour wrt workgroup shared memory, which has also caued issues with RADV in the past.

Jjeffbolznv 2019-12-20 github

I don't actually know. The change I made was for a different app, where it was fixing a legitimate compiler bug, and the same fix also fixed this bug. So we never debugged this particular shader in detail.

Proton versions