protonscr

DXVK behaves bad with Heroes of the storm game engine, severe stuttering when building shaders

dxvkclosed
doitsujin/dxvk#1007 · opened 2019-04-09 by sysrq-reisub · updated 2019-08-15 · 14 comments · github
1 matching comments, n / p to jump
Ssysrq-reisub 2019-04-09 github

See https://github.com/doitsujin/dxvk/issues/1007#issuecomment-521601311

Hi, 2 months ago I was playing this game without any noticeable issue with older DXVK and wine tgk versions on Lutris with something like 90/130 fps, enough for a decent experience with my 144Hz monitor

For getting the best performance, you would actually increase the graphics settings to medium-high since the low settings would have worse performance
(Has 4 presets, low, medium, high, maximum)

Since I stopped playing and I started again today, I have first noticed more micro-stutterings than the usual, so I went from DXVK 1.1 to 1.0.2 which improved things.

I asked the discord what's about 1.1 version and I've been told it's been removed, so I tested again with older DXVK version and overall runs better, even though it's a bit hard to test those micro-stutterings

BUT, the real issue here is I cannot get anymore in any way more than 120 fps like I used to do, I tested going back from tkg-4.5 to 4.0, disabling esync and testing dxvk 0.72, so it seems like the latest update changed something
For average, I get no more than 90 fps any video setting I put

For the record, since I played in the past, the shader cache should be feeded enough. And excluding that, I always never had those microstutterings except in early game, but now it seems they persist in time for some reason.

I am not sure if all those issues have something to do with the new update honestly, I am 90% sure something changed.

I am obviously available for testing

System information

  • GPU: NVIDIA GTX 1060 3GB
  • Driver: 418.56
  • Wine version: tkg-4.5
  • DXVK version: 1.0.2

Apitrace file(s)

  • Put a link here *

Log files

  • d3d11.log: *
  • dxgi.log: *

I will put that additional info as soon as possible

Ssysrq-reisub 2019-04-09 github

I actually need to rectify everything in this bug report.

I will explain what happened, and how this bug report should be changed.

  1. Since the new update, my graphics settings got to the default ones
  • When you set some specific settings too low or too high, the game stutters randomly, but does not decrease the overall fps

After I noticed this, I changed the settings and reopened the game, and that's the second issue

  1. When you use the reconnect system, it stutters, no matter what graphics settings you use
  • This happened to me when I was writing this bug report when testing, I always used the reconnect system instead of starting a new game but this is a different kind of stuttering, since it also decreases the fps noticeably and stutters almost always

Notes:

  • The reconnect system kicks in when you quit the game and you re-open it, it asks you to enter the game you were playing before (it works for ranked, quick play, vs bot, and even custom games)
  • It also looks like the later you reconnect, the worse is the performance

So, I think I should change the title and the description of this bug report to: Some settings/triggers cause the game to stutter and fps decrease

This is not a DXVK regression and always happened in the past, changing DXVK version or wine version does not change anything
I just found out some triggers.

How did I replicate the issue
Replicating the issue #1:

  • Change the graphics settings to the maximum or everything low
  • Restart
  • Search a new game (I personally created a custom one)

Replicating issue #2

  • Start a new game with decent graphics settings (this one are fine for me with a 1060)
  • Play for a few minutes
  • Alt tabbed
  • Forcibly killed all the wine processes through lutris
  • Reopened the game
  • Use the reconnect system

The zip contains two debug folders where there are dxvk logs, in the first one I played a game without issues, and the second is the one I played after the reconnect
debug.zip

Ddoitsujin maintainer 2019-04-09 github

Having some sort of frametime graph would be useful, "stutter" is terribly ambiguous.

In any case, stutter is generally not something that can be fixed easily or at all, especially when it's related to shaders or presentation. The latter is usually an issue on certain desktops / window managers, especially when desktop effects are enabled.

Ssysrq-reisub 2019-04-09 github

I will try to record a video with OBS+NVENC to get some footage, or is that better in another way?

Oopenglfreak 2019-04-10 github

I'd try deleting and rebuilding the shader cache. Helped me in the past (might have been placebo though).

SSveSop 2019-04-11 github

@Lukypie
There is a new beta Vulkan driver out that you could try aswell.
With newer DXVK you might get lower performance with 418.56 driver, because its missing a couple of vulkan extensions.

The new GIT>1.0.1 version is slightly lower performance wise than 1.0.1 tho (2% ish)

Latest git is expected to be slightly slower unless both your wine build and Vulkan driver support VK_EXT_host_query_reset. Since it's a very new extension you're probably hitting the slow path.

https://github.com/doitsujin/dxvk/issues/978#issuecomment-475901503

Just in case it is somewhat related to that. 418.56 does not have this extension.
DXVK_HUD=frametimes can be used to show frametime spikes.

Ssysrq-reisub 2019-04-12 github

video.zip

Here are two videos with the frametime, some considerations I make here:

  • The one of the left, is the game I play BEFORE closing the game, and then on the right there is the one using the reconnect system (one way to get the "issue" for example)

  • First of all, the first one ends before the second, sorry for that

  • The game I play with the reconnect system, has stutters intermittently, randomly and without any reason, and is unable to reach as the one on the left, 120 fps in some cases while overall has worse performance as you can clearly see

  • The game stutters also on the left, but differently, for example when I don't use a skill I used before (so perfectly reasonable the first time needs to generate caches as far I understand)

  • Since I use the reconnect system, the graphics settings are the same, the game "zone" and map is the same, the effects are the same since they are the same players

  • Why the one on the right performs worse while using less VRAM?

As for the graphics driver update, I will try that

Schermata da 2019-04-12 19-48-06

Aaufkrawall 2019-04-12 github

Might be a game issue, I remember making similar observations playing it on Windows. This game engine is a pathetic piece of crap in many regards.
I'll try to reproduce though.

Btw: Setting prerenderlimt to 1 should help to decrease frametime variation, apart from shader compile (and other brokeness of the game). AMD's Windows DX11 driver does this by default.

Ssonicflare 2019-04-23 github

Just my 5 cents, trying to make this game work without stutters and freezes, they have weird bug with latency and network as well, if your ISP or WiFi drops enough packets, the game enters stutter mode, the ping jumps to ~5k and the fps drops and starts to stutter, but the in-game fps is still reporting high numbers.
You can check the in-game fps by pressing Alt+Ctrl+F

Ssysrq-reisub 2019-05-05 github

Turns out

  1. The fps problem after changing graphics settings/using the reconnect system it's just due to the engine

  2. The stuttering is due to an unusual I/O usage only on HDD

So I'm closing this as it's not dxvk related...

Ssysrq-reisub 2019-08-15 github

Actually I reproduced this issue on Windows by just using DXVK, it turns out the game engine behaves really bad especially in the latest updates when using DXVK, speaking with Kitsuna in the Discord looks like the only way to get a "decent" experience is to build up a pretty much big shader cache by playing VS ai games in all the maps and all the heroes

Is there some way to build up the shader cache faster? Also, is there a way to use "Fossilize" which I've been told to build all the shaders?

Aaufkrawall 2019-08-15 github

It seems the last update did not just introduce additional shaders for the new hero/skins, but also replace some others. I had to replay each map once, then everything was back to normal (which is of course not great either, as the game doesn't properly precompile its shaders).

Does the Nvidia Vulkan driver have an on-disk shader cache? AMD's proprietary driver does not.
Using radv with ACO is a must with this game for AMD users, ACO helped immensely.

Watching replays with increased speed is a good way to populate shader cache.

Ddoitsujin maintainer 2019-08-15 github

Does the Nvidia Vulkan driver have an on-disk shader cache

It does, although games like this sometimes exceed its size limitations so it isn't always useful.

SSveSop 2019-08-15 github

Does the Nvidia Vulkan driver have an on-disk shader cache? AMD's proprietary driver does not.
Using radv with ACO is a must with this game for AMD users, ACO helped immensely.

Watching replays with increased speed is a good way to populate shader cache.

You can use the env variable __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1 ref https://devtalk.nvidia.com/default/topic/1032059/linux/opengl-shader-disk-cache-max-size-garbage-collection-/post/5281950/#5281950 to get around that 128MB limit of nVidia shader cache.

It is in any way useful to specify different nv cache folders on a "per game" basis, as if you just use one cache and play different games it will fill faster.
You do this with the __GL_SHADER_DISK_CACHE_PATH variable.
eg: __GL_SHADER_DISK_CACHE_PATH="$HOME/.nv/thegame" (You need to create the .nv/thegame folder before using tho, as it wont be created for you afaik).
The default folder for nVidia cache is ~/.nv/

Or, you can disable it altogether with __GL_SHADER_DISK_CACHE=0 (Default is enabled "1")

Ssysrq-reisub 2019-08-15 github

It seems the last update did not just introduce additional shaders for the new hero/skins, but also replace some others. I had to replay each map once, then everything was back to normal (which is of course not great either, as the game doesn't properly precompile its shaders).

Does the Nvidia Vulkan driver have an on-disk shader cache? AMD's proprietary driver does not.
Using radv with ACO is a must with this game for AMD users, ACO helped immensely.

Watching replays with increased speed is a good way to populate shader cache.

For me the situation ended up dramatically worse with the February update

So the best case scenario so far is using an SSD for the game data + ACO