protonscr

[D3D9] - Tomb Raider: Legend - Low performance

dxvkclosed appid 7000d3d9
doitsujin/dxvk#1685 · opened 2020-07-13 by aqxa1 · updated 2020-12-19 · 19 comments · github · game page · search this game
Aaqxa1 2020-07-13 github

Okay, so another game with a performance issue compared to WineD3D. Possibly related to #1682.

Early on in the game, performance mostly reaches my refresh rate of 144hz, however about an hour in, fps drops significantly.

These screenshots are with RADV ACO and RadeonSI, although I also tested LLVM and AMDGPU-PRO with little difference in performance.

DXVK (52 fps):
DXVK

DXVK with full hud:
DXVK full hud

WineD3D (132 fps)
WineD3D

EDIT: I also tried dgVoodoo2 as a workaround like in #1675, but it didn't improve things in this case.

Software information

Tomb Raider: Legend (7000), 1440p, maximum settings except "next-gen effects" and "Anti-aliasing" were disabled.

System information

  • GPU: Radeon RX 5700 XT
  • Driver: Mesa-git (ACO and LLVM)
  • Wine version: Proton-GE-5.9-ST-3
  • DXVK version: 1.7-git (today)

Apitrace file(s)

Log files

Ddoitsujin maintainer 2020-07-13 github

Can you enable DXVK_HUD=full and post a screenshot of that? It's obvious that the GPU doesn't get utilized at all, but we'd need more info on why that is, and the apitrace doesn't show any issue.

In general, low performance is not a bug, but this seems fishy.

Aaqxa1 2020-07-13 github

I've added a screenshot with full HUD.

Ddoitsujin maintainer 2020-07-13 github

Hm, nothing suspicious there either.

You sure you don't have Vulkan validation layers enabled or compiled Mesa in debug mode or anything?

Aaqxa1 2020-07-13 github

Not to my knowledge, and most of my games perform well. I did test AMDGPU-PRO, which should perform better if it's something strictly to do with Mesa (but it doesn't).

That does give me an idea to test DXVK on Windows to see if it's some issue on the Linux side of things, which I will try and get to a bit later.

Aaqxa1 2020-07-13 github

So I tested on Windows, this time with the 1.7 binary.

DXVK Windows (61 fps)
DXVK Windows
Native Windows (176 fps)
Native Windows

KK0bin maintainer 2020-07-13 github

Looks like it's locking a POOL_DEFAULT | DYNAMIC texture every frame and needs to synchronize the GPU to do that.

KK0bin maintainer 2020-07-13 github

I tried it with DXVK on Windows and it works fine.
Tomb Raider  Legend Screenshot 2020 07 13 - 13 37 24 15

What graphics settings are you using?
grafik

Can you test if the PR linked above improves things?
Here's a build if you can't build it yourself.

EDIT: turned the game to the lowest graphics settings and now it's running poorly.

Aaqxa1 2020-07-13 github

It's "Next Generation Content" that works around the issues; it's not recommended because it breaks water effects and the like, but presumably it changes the way rendering works such that it doesn't trigger the bug.

The PR doesn't seem to be helping, but I'm pretty tired so I may have made a mistake. I'll test it again tomorrow with fresh eyes.

KK0bin maintainer 2020-07-13 github

I think I found the issue. The updated PR should fix it.
Tomb Raider  Legend Screenshot 2020 07 13 - 18 20 08 39
^ that scene was 70 FPS before

Aaqxa1 2020-07-14 github

Thanks, the new PR fixes the issue completely :+1:. Game now hitting 155 fps, as opposed to 55fps before, so it's now running faster than WineD3D and approaches Windows performance.

Not only that, it also fixes the issue with The Walking Dead, increasing the performance from 41 fps to >144fps (VSync enabled).

?ghost 2020-07-16 github

I tried it with DXVK on Windows and it works fine.
Tomb Raider Legend Screenshot 2020 07 13 - 13 37 24 15

What graphics settings are you using?
grafik

Can you test if the PR linked above improves things?
Here's a build if you can't build it yourself.

EDIT: turned the game to the lowest graphics settings and now it's running poorly.

@K0bin . I was having the same issue. Are you able to link a 64 bit build as that one comes at as x86 instead of x64.

Thank you for your help good Sir 👍 👍 🥇

KK0bin maintainer 2020-07-16 github

The changes will hopefully get merged soon. After that the build bot will give you a 64bit dll.

?ghost 2020-07-21 github

@K0bin hi! I saw the merge test was cancelled. Any chance of getting the 64 bit build for me to test? Pretty please 🙏

?ghost 2020-07-21 github

I can't work out how to build the dll myself sorry

?ghost 2020-08-06 github

@K0bin @Joshua-Ashton

Hi, Any chance of getting the 64 bit build with these fixes for me to test as i have the same issues on the same games. I saw the test was cancelled for pipeline # 1231 so the build bot didn't generate the 64bit dll's.

I'm not tech savvy enough to build this myself.

I'm happy to donate $10 to you via paypal for your time doing this !

Thank you

KK0bin maintainer 2020-12-14 github

FYI the game should be even faster now.

Aaqxa1 2020-12-19 github

Just tested the change, and looks to be quite a massive improvement.

I have a new CPU and I couldn't find my old save game. And I tested Proton 5.0-9 compared to Proton Experimental (so there might have been other changes than the PR) so none of this is quite like-for-like, nevertheless:

Both tests with a 5900x and 5700 XT, mesa-git, 5.9.15 kernel:

Proton 5.0-9 (DXVK 1.7.0):
DXVK 1.7.0

Proton Experimental:
Proton Experimental

So from 246 fps to 445 fps, an 80% performance improvement.

KK0bin maintainer 2020-12-19 github

The recent changes aren't even in Proton experimental.

Aaqxa1 2020-12-19 github

Interesting, I thought that at first but assumed the performance increase wouldn't have been so large without it. Will retest. EDIT: Presumably Proton 5.0 was still using a DXVK that still had the original bug, which would explain the difference. Weirdly, I can't even get Proton to honour any DXVK replacements I make, at least according to mangohud and DXVK_HUD. Will just test on Windows later I think.

Proton versions

Launch options